I’m struggling with a Maven Webapp on a Wildfly server. I previously created web projects in Eclipse using New – Dynamic Web Project, and ran those simply by Run – Run on server.
Now I created my first Maven project, using the webapp-archtype. Now my question is: How do I run this project on the server?
So far I tried 2 variants: 1. Using Run – Run on server: This does not work; within the deployments folder on the Wildfly there is a folder for my project; however, no class files are deployed. 2. Running the project as Maven build, setting the goal “clean install”, and after that add the project to the server by picking “Add and Remove…”. This approach works, however this seems a little bit clumsy to me, and, more important, I have no idea how I could enter debug mode this way?!
Can anyone tell me what’s the right way to do it?
Here you can see my pom-file:
<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>at.geos</groupId>
<artifactId>Shopping</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Shopping Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>Shopping</finalName>
</build>