Could anybody suggest me an solution with the following exception. I am going to create a multi-module project. (War, Ear)
pom.xml (war)
<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>
<parent>
<groupId>lu.pgd</groupId>
<artifactId>WebBusiness</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>WebBusiness-war</artifactId>
<packaging>war</packaging>
<name>Web Business</name>
<properties>
<failOnMissingWebXml>false</failOnMissingWebXml>
<slf4j.version>1.7.5</slf4j.version>
</properties>
<build>
<finalName>webBusiness</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<configuration>
</configuration>
</plugin>
</plugins>
</build>
</project>
pom.xml (ear)
<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>
<parent>
<groupId>lu.pgd</groupId>
<artifactId>WebBusiness</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>spdv-ear</artifactId>
<packaging>ear</packaging>
<name>Project EAR</name>
<dependencies>
<dependency>
<groupId>lu.pgd</groupId>
<artifactId>WebBusiness-war</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<finalName>WebBusiness</finalName>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.10</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<applicationId>WebBusiness</applicationId>
<displayName>SPDV (${project.version})</displayName>
<modules>
<webModule>
<groupId>lu.pgd</groupId>
<artifactId>WebBusiness-war</artifactId>
<contextRoot>/WebBusiness</contextRoot>
<moduleId>war</moduleId>
</webModule>
</modules>
<defaultLibBundleDir>lib</defaultLibBundleDir>
</configuration>
</plugin>
</plugins>
</build>
</project>
pom.xml (parent)
<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>
<groupId>lu.pgd</groupId>
<artifactId>WebBusiness</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Parent Project</name>
<modules>
<module>../SPDV_EAR</module>
<module>../WebBusiness</module>
</modules>
<packaging>pom</packaging>
</project>
When I tried to Run Maven Project Parent (Clean+Install) I got error like :
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Invalid packaging for parent POM lu.pgd:WebBusiness:0.0.1-SNAPSHOT, must be "pom" but is "war" # lu.pgd:WebBusiness:0.0.1-SNAPSHOT, C:\dev\lu\pgd\WebBusiness\0.0.1-SNAPSHOT\WebBusiness-0.0.1-SNAPSHOT.pom, line 7, column 13
[ERROR] Invalid packaging for parent POM lu.pgd:WebBusiness:0.0.1-SNAPSHOT, must be "pom" but is "war" # lu.pgd:WebBusiness:0.0.1-SNAPSHOT, C:\dev\lu\pgd\WebBusiness\0.0.1-SNAPSHOT\WebBusiness-0.0.1-SNAPSHOT.pom, line 7, column 13
#
[ERROR] The build could not read 2 projects -> [Help 1]
[ERROR]
[ERROR] The project lu.pgd:ccpd-ear:0.0.1-SNAPSHOT (C:\Users\x279\workspace\SPDV_EAR\pom.xml) has 1 error
[ERROR] Invalid packaging for parent POM lu.pgd:WebBusiness:0.0.1-SNAPSHOT, must be "pom" but is "war" # lu.pgd:WebBusiness:0.0.1-SNAPSHOT, C:\dev\lu\pgd\WebBusiness\0.0.1-SNAPSHOT\WebBusiness-0.0.1-SNAPSHOT.pom, line 7, column 13
[ERROR] The project lu.pgd:WebBusiness-war:0.0.1-SNAPSHOT (C:\Users\x279\workspace\WebBusiness\pom.xml) has 1 error
[ERROR] Invalid packaging for parent POM lu.pgd:WebBusiness:0.0.1-SNAPSHOT, must be "pom" but is "war" # lu.pgd:WebBusiness:0.0.1-SNAPSHOT, C:\dev\lu\pgd\WebBusiness\0.0.1-SNAPSHOT\WebBusiness-0.0.1-SNAPSHOT.pom, line 7, column 13
Could anybody help me here to understand what is going wrong here please ?
Copy your modules SPDV_EAR and WebBusiness into the parent project folder (ccpd). Then change the modules tag in the parent pom to:
<modules>
<module>SPDV_EAR</module>
<module>WebBusiness</module>
</modules>
Also in your parent pom change
<artifactId>WebBusiness</artifactId>
to
<artifactId>ccpd</artifactId>
In your war (WebBusiness):
<parent>
<groupId>lu.pgd</groupId>
<artifactId>ccpd</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>WebBusiness</artifactId>
In you ear:
<parent>
<groupId>lu.pgd</groupId>
<artifactId>ccpd</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>SPDV_EAR</artifactId>
So your folder names match your project names.
Usually the folder structure for a multi-module project is like this:
- parent-project-folder
- pom.xml (parent-project)
- submodule-project-folder
- pom.xml (submodule-project)
- another-submodule-project-folder
- pom.xml (another-submodule-project)
Then the parent definition you have would be fine, but you have the parent project next to your submodules, so you need to configure a bit more.
Try adding relativePath to your parent specifications:
<parent>
<groupId>...
...
<relativePath>path/to/your/parent/pom.xml</relativePath>
</parent>
Related
I'm trying to use maven friendly ci for my multi-module project. My project has three levels of parent child hierarchy, i.e., my parent project has few child projects and those child projects has many other child projects within them.
I have added a sample of my pom files below. My parent pom has a flatten plugin as well, everything works fine in my local machine. But when I build it from Jenkins, it doesn't work. And I get the below error
Error
[ERROR] [ERROR] Some problems were encountered while processing the
POMs: [FATAL] Non-resolvable parent POM for
com.faskan:child-module:[unknown-version]:
Could not transfer artifact
com.faskan:parent-module:pom:${revision} from/to nexus
Parent project's pom.xml
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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>
<parent>
<groupId>org.faskan</groupId>
<artifactId>global-parent-dependency</artifactId>
<version>1.1.0</version>
</parent>
<groupId>org.faskan</groupId>
<artifactId>parent-module</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
<name>project parent pom</name>
<properties>
<revision>21.15.0-SNAPSHOT</revision>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.2</version>
<configuration>
</configuration>
<executions>
<!-- enable flattening -->
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<!-- ensure proper cleanup -->
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
...
</project>
Child project's pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>child-module</artifactId>
<parent>
<groupId>org.faskan</groupId>
<artifactId>parent-module</artifactId>
<version>${revision}</version>
</parent>
<name>child admin</name>
<packaging>jar</packaging>
..
</project>
Child of child project (grand child)
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>grand-child-module</artifactId>
<packaging>jar</packaging>
<name>child of child module</name>
<parent>
<groupId>org.faskan</groupId>
<artifactId>child-module</artifactId>
<version>${revision}</version>
</parent>
..
</project>
I found a similar question How do you get maven child projects to build in Jenkins when using CI Friendly versions?. Not sure if mine is the same because I don't get any parse failure errors.
The following configuration is missing in your parent pom.xml for the flatten plugin:
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</configuration>
I believe you have to add this configuration for ci-friendly projects, as explained here.
In
<parent>
<groupId>org.faskan</groupId>
<artifactId>parent-module</artifactId>
<version>${revision}</version>
</parent>
you can't have ${revision} for version. Maven don't know where to get it. You need to use actual version.
PS: I don't know how you manage to build it locally.
I have this 2 simple pom.xml
main parent project and module which the project is using
main project pom.xml :
<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>
<groupId>com.clouddispatcher</groupId>
<artifactId>clouddispatcher</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>aws-manager</module>
</modules>
<dependencies>
<dependency>
<groupId>com.clouddispatcher</groupId>
<artifactId>aws-manager</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<properties>
<aws.java.sdk.version>1.11.875</aws.java.sdk.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>${aws.java.sdk.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
and the module pom.xml :
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>clouddispatcher</artifactId>
<groupId>com.clouddispatcher</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>aws-manager</artifactId>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
</dependency>
</dependencies>
</project>
now when I run :
mvn clean install
I keep getting this error :
The build could not read 1 project -> [Help 1]
The project com.clouddispatcher:aws-manager:1.0-SNAPSHOT (C:\Dev\my\java\clouddispatcher\aws-manager\pom.xml) has 1 error
'dependencies.dependency. com.clouddispatcher:aws-manager:1.0-SNAPSHOT' for com.clouddispatcher:aws-manager:1.0-SNAPSHOT is referencing itself. # com.clouddispatcher:clouddispatcher:1.0-SNAPSHOT, C:\Dev\my\java\clouddispatcher\pom.xml, line 23, column 21
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
Let me explain the points of khmarbaise in more detail:
Parents cannot have Java classes. You need to remove the classes from the parent.
You cannot define circular dependencies, i.e. if A is a parent of B, it cannot have B as dependency.
You need to refactor your project to meet these criteria, e.g. by moving the classes from the parent to a second module.
I have the following Maven organization:
- ./pom.xml (top-level project, which defines the 4 modules below)
- ./a/pom.xml (library jar)
- ./b/pom.xml (library jar)
- ./c/pom.xml (war)
- ./d/pom.xml (executable jar)
For building and deploying the c project, I do:
mvn verify tomcat7:redeploy -pl c -am
For building and executing the d project, I do:
mvn verify exec:java -pl d -am
For d there is a problem. Maven reports:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default-cli)
on project parent: The parameters 'mainClass' for goal
org.codehaus.mojo:exec-maven-plugin:1.4.0:java are missing or invalid -> [Help 1]
This is indeed correct, the parent pom.xml has no configuration for exec. Only the d project has a configuration for exec.
This question is a little variation of question maven - advice on usage of multi-modules (jar, war, ...) project, so I decided to dedicate a separate question for it.
Why does Maven try to exec on the parent project?
update
I abstracted the same problem in following three pom files:
The parent pom:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>parent</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>parent</name>
<modules>
<module>a</module>
<module>b</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
The a pom:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>a</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>a</name>
</project>
The b pom:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>b</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>b</name>
<dependencies>
<dependency>
<groupId>test</groupId>
<artifactId>a</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<mainClass>MyMainClass</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
The command I am executing is:
mvn verify exec:java -pl b -am
This can also be found at https://github.com/jeperjaperjieper/issue-33197130.
I can't cure your problem, but I can give you a recipe. You may have hit a maven issue.
You don't have to use -pl and build from the top every time.
I would expect it to work if you just run 'mvn' (no -pl) at the top; it probably doesn't take very long to build the first pieces.
If you don't want to do that, then you need to run 'mvn install' for the pieces that come first, and then you'll be able to cd into the last piece and build it.
I recommend opening up a JIRA issue for Maven on this; it seems as if you've exposed a problem with -pl, but the best way to find out is to post an issue with a test case and poke the Maven user mailing list.
Try mvn exec:java -Dexec.mainClass="com.example.Main" to run your d project.
I have two maven projects, one named common and another core. core depends on common. The dependency span both src and test code in core. Here's the file structure:
common/
src/main/java/
...
src/test/java/
...
pom.xml
core/
src/main/java/
...
src/test/java/
...
pom.xml
Common's pom is setup pretty simply:
<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>
<groupId>com.uttt.common</groupId>
<artifactId>common</artifactId>
<version>0.1.0</version>
<dependencies>
...
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
...
</plugin>
</plugins>
</build>
</project>
My core's pom.xml:
<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>
<groupId>com.uttt.core</groupId>
<artifactId>core</artifactId>
<version>0.1.0</version>
<dependencies>
...
<dependency>
<groupId>com.uttt.common</groupId>
<artifactId>common</artifactId>
<version>0.1.0</version>
<scope>?</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
...
</plugin>
</plugins>
</build>
</project>
The problem is, when the scope on my dependency on common in core/pom.xml is compile or provided, the compile maven goal passes but test-compile doesn't - with compilation errors in the test code. When the scope is test, the neither goals passes - with compilation errors in the source code.
Anyone have any clues on how to setup my poms such that compile and test-compile succeed?
I'm having trouble setting up my project with maven. I always get that project must be pom or that it is missing a jar package. So here is what I want to do:
I have a main project that has web-inf folder for web, and can be run on tomcat if i export it as war:
<groupId>com.example</groupId>
<artifactId>main</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
I have a module project that has main dependency so I can use all libraries from main project, but will be used as an extension to main project. I plan to have multiple modules like this:
<groupId>com.example.modules</groupId>
<artifactId>module-blogging</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>module-blogging</name>
<parent>
<groupId>com.example</groupId>
<artifactId>main</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
The third project I plan to have a deployable project that will only have main project and only modules I want to deploy in a war file.
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
Is this thing even possible with maven? Because I always get that my project is missing some jar dependencies, or that the aggregation project cannot have war packaging.
i have roughly the same scenario 3 modules one of them is deploy-able
and all 3 modules included int one project
so i configured it by 4 .pom files as follows
main-project.pom
<modelVersion>4.0.0</modelVersion>
<groupId>com.#####</groupId>
<artifactId>#########</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>########</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.test.skip>true</maven.test.skip>
<###########.version>0.0.1-SNAPSHOT</##########.version>
</properties>
<modules>
<module>#########-web</module>
<module>#########-commons</module>
<module>#########-services</module>
</modules>
</project>
commons-module.pom
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>############</artifactId>
<groupId>com.#####</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>###########-commons</artifactId>
<packaging>jar</packaging>
<dependencies>
ur own depends
</dependencies>
</project>
services-module.pom
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>#######</artifactId>
<groupId>com.########</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<dependencies>
ur depends
</dependencies>
<artifactId>########-services</artifactId>
<packaging>jar</packaging>
</project>
web-module.pom
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.#########</groupId>
<artifactId>##########</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>#########-web</artifactId>
<packaging>war</packaging>
<name>############</name>
<url>http://##########.com</url>
<dependencies>
UR DEPENDS
</dependencies>
<build>
<finalName>##############</finalName>
<outputDirectory>target/${project.artifactId}-${project.version}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.8</version>
<configuration>
<version>5</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<unpackTypes>war</unpackTypes>
</configuration>
</plugin>
<!-- configure war plugin to skip webxml -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<!-- jetty plugin -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.15.v20140411</version>
</plugin>
</plugins>
</build>
UPDATE
your project structure will be something like that:
main-project
|
----commons-module
|
----services-module
|
----web-module
to build and deploy the project
i'm using jetty for deployment
you can see its plugin in web-module pom
at your project root run that command to build the project and generate the war file mvn clean install
then change directory to be on the web-module and run the following command to deploy the war file mvn jetty:run
I hope it's helpful;