Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Build Issues on Ubuntu #150

Closed
3goats opened this issue Nov 5, 2015 · 3 comments
Closed

Build Issues on Ubuntu #150

3goats opened this issue Nov 5, 2015 · 3 comments

Comments

@3goats
Copy link

3goats commented Nov 5, 2015

Hi,

I'm getting some build errors on my Ubuntu server. Any advice would be appreciated.

 mvn3 package -am -pl server -P h2 -e
 [INFO] Error stacktraces are turned on.
 [INFO] Scanning for projects...
 [INFO] ------------------------------------------------------------------------
 [INFO] Reactor Build Order:
 [INFO] 
 [INFO] Keywhiz (Parent)
 [INFO] Keywhiz Testing
 [INFO] Keywhiz API
 [INFO] Keywhiz Client
 [INFO] Keywhiz HKDF
 [INFO] Keywhiz Model
 [INFO] Keywhiz Server
 [INFO] 
 [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder      with a thread count of 1
 [INFO]                                                                         
 [INFO] ------------------------------------------------------------------------
 [INFO] Building Keywhiz (Parent) 0.7.9-SNAPSHOT
 [INFO] ------------------------------------------------------------------------
 [INFO] 
 [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-unlimited-crypto-policy) @ keywhiz-parent ---
 [INFO] 
 [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ keywhiz-parent ---
 [INFO] 
 [INFO] --- maven-dependency-plugin:2.8:copy-dependencies (copy) @ keywhiz-parent ---
 [INFO] 
 [INFO] --- maven-source-plugin:2.4:jar-no-fork (attach-sources) @ keywhiz-parent ---
 [INFO]                                                                         
 [INFO] ------------------------------------------------------------------------
 [INFO] Building Keywhiz Testing 0.7.9-SNAPSHOT
 [INFO] ------------------------------------------------------------------------
 [INFO] 
 [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-unlimited-crypto-policy) @ keywhiz-testing ---
 [INFO] 
 [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ keywhiz-testing ---
 [INFO] 
 [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ keywhiz-testing ---
 [INFO] Using 'UTF-8' encoding to copy filtered resources.
 [INFO] skip non existing resourceDirectory /home/vagrant/keywhiz/testing/src/main/resources
 [INFO] 
 [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ keywhiz-testing ---
 [INFO] Nothing to compile - all classes are up to date
 [INFO] 
 [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ keywhiz-testing ---
 [INFO] Using 'UTF-8' encoding to copy filtered resources.
 [INFO] skip non existing resourceDirectory /home/vagrant/keywhiz/testing/src/test/resources
 [INFO] 
 [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ keywhiz-testing ---
 [INFO] No sources to compile
 [INFO] 
 [INFO] --- maven-surefire-plugin:2.14.1:test (default-test) @ keywhiz-testing ---
 [INFO] No tests to run.
 [INFO] 
 [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ keywhiz-testing ---
 [INFO] 
 [INFO] --- maven-dependency-plugin:2.8:copy-dependencies (copy) @ keywhiz-testing ---
 [INFO] 
 [INFO] --- maven-source-plugin:2.4:jar-no-fork (attach-sources) @ keywhiz-testing ---
 [INFO]                                                                         
 [INFO] ------------------------------------------------------------------------
 [INFO] Building Keywhiz API 0.7.9-SNAPSHOT
 [INFO] ------------------------------------------------------------------------
 [INFO] 
 [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-unlimited-crypto-policy) @ keywhiz-api ---
 [INFO] 
 [INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ keywhiz-api ---
 [INFO] 
 [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ keywhiz-api ---
 [INFO] Using 'UTF-8' encoding to copy filtered resources.
 [INFO] skip non existing resourceDirectory /home/vagrant/keywhiz/api/src/main/resources
 [INFO] 
 [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ keywhiz-api ---
 [INFO] Changes detected - recompiling the module!
 [INFO] Compiling 33 source files to /home/vagrant/keywhiz/api/target/classes
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SecretSeries.java:23: error: package java.time      does not exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SecretSeries.java:25: error: cannot find symbol
 import java.util.Optional;
                 ^
   symbol:   class Optional
   location: package java.util
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SecretContent.java:25: error: package java.time      does not exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SecretContent.java:26: error: cannot find symbol
 import java.util.Optional;
                 ^
   symbol:   class Optional
   location: package java.util
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/ApiDate.java:29: error: package java.time does not      exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/ApiDate.java:30: error: package java.time.format does      not exist
 import java.time.format.DateTimeFormatter;
                        ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SecretSeries.java:61: error: cannot find symbol
   public abstract Optional<String> type();
                   ^
   symbol:   class Optional
   location: class SecretSeries
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SecretContent.java:48: error: cannot find symbol
   public abstract Optional<String> version();
                   ^
   symbol:   class Optional
   location: class SecretContent
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/ApiDate.java:80: error: cannot find symbol
   public ApiDate(OffsetDateTime odt) {
                  ^
   symbol:   class OffsetDateTime
   location: class ApiDate
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/ApiDate.java:84: error: cannot find symbol
   public OffsetDateTime offsetDateTime;
          ^
   symbol:   class OffsetDateTime
   location: class ApiDate
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/GroupDetailResponse.java:22: error: package java.time      does not exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SanitizedSecret.java:26: error: package java.     time does not exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SanitizedSecret.java:29: error: cannot find      symbol
 import java.util.Optional;
                 ^
   symbol:   class Optional
   location: package java.util
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/Client.java:24: error: package java.time does      not exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/Group.java:23: error: package java.time does not      exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/Secret.java:24: error: package java.time does      not exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/Secret.java:26: error: cannot find symbol
 import java.util.Optional;
                 ^
   symbol:   class Optional
   location: package java.util
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SanitizedSecret.java:121: error: cannot find      symbol
   @JsonProperty public abstract Optional<String> type();
                                 ^
   symbol:   class Optional
   location: class SanitizedSecret
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/Secret.java:149: error: cannot find symbol
   public Optional<String> getType() {
          ^
   symbol:   class Optional
   location: class Secret
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/SecretDeliveryResponse.java:24: error: package java.     time does not exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/ClientDetailResponse.java:21: error: package java.time      does not exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/automation/v2/CreateSecretRequestV2.java:10: error:      cannot find symbol
 import java.util.Base64;
                 ^
   symbol:   class Base64
   location: package java.util
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/SecretDetailResponse.java:24: error: package java.time      does not exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/AutomationSecretResponse.java:24: error: package java.     time does not exist
 import java.time.OffsetDateTime;
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/validation/ValidBase64Validator.java:18: error: cannot      find symbol
 import java.util.Base64;
                 ^
   symbol:   class Base64
   location: package java.util
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/automation/v2/SecretDetailResponseV2.java:10: error:      cannot find symbol
 import java.util.Base64;
                 ^
   symbol:   class Base64
   location: package java.util
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/ApiDate.java:40: error: cannot find symbol
     private static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.     SSS'Z'");
                    ^
   symbol:   class DateTimeFormatter
   location: class ApiDateSerializer
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SecretContent.java:36: error: Did not generate      @AutoValue class for keywhiz.api.model.SecretContent because it references undefined types
 public abstract class SecretContent {
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SanitizedSecret.java:39: error: Did not generate      @AutoValue class for keywhiz.api.model.SanitizedSecret because it references undefined types
 public abstract class SanitizedSecret {
                 ^
 /home/vagrant/keywhiz/api/src/main/java/keywhiz/api/model/SecretSeries.java:38: error: Did not generate      @AutoValue class for keywhiz.api.model.SecretSeries because it references undefined types
 public abstract class SecretSeries {
                 ^
 30 errors
 [INFO] ------------------------------------------------------------------------
 [INFO] Reactor Summary:
 [INFO] 
 [INFO] Keywhiz (Parent) .................................. SUCCESS [  1.294 s]
 [INFO] Keywhiz Testing ................................... SUCCESS [  0.974 s]
 [INFO] Keywhiz API ....................................... FAILURE [  1.623 s]
 [INFO] Keywhiz Client .................................... SKIPPED
 [INFO] Keywhiz HKDF ...................................... SKIPPED
 [INFO] Keywhiz Model ..................................... SKIPPED
 [INFO] Keywhiz Server .................................... SKIPPED
 [INFO] ------------------------------------------------------------------------
 [INFO] BUILD FAILURE
 [INFO] ------------------------------------------------------------------------
 [INFO] Total time: 4.153 s
 [INFO] Finished at: 2015-11-05T14:17:53+00:00
 [INFO] Final Memory: 26M/264M
 [INFO] ------------------------------------------------------------------------
 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-     compile) on project keywhiz-api: Compilation failure -> [Help 1]
 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.     plugins:maven-compiler-plugin:3.1:compile (default-compile) on project keywhiz-api: Compilation failure
         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.     java:108)
         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.     java:76)
         at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(     SingleThreadedBuilder.java:51)
         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:606)
         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
 Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
         at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:862)
         at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.     java:133)
         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
         ... 19 more
 [ERROR] 
 [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/MojoFailureException
 [ERROR] 
 [ERROR] After correcting the problems, you can resume the build with the command
 [ERROR]   mvn <goals> -rf :keywhiz-api
@sqshh
Copy link

sqshh commented Nov 5, 2015

Based on these errors, it looks like you are using an outdated version of Java in order to build Keywhiz. Keywhiz currently requires Java 8.

I would recommend either installing the relevant version and/or investigating how to get maven to make use of this version.

@3goats
Copy link
Author

3goats commented Nov 5, 2015

Sorted - that was it thanks.

@3goats 3goats closed this as completed Nov 5, 2015
@alokmenghrajani
Copy link
Contributor

Should we make our build system smarter and display a better message when trying to use an older version of java?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants