Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fail on old versions because of license check #39

Closed
marcpawl opened this issue May 3, 2016 · 1 comment
Closed

Build fail on old versions because of license check #39

marcpawl opened this issue May 3, 2016 · 1 comment
Assignees
Milestone

Comments

@marcpawl
Copy link

marcpawl commented May 3, 2016

$ cat Dockerfile
FROM fedora:21
RUN yum update -y
RUN yum install -y maven java-1.8.0-openjdk unzip wget
RUN cd /root && wget -O 2.2.zip https://github.com/easymock/objenesis/archive/2.2.zip

COPY 2.2.zip /root

RUN cd /root && unzip 2.2.zip
RUN cd /root/objenesis-2.2 && mvn install
RUN chmod -R 755 /root
CMD /bin/bash
$ docker build -t objenesis-2.2 .
...
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2.0.10/plexus-io-2.0.10.jar
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/2.4.4/plexus-archiver-2.4.4.jar
Downloading: http://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.5/commons-compress-1.5.jar
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar (6 KB at 99.9 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/tukaani/xz/1.2/xz-1.2.jar
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar (10 KB at 140.7 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2.0.10/plexus-io-2.0.10.jar (58 KB at 745.5 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/2.4.4/plexus-archiver-2.4.4.jar (161 KB at 1976.8 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/tukaani/xz/1.2/xz-1.2.jar (93 KB at 841.8 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/apache/commons/commons-compress/1.5/commons-compress-1.5.jar (251 KB at 2234.2 KB/sec)
[INFO] Adding existing MANIFEST to archive. Found under: /root/objenesis-2.2/main/target/classes/META-INF/MANIFEST.MF
[INFO] Building jar: /root/objenesis-2.2/main/target/objenesis-2.2.jar
[INFO]
[INFO] --- maven-license-plugin:1.10.b1:check (check) @ objenesis ---
[INFO] Checking licenses...
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/org/objenesis/ExternalizableTest.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/org/objenesis/SerializingInstantiatorTest.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/org/objenesis/ObjenesisExceptionTest.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/org/objenesis/instantiator/sun/MagicInstantiatorTest.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/org/objenesis/instantiator/basic/ClassDefinitionUtilsTest.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/org/objenesis/instantiator/basic/ProxyingInstantiatorTest.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/org/objenesis/ObjenesisTest.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/ObjenesisBase.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/ObjenesisException.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/ObjenesisSerializer.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/ObjenesisStd.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/strategy/StdInstantiatorStrategy.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/org/objenesis/EmptyClass.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/org/objenesis/ClassReader.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/strategy/SingleInstantiatorStrategy.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/strategy/SerializingInstantiatorStrategy.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/strategy/PlatformDescription.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/strategy/BaseInstantiatorStrategy.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/strategy/InstantiatorStrategy.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/ObjenesisHelper.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/Objenesis.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/perc/PercSerializationInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/perc/PercInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/ObjectInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/sun/SunReflectionFactoryHelper.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/sun/UnsafeFactoryInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/sun/SunReflectionFactorySerializationInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/sun/SunReflectionFactoryInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/basic/NullInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/android/os/Build.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/basic/ConstructorInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/basic/NewInstanceInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/basic/ObjectStreamClassInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/basic/AccessibleInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/basic/ProxyingInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/basic/ClassDefinitionUtils.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/basic/ObjectInputStreamInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/basic/FailingInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/gcj/GCJInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/gcj/GCJInstantiatorBase.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/gcj/GCJSerializationInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/SerializationInstantiatorHelper.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/sun/MagicInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/android/AndroidSerializationInstantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/android/Android18Instantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/android/Android10Instantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/src/main/java/org/objenesis/instantiator/android/Android17Instantiator.java
[INFO] Missing header in: /root/objenesis-2.2/main/assembly.xml
[INFO] Missing header in: /root/objenesis-2.2/main/src/test/java/org/objenesis/strategy/PlatformDescriptionTest.java
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Objenesis parent project ........................... SUCCESS [ 4.989 s]
[INFO] Objenesis .......................................... FAILURE [ 13.259 s]
[INFO] Objenesis TCK ...................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.530 s
[INFO] Finished at: 2016-05-03T14:37:31-04:00
[INFO] Final Memory: 24M/180M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mycila.maven-license-plugin:maven-license-plugin:1.10.b1:check (check) on project objenesis: Some files do not have the expected license header -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :objenesis
The command '/bin/sh -c cd /root/objenesis-2.2 && mvn install' returned a non-zero code: 1

@henri-tremblay henri-tremblay self-assigned this May 4, 2016
@henri-tremblay henri-tremblay added this to the 2.3 milestone May 4, 2016
@henri-tremblay
Copy link
Contributor

This is caused because there is a license check when building Objenesis. Since you are building an old version, the year is too old so it doesn't pass.

It is unrelated to docker. You can skip the check with -Dllicense.skip=true I think.

However, I'll keep the bug open because it should only be used during a full build.

@henri-tremblay henri-tremblay changed the title 2.2 test case failures when built from scratch inside docker Build fail on old versions because of license check May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants