Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Unable to build Third Party using maven CLI #125

Open
dfcoffin opened this issue Oct 29, 2015 · 12 comments
Open

Unable to build Third Party using maven CLI #125

dfcoffin opened this issue Oct 29, 2015 · 12 comments
Labels

Comments

@dfcoffin
Copy link
Contributor

Attempting to build the Data Custodian using the following maven CLI format produces a failed build:

mvn clean -Dmaven.test.skip=true package

Results in the following build error and subsequent failure:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building ThirdParty 1.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.energyos:Common:jar:1.3-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.823s
[INFO] Finished at: Thu Oct 29 11:30:46 EDT 2015
[INFO] Final Memory: 9M/59M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ThirdParty: Could not resolve dependencies for project org.energyos:ThirdParty:war:1.3-SNAPSHOT: Failure to find org.energyos:Common:jar:1.3-SNAPSHOT in http://maven.springframework.org/release was cached in the local repository, resolution will not be reattempted until the update interval of spring-maven-release has elapsed or updates are forced -> [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/DependencyResolutionException
@dfcoffin dfcoffin added the bug label Oct 29, 2015
@marvinroman
Copy link

Is there any known workaround? I ran into the same error when attempting to install.

@jateeter
Copy link
Contributor

Thanks for adding this issue. Totally unaware there was a problem. I'll look into it over the 4th week-end

John

@jateeter
Copy link
Contributor

(ps: it is likely just that the common lib has has not be rebuilt.)

@marvinroman
Copy link

It could also be the version of Maven or Java. What is the last working version that has been tested on?

@jateeter
Copy link
Contributor

I think (if this is happening to you on your local machine) that this is fixed by first building common, then building ThirdParty - you local library cache either has a 1.2 version of common.jar (unlikely) or no version of common.jar. This error occurs b/c we have never place the jar files on a maven repo (again, I think).

@marvinroman
Copy link

marvinroman commented Jun 28, 2016

So it's was error with Maven on Bitnami Stack. I was able to fix that in settings.xml. With the following addition.

 <profiles>
    <profile>
      <id>env-dev</id>
      <properties>
        <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
        <maven.compiler.fork>true</maven.compiler.fork>
      </properties>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>env-dev</activeProfile>
  </activeProfiles>

It didn't however get me all the way there, in building common.jar I ran into the following errors.

Tests in error:
findById_returnsMeterReading(org.energyos.espi.common.repositories.jpa.MeterReadingRepositoryImplTests): Failed to load ApplicationContext
findByMeterReadingId_returnsIntervalBlocks(org.energyos.espi.common.repositories.jpa.IntervalBlockRepositoryImplTests): Failed to load ApplicationContext
entry_id(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
entry_link(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
content_ElectricPowerUsageSummary(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
entry_title(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
content_empty(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
content_UsagePoint(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
entry(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
content_LocalTimeParameters(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
content(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
entry_updated(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
content_ReadingType(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
content_IntervalBlocks(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
content_MeterReading(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
entry_published(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
content_ElectricPowerQualitySummary(org.energyos.espi.common.utils.FragmentMarshallerTests): Failed to load ApplicationContext
kind(org.energyos.espi.common.domain.ServiceCategoryUnmarshallerTests): Failed to load ApplicationContext
unmarshalsElectricPowerQualitySummary(org.energyos.espi.common.domain.ElectricPowerQualitySummaryTests): Failed to load ApplicationContext
customerAgreement(org.energyos.espi.common.domain.ServiceDeliveryPointUnmarshallerTests): Failed to load ApplicationContext
name(org.energyos.espi.common.domain.ServiceDeliveryPointUnmarshallerTests): Failed to load ApplicationContext
tariffProfile(org.energyos.espi.common.domain.ServiceDeliveryPointUnmarshallerTests): Failed to load ApplicationContext
persistable(org.energyos.espi.common.domain.TimeConfigurationTests): Failed to load ApplicationContext
ServiceCategory_kind(org.energyos.espi.common.domain.UsagePointMarshallerTests): Failed to load ApplicationContext
electricPowerUsageSummaries_shouldNotBeMarshaled(org.energyos.espi.common.domain.UsagePointMarshallerTests): Failed to load ApplicationContext
status(org.energyos.espi.common.domain.UsagePointMarshallerTests): Failed to load ApplicationContext
meterReadings_shouldNotBeMarshaled(org.energyos.espi.common.domain.UsagePointMarshallerTests): Failed to load ApplicationContext
localTimeParameters_shouldNotBeMarshaled(org.energyos.espi.common.domain.UsagePointMarshallerTests): Failed to load ApplicationContext
UsagePoint(org.energyos.espi.common.domain.UsagePointMarshallerTests): Failed to load ApplicationContext
roleFlags(org.energyos.espi.common.domain.UsagePointMarshallerTests): Failed to load ApplicationContext
retailCustomer_shouldNotBeMarshaled(org.energyos.espi.common.domain.UsagePointMarshallerTests): Failed to load ApplicationContext
serviceCategory(org.energyos.espi.common.domain.UsagePointMarshallerTests): Failed to load ApplicationContext
ServiceDeliveryPoint(org.energyos.espi.common.domain.UsagePointMarshallerTests): Failed to load ApplicationContext
kind(org.energyos.espi.common.domain.ServiceCategoryMarshallerTests): Failed to load ApplicationContext
serviceCategory(org.energyos.espi.common.domain.ServiceCategoryMarshallerTests): Failed to load ApplicationContext

Tests run: 334, Failures: 0, Errors: 35, Skipped: 2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38.622 s
[INFO] Finished at: 2016-06-28T07:28:00+00:00
[INFO] Final Memory: 12M/29M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project Common: There are test failures.
[ERROR] 
[ERROR] Please refer to /opt/bitnami/apache-tomcat/webapps/OpenESPI-ThirdParty-java/bin/common/target/surefire-reports for the individual test results.
[ERROR] -> [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/MojoFailureException

I will continue debugging another day. I am a bit of a novice in the Java world.
Do you have a preferred stack to work with? I am currently using Bitnami Tomcat stack on Google Cloud.

@renovasolar
Copy link

Haven't made any progress building common jar. What Java stack do you use for your build?

@Anmol-Porwal18
Copy link

Any update on this issue ? I am using maven (3.5.4) and Java (10.0.1). Getting the same error when building ThirdParty 1.3-SNAPSHOT

@dfcoffin
Copy link
Contributor Author

dfcoffin commented Jul 9, 2018

@Anmol-Porwal18 Can you provide the following information:

  1. Are you using an IDE to perform the build or maven CLI?
  2. Did you build the OpenESPI-Common-Java jar file before building the ThirdParty application?

@Anmol-Porwal18
Copy link

Anmol-Porwal18 commented Jul 9, 2018

@dfcoffin I am using maven CLI for build and yes, I tried building OpenESPI-Common-Java jar file but the build fails with the surefire plugin error:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.591 s
[INFO] Finished at: 2018-07-09T22:52:30+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project Common: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project Common: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    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.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    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: java.lang.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
    at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.close (ForkClient.java:257)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork (ForkStarter.java:301)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run (ForkStarter.java:116)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider (AbstractSurefireMojo.java:740)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAllProviders (AbstractSurefireMojo.java:682)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:648)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:586)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    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)
[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/PluginExecutionException```

@dfcoffin
Copy link
Contributor Author

dfcoffin commented Jul 9, 2018

@Anmol-Porwal18 Please provide the complete maven CLI command you are using to build the OpenESPI-Common-java JAR and the OpenESPI-ThirdParty-Java WAR files.

The JUnit test have been deprecated are although in the source file have not been maintained. Use the following maven commands to build the Common and ThirdParty modules:

  • OpenESPI-Common-java
    mvn -P devmysql -Dmaven.test.skip=true clean install

  • OpenESPI-ThirdParty-java
    mvn -P devmysql -Dmaven.test.skip=true clean package

@Anmol-Porwal18
Copy link

Ack, I was just doing mvn clean install for OpenESPI-Common-java. Thanks for providing correct commands. I am able to build both successfully.

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

No branches or pull requests

5 participants