I have a few integration tests that I want to run against a custom server that is started in the main method.
I have the below in the pom.xml:
<project>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<execution>
<id>start the server for integration tests</id>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<async>false</async>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>com.abc.def.integration.Main</argument>
</arguments>
</configuration>
</execution>
<execution>
<phase>post-integration-test</phase>
<goals/>
</execution>
</plugin>
</plugins>
</build>
</project>
The tests will be later executed using the failsafe plugin.
But currently I am getting a ClassNotFoundException for the Main class:
INFO] --- exec-maven-plugin:1.6.0:exec (start the server for integration tests) # rest ---
Error: Could not find or load main class com.abc.def.integration.Main
Caused by: java.lang.ClassNotFoundException: com.abc.def.integration.Main
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
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:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
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)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.161 s
[INFO] Finished at: 2019-08-29T14:10:46+05:30
[INFO] Final Memory: 47M/506M
[INFO] ------------------------------------------------------------------------
It looks like a classpath issue, But the Main class is part of the project being complied by the maven.
Is there a way to execute the Main method without manually specifying the classpath during the build? (like without : -Dexec.args="%classpath")
Should I be using another maven plugin to execute this class?
I solved the issue by the method described in: http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/
With below change to the execution section:
<execution>
<id>start the server for integration tests</id>
<phase>pre-integration-test</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<classpathScope>test</classpathScope>
<mainClass>com.abc.def.integration.Main</mainClass>
</configuration>
</execution>
Related
All,
I have a Spring Boot Application which needs to be deployed to Nexus as both a library and an executable jar. Spring provides a way to have both using the following bit of code in the POM file.
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.3.RELEASE</version>
<configuration>
<classifier>exec</classifier>
</configuration>
</plugin>
</plugins>
</build>
This produces the following two JARs.
(a) target/[artifact]-[version].jar
(b) target/[artifact]-[version]-exec.jar
Previous to adding the code to the POM, I am able to deploy artifact (a) to Nexus without issue. However, once I add the code, I get the following exception.
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project [artifact-id]: Failed to deploy artifacts: Could not find artifact [group-id]:[artifact-id]:jar:exec:[version]-[iteration] in nexus.ftc.lab ([nexus-url])
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.MojoExecutionException: Failed to deploy artifacts: Could not find artifact [group-id]:[artifact-id]:jar:exec:[version]-[iteration] in nexus.ftc.lab ([nexus-url])
at org.apache.maven.plugin.deploy.DeployMojo.deployProject(DeployMojo.java:284)
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:169)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not find artifact [group-id]:[artifact-id]:jar:exec:[version]-[iteration] in nexus.ftc.lab ([nexus-url])
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:143)
at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo.java:171)
at org.apache.maven.plugin.deploy.DeployMojo.deployProject(DeployMojo.java:279)
... 23 more
Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not find artifact [group-id]:[artifact-id]:jar:exec:[version]-[iteration] in nexus.ftc.lab ([nexus-url])
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:317)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:245)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:413)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:139)
... 25 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact [group-id]:[artifact-id]:jar:exec:[version]-[iteration] in nexus.ftc.lab ([nexus-url])
at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:893)
at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
at io.takari.aether.connector.AetherRepositoryConnector$PutTask.flush(AetherRepositoryConnector.java:743)
at io.takari.aether.connector.AetherRepositoryConnector.put(AetherRepositoryConnector.java:345)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:311)
... 28 more
To add to the intrigue. I tried building another JAR using more standard code. When I deploy using this, it works fine.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>client</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
One more update, when I try the below, it fails with the same exception.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>fat</shadedClassifierName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
This issue was caused by request filtering limits in an IIS proxy.
By default, the maximum allowed content length was 30 MB. This was blocking my post of a ~90 MB jar file. Increasing the limit to 512 MB fixed the problem.
I have a maven project which compiles and deploys without any issue. I am trying to use the release:prepare goal but I am getting an error. I have googled and understand that plugins can be given prefixes and the error means it can’t find one with a prefix of ‘C’. I have no idea why it is looking for a plugin with this prefix.
My pom file is:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<scm>
<connection>scm:git:ssh://git#gitlab.com:rmetcalf9/ICSchema_SAMPLE_UTIL_SCHEMA.git</connection>
<url>ssh://git#gitlab.com:rmetcalf9/ICSchema_SAMPLE_UTIL_SCHEMA.git</url>
<tag>ICSchema_SAMPLE_UTIL_SCHEMA-0.0.1</tag>
</scm>
<groupId>metcarob.com.oracledb.sample.schema</groupId>
<artifactId>ICSchema_SAMPLE_UTIL_SCHEMA</artifactId>
<version>0.0.1</version>
<packaging>jar</packaging>
<name>ICSchema_SAMPLE_UTIL_SCHEMA</name>
<url>http://maven.apache.org</url>
<!--
Command line parameters:
cmd.env - the environment this project is to be deployed to (dev/test/prod/etc)
cmd.parent.sys (OPTIONAL) - for UTILITY schemas this designates the system to use for deployment.
this is overridden by the pom property ic.pom.sys if present
-->
<properties>
<ic.ci.deployment.type>OracleDB</ic.ci.deployment.type>
<ic.ci.resourcedir>${project.basedir}/src/main/resources</ic.ci.resourcedir>
<ic.db.ciuser>CIDBADMIN</ic.db.ciuser>
<ic.db.ciuserpass>PASSWORD_REMOVED_FROM_POST</ic.db.ciuserpass>
<ic.db.schema.name>SAMPLE_UTIL_SCHEMA</ic.db.schema.name>
<ic.db.schema.objecttable>schema_objects</ic.db.schema.objecttable>
<ic.db.sqlplus.connectstring>${ic.db.ciuser}/${ic.db.ciuserpass}#${ic.db.host}:${ic.db.port}/${ic.db.service_name}</ic.db.sqlplus.connectstring>
<ic.db.jdbc.connectstring>jdbc:oracle:thin:#(DESCRIPTION=(enable=broken)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=${ic.db.host})(PORT=${ic.db.port})))(CONNECT_DATA=(service_name=${ic.db.service_name})))</ic.db.jdbc.connectstring>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ssh-repository</id>
<name>ssh-repository</name>
<url>scpexe://mvn.metcarob.com:7456/public_snapshots</url>
</snapshotRepository>
<repository>
<id>ssh-repository</id>
<name>ssh-repository</name>
<url>scpexe://mvn.metcarob.com:7456/public</url>
</repository>
</distributionManagement>
<repositories>
<repository>
<id>ic_snapshot</id>
<url>https://mvnsnap.metcarob.com</url>
</repository>
<repository>
<id>ic_main</id>
<url>https://mvn.metcarob.com</url>
</repository>
</repositories>
<build>
<plugins>
<!-- First plugin will caculate the sys property -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>bsh-property</id>
<goals>
<goal>bsh-property</goal>
</goals>
<configuration>
<properties>
<property>ic.actual.sys</property>
</properties>
<source>
ic.actual.sys = project.getProperties().getProperty("ic.pom.sys", session.getUserProperties().getProperty("cmd.parent.sys"));
</source>
</configuration>
</execution>
</executions>
</plugin>
<!-- Second plugin will read property values at the start of the validate phase -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
</execution>
</executions>
<configuration>
<files>
<file>${env.CIICENV_HOME}/${cmd.env}/${ic.actual.sys}.properties</file>
</files>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<id>deploy-dependancies</id>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>ci_deployer</executable>
<arguments>
<argument>${project.basedir}/pom.xml</argument>
<argument>NULL</argument>
<argument>${cmd.env}</argument>
<argument>${ic.actual.sys}</argument>
</arguments>
<workingDirectory>${ic.ci.resourcedir}</workingDirectory>
</configuration>
</execution>
<execution>
<id>pre-hook</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sqlplus</executable>
<arguments>
<argument>${ic.db.sqlplus.connectstring}</argument>
<argument>as</argument>
<argument>sysdba</argument>
<argument>#_control.sql</argument>
<argument>${ic.db.schema.name}</argument>
</arguments>
<workingDirectory>${ic.ci.resourcedir}/db/pre_migration</workingDirectory>
</configuration>
</execution>
<execution>
<id>sqlcodedeploy-setup</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sqlcodedeploy_setup</executable>
<arguments>
<argument>${ic.ci.resourcedir}/db/code</argument>
<argument>${ic.db.sqlplus.connectstring}</argument>
<argument>${ic.db.schema.name}</argument>
<argument>${project.version}</argument>
<argument>${ic.db.schema.objecttable}</argument>
</arguments>
<workingDirectory>${ic.ci.resourcedir}/db/code</workingDirectory>
</configuration>
</execution>
<execution>
<id>migrate-datastructures</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>ci_flyway</executable>
<arguments>
<argument>"${ic.db.jdbc.connectstring}"</argument>
<argument>"${ic.db.ciuser}"</argument>
<argument>"${ic.db.ciuserpass}"</argument>
<argument>"${ic.db.schema.name}"</argument>
<argument>"${ic.ci.resourcedir}/db/migration"</argument>
</arguments>
<workingDirectory>${ic.ci.resourcedir}</workingDirectory>
</configuration>
</execution>
<execution>
<id>deploy-code</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sqlcodedeploy</executable>
<arguments>
<argument>${ic.ci.resourcedir}/db/code</argument>
<argument>${ic.db.sqlplus.connectstring}</argument>
<argument>${ic.db.schema.name}</argument>
<argument>${project.version}</argument>
<argument>${ic.db.schema.objecttable}</argument>
</arguments>
<workingDirectory>${ic.ci.resourcedir}/db/code</workingDirectory>
</configuration>
</execution>
<execution>
<id>sqlplusmulti-runtests</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sqlplusmulti</executable>
<arguments>
<argument>${project.basedir}/src/test/resources/db/code</argument>
<argument>${ic.db.sqlplus.connectstring}</argument>
<argument>${ic.db.schema.name}</argument>
<argument>*.sql</argument>
</arguments>
<workingDirectory>${project.basedir}/src/test/resources/db/code</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<!-- Enabling the use of SSH -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>2.10</version>
</extension>
</extensions>
</build>
</project>
I use the command mvn -X release:prepare -Dcmd.env=dev -Dcmd.parent.sys=soa to run it and the output is too big for the post but the relevant part is:
INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 43.2 KB/sec)
[INFO] [DEBUG] Writing tracking file C:\off_desk\eclipse_workspaces\CITesting\ICSchema_SAMPLE_UTIL_SCHEMA\true\org\apache\maven\plugins\resolver-status.properties
[INFO]
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 66.9 KB/sec)
[INFO] [DEBUG] Writing tracking file C:\off_desk\eclipse_workspaces\CITesting\ICSchema_SAMPLE_UTIL_SCHEMA\true\org\codehaus\mojo\resolver-status.properties
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 0.890 s
[INFO] [INFO] Finished at: 2016-09-23T12:39:47+01:00
[INFO] [INFO] Final Memory: 12M/304M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] No plugin found for prefix 'C' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\off_desk\eclipse_workspaces\CITesting\ICSchema_SAMPLE_UTIL_SCHEMA\true), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[INFO] org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'C' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\off_desk\eclipse_workspaces\CITesting\ICSchema_SAMPLE_UTIL_SCHEMA\true), central (https://repo.maven.apache.org/maven2)]
[INFO] at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:93)
[INFO] at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:265)
[INFO] at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:219)
[INFO] at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:103)
[INFO] at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:83)
[INFO] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
[INFO] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
[INFO] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
[INFO] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
[INFO] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
[INFO] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
[INFO] at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[INFO] at java.lang.reflect.Method.invoke(Method.java:497)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[INFO] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] [ERROR]
[INFO] [ERROR]
[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping ICSchema_SAMPLE_UTIL_SCHEMA
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.663 s
[INFO] Finished at: 2016-09-23T12:39:47+01:00
[INFO] Final Memory: 13M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project ICSchema_SAMPLE_UTIL_SCHEMA: Maven execution failed, exit code: '1' -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project ICSchema_SAMPLE_UTIL_SCHEMA: Maven execution failed, exit code: '1'
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.MojoExecutionException: Maven execution failed, exit code: '1'
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:295)
at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:247)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1'
at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:89)
at org.apache.maven.shared.release.phase.RunPrepareGoalsPhase.execute(RunPrepareGoalsPhase.java:44)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:234)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:169)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:146)
at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:107)
at org.apache.maven.plugins.release.PrepareReleaseMojo.prepareRelease(PrepareReleaseMojo.java:291)
... 23 more
Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1'
at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:409)
at org.apache.maven.shared.release.exec.AbstractMavenExecutor.executeGoals(AbstractMavenExecutor.java:85)
at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:81)
... 29 more
[ERROR]
[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
This has the "No Plugin found for prefix C".
Does anyone have any suggestions as to where to look to narrow down the cause?
I have tried commenting out all the plugins from the pom and I still get the same error.
My problem was caused by the way I launched maven. I had created a batch script for it in a central batch directory. This worked for
mvn package
mvn deploy
etc.
but not the release plugin.
I had to put maven in my path. I got another error complaining that maven could not find mvn.bat. I looked in the maven directory
C:\Program Files\Apache\apache-maven-3.3.9\bin
and I found "mvn" and "mvn.cmd" but no "mvn.bat".
I copied "mvn.cmd" to "mvn.bat" and it now seems to work.
I then found that my arguments were being ignored. I discovered that I need to call mvn in a strange way to make the arguments work:
mvn release:prepare -Darguments="-Dcmd.env=dev -Dcmd.parent.sys=soa"
Finally it worked. (Well I am debuging a git related issue now)
Thanks everyone for the help
I think that is the correct way to pass arguments to the release plugin.
Otherwise release plugin ignores the values of properties.
Or in your pom file, in maven-release-plugin's configuration you should have:
${releaseParams}
or
-Dparam=$value -Dparam=$value
I get the following error when I run mvn integration-test -e com.example.mymodule:
[ERROR] Failed to execute goal org.jbehave:jbehave-maven-plugin:3.9.5:run-stories-as-embeddables (embeddable-stories) on project com.example.mymodule: Failed to run stories as embeddables: Failure in running embeddable: com.example.mymodule.TheStories: Could not initialize class freemarker.ext.beans.BeansWrapper -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jbehave:jbehave-maven-plugin:3.9.5:run-stories-as-embeddables (embeddable-stories) on project com.example.mymodule: Failed to run stories as embeddables
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.MojoFailureException: Failed to run stories as embeddables
at org.jbehave.mojo.RunStoriesAsEmbeddables.execute(RunStoriesAsEmbeddables.java:20)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.jbehave.core.embedder.Embedder$RunningEmbeddablesFailed: Failure in running embeddable: com.example.mymodule.TheStories
at org.jbehave.core.embedder.Embedder.runAsEmbeddables(Embedder.java:130)
at org.jbehave.mojo.RunStoriesAsEmbeddables.execute(RunStoriesAsEmbeddables.java:18)
... 21 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class freemarker.ext.beans.BeansWrapper
at freemarker.template.ObjectWrapper.<clinit>(ObjectWrapper.java:69)
at freemarker.core.Configurable.<init>(Configurable.java:139)
at freemarker.template.Configuration.<init>(Configuration.java:142)
at freemarker.template.Configuration.<clinit>(Configuration.java:127)
at org.jbehave.core.reporters.FreemarkerProcessor.configuration(FreemarkerProcessor.java:30)
at org.jbehave.core.reporters.FreemarkerProcessor.process(FreemarkerProcessor.java:21)
at org.jbehave.core.reporters.TemplateableViewGenerator.write(TemplateableViewGenerator.java:267)
at org.jbehave.core.reporters.TemplateableViewGenerator.createReports(TemplateableViewGenerator.java:219)
at org.jbehave.core.reporters.TemplateableViewGenerator.generateReportsView(TemplateableViewGenerator.java:110)
at org.jbehave.core.embedder.Embedder.generateReportsView(Embedder.java:249)
at org.jbehave.core.embedder.Embedder.generateReportsView(Embedder.java:237)
at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:213)
at org.jbehave.core.junit.JUnitStories.run(JUnitStories.java:20)
at org.jbehave.core.embedder.Embedder.runAsEmbeddables(Embedder.java:121)
... 22 more
When I run mvn dependency:tree -pl com.example.mymodule | grep freemarker I get
[INFO] | +- org.freemarker:freemarker:jar:2.3.19:compile
I used javap to confirm that the class freemarker.ext.beans.BeansWrapper exists in this jar:
javap -classpath C:\Users\CONOR2\.m2\repository\org\freemarker\freemarker\2.3.19\freemarker-2.3.19.jar freemarker.ext.beans.BeansWrapper
Here's the relevant portion of my depdendencies from my pom.xml:
<dependency>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-core</artifactId>
<version>3.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-core</artifactId>
<version>3.9.5</version>
<classifier>resources</classifier>
<type>zip</type>
</dependency>
<dependency>
<groupId>org.jbehave.site</groupId>
<artifactId>jbehave-site-resources</artifactId>
<version>3.2</version>
<type>zip</type>
</dependency>
Here's my plugin section:
<plugin>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-maven-plugin</artifactId>
<version>3.9.5</version>
<executions>
<execution>
<id>unpack-view-resources</id>
<phase>process-resources</phase>
<goals>
<goal>unpack-view-resources</goal>
</goals>
</execution>
<execution>
<id>embeddable-stories</id>
<phase>integration-test</phase>
<configuration>
<includes>
<include>com/example/mymodule/TheStories.java</include>
</includes>
<excludes />
<ignoreFailureInStories>true</ignoreFailureInStories>
<ignoreFailureInView>false</ignoreFailureInView>
<scope>test</scope>
<threads>1</threads>
<metaFilters>
<metaFilter></metaFilter>
</metaFilters>
</configuration>
<goals>
<goal>run-stories-as-embeddables</goal>
</goals>
</execution>
</executions>
</plugin>
I tried this with versions 3.9.5 and 4.0.3, but I get the same error with both versions.
It turns out that the jbehave-maven-plugin was having trouble with log4j. Adding log4j:log4j and org.slf4j:slf4j-log4j as dependencies for the plugin fixed the issue.
I have a simple (REST) web app which throws below error when I run mvn tomcat7:run,
where as it works fine with mvn tomcat7:run-war-only.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Could not start Tomcat
Embedded error: Failed to start component [StandardServer[-1]]
A child container failed during start
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Could not start Tomcat
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not start Tomcat
at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:486)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:335)
at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:1018)
at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:478)
... 19 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 22 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 24 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 26 more
Below is tomcat configuration from pom.xml,
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<contextFile>${basedir}/src/test/resources/context.xml</contextFile>
<useTestClasspath>true</useTestClasspath>
<systemProperties>
<systemProperty>
<name>maven.tomcat.port</name>
<value>8090</value>
</systemProperty>
</systemProperties>
</configuration>
<version>2.0</version>
<executions>
<execution>
<id>tomcat7-run</id>
<goals>
<goal>run-war-only</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<fork>true</fork>
<port>8090</port>
</configuration>
</execution>
<execution>
<id>tomcat-shutdown</id>
<goals>
<goal>shutdown</goal>
</goals>
<phase>post-integration-test</phase>
<configuration>
<fork>true</fork>
<port>8090</port>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-spring</artifactId>
<version>3.4.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
Any help on how to resolve this this issue or how to debug this further will be appreciated.
Thanks and Regards,
Shrey
In my case it happened because of servlet-api dependency coming from jetty. It's unclear from stacktrace but it can be found when debugging tomcat plugin.
Check out maven dependencies for your module with mvn dependency:tree and look for servlet-api transitive dependencies. Once found exclude it from build.
I am running into an exception when I try to start Jetty within my maven build so I can do selenium testing.
The exception that I am getting is:
[ERROR] Failed to execute goal org.mortbay.jetty:jetty-maven-plugin:8.0.0.RC0:run (start-jetty) on project THEPROJECTIAMWORKINGON: Failure: Object is not of type class org.eclipse.jetty.webapp.WebAppContext -> [Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mortbay.jetty:jetty-maven-plugin:8.0.0.RC0:run (start-jetty) on project THEPROJECTIAMWORKINGON: Failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
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:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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: Failure
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:358)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:273)
at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:548)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
... 19 more
Caused by: java.lang.IllegalArgumentException: Object is not of type class org.eclipse.jetty.webapp.WebAppContext
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:310)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:273)
at org.mortbay.jetty.plugin.JettyRunMojo.applyJettyXml(JettyRunMojo.java:540)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:289)
... 23 more
I am currently trying with just a bare bones jetty.xml to try to get it to work:
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
</Configure>
And the plugin code in the pom.xml looks like this at the moment:
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<configuration>
<scanIntervalSeconds>15</scanIntervalSeconds>
<stopKey>stop-me</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
<jettyConfig>src/test/resources/jetty.xml</jettyConfig>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
Has anyone ever seen this before? Or have any ideas what I need to fix?
Ok, so after tinkering for a while I figured out what the problem was. I needed to have jettyEnvXml instead of jettyConfig in my POM