org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.4.2:generate-application-xml (default-generate-application-xml) on project cargooceanear: Failed to i nitialize ear modules

Stack Overflow | senthamizhk | 2 years ago
  1. 0

    How to resolve Unknown artifact type[test-jar] error in Maven?

    Stack Overflow | 2 years ago | senthamizhk
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.4.2:generate-application-xml (default-generate-application-xml) on project cargooceanear: Failed to i nitialize ear modules
  2. 0

    Please implement support for artifacts of type *test-jar*. One of the use cases would be to build a test EAR as a mix of production and test JARs where the test JARs are used to set up the test data used to test the production code. Currently including one or more dependencies of type test-jar causes *LifecycleExecutionException*: {noformat} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.10:generate-application-xml (default-generate-application-xml) on project suite-systemtests-common-ear: Failed to initialize ear modules: Unknown artifact type[test-jar] for artifact_id -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.10:generate-application-xml (default-generate-application-xml) on project suite-systemtests-common-ear: Failed to initialize ear modules at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 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:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to initialize ear modules at org.apache.maven.plugin.ear.AbstractEarMojo.execute(AbstractEarMojo.java:260) at org.apache.maven.plugin.ear.GenerateApplicationXmlMojo.execute(GenerateApplicationXmlMojo.java:162) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.apache.maven.plugin.ear.UnknownArtifactTypeException: Unknown artifact type[test-jar] for common-domain-impl at org.apache.maven.plugin.ear.EarModuleFactory.newEarModule(EarModuleFactory.java:88) at org.apache.maven.plugin.ear.AbstractEarMojo.execute(AbstractEarMojo.java:250) ... 22 more {noformat}

    Apache's JIRA Issue Tracker | 2 years ago | Maxim Frolov
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.10:generate-application-xml (default-generate-application-xml) on project test-jar-in-ear-ear: Failed to initialize ear modules
  3. 0

    maven-ear-plugin works if jboss version is 4.2, but not 5. Why?

    Stack Overflow | 7 years ago | NSINGH
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to initialize JBoss configuration
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.maven.plugin.ear.UnknownArtifactTypeException

      Unknown artifact type[test-jar]

      at org.apache.maven.plugin.ear.util.ArtifactTypeMappingService.getStandardType()
    2. org.apache.maven
      GenerateApplicationXmlMojo.execute
      1. org.apache.maven.plugin.ear.util.ArtifactTypeMappingService.getStandardType(ArtifactTypeMappingService.java:151)
      2. org.apache.maven.plugin.ear.EarModuleFactory.newEarModule(EarModuleFactory.java:74)
      3. org.apache.maven.plugin.ear.AbstractEarMojo.execute(AbstractEarMojo.java:230)
      4. org.apache.maven.plugin.ear.GenerateApplicationXmlMojo.execute(GenerateApplicationXmlMojo.java:85)
      4 frames
    3. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
      1 frame
    4. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
      6. org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
      9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
      9 frames
    5. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
      2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
      3. org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
      3 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    7. Plexus
      Launcher.main
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      4 frames