Maven Deploy > Uploaded file name - java

When I deploy my project (IntelliJ).
I see that file names contain some numbers. Why is that? Why it is not simple TryAPI-2.0.jar?
My pom:
<groupId>de.trymc.api</groupId>
<artifactId>TryAPI</artifactId>
<version>2.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>TryAPI</name>
<!--<distributionManagement>
<repository>
<id>trymc</id>
<url>http://132121212u/nexus/content/repositories/trymc</url>
<uniqueVersion>false</uniqueVersion>
</repository>
</distributionManagement>-->
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<name>vps348-jycjf-snapshots</name>
<url>http://121251^515:8040/artifactory/trymc</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<!-- CloudNet Repository -->
<repository>
<id>cloudnet-repo</id>
<url>http://^25522525.de/repositories/</url>
</repository>
</repositories>
<dependencies>
<!-- Lombok Dependency -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.16</version>
<scope>provided</scope>
</dependency>
<!-- HikariCP Dependency -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.7.4</version>
<scope>compile</scope>
</dependency>
<!-- Apache Commons Lang Dependency -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
<scope>provided</scope>
</dependency>
<!-- Spigot / Bukkit -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.8.8</version>
<scope>provided</scope>
</dependency>
<!--- CloudNet-API for Bukkit and BungeeCord -->
<dependency>
<groupId>de.dytanic.cloudnet</groupId>
<artifactId>cloudnet-api</artifactId>
<version>2.1.PXVI</version>
<scope>provided</scope>
</dependency>
<!--- For Modules -->
<dependency>
<groupId>de.dytanic.cloudnet</groupId>
<artifactId>cloudnet-core</artifactId>
<version>2.1.PXVI</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- Maven Compiler -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<outputDirectory>D:\Development\TryMC.de</outputDirectory>
<archive>
<manifest>
<mainClass>de.trymc.api.TryApiPlugin</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

Maven SNAPSHOT artifacts are stored with a time stamp that repositories use to identify which one is the latest of all snapshots.
This is because snapshot artifacts can be overwritten in repositories.
To make a stable version, i.e., TryAPI-2.0, you would need to release the artifact, so that it becomes a stable one. Released artifacts can't be overwritten in repositories, and therefore don't need a timestamp. Released artifacts typically go to a separate repository.
Check information about the Maven release plugin here

Related

Error executing jar file with maven dependencies. java.lang.NoClassDefFoundError: org/opengis/feature/type/Name

I'm exporting my java app into a single JAR file but when I try to execute it I always get the same error.
java.lang.NoClassDefFoundError: org/opengis/feature/type/Name
Apparently there is something wrong including the opengis dependencies.
I am using the shade plugin and the mvn package command to generate the JAR file.
Here I include my 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>
<groupId>org.geotools</groupId>
<artifactId>DataEngine</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>DataEngine</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<geotools.version>23-SNAPSHOT</geotools.version>
<start-class>exe.Main</start-class>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-swing</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-hsql</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geotiff</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-image</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-wms</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-graphx_2.12</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-hive_2.12</artifactId>
<version>2.4.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.12</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>3.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-service</artifactId>
<version>3.1.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.17</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.opengis</groupId>
<artifactId>geoapi</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net repository</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>boundless</id>
<name>Boundless Maven Repository</name>
<url>http://repo.boundlessgeo.com/main</url>
</repository>
<repository>
<id>spark graphx</id>
<name>spark graphx</name>
<url>https://mvnrepository.com/artifact/org.apache.spark/spark-graphx</url>
</repository>
<repository>
<id>spark hive</id>
<name>spark hive</name>
<url>https://mvnrepository.com/artifact/org.apache.spark/spark-hive</url>
</repository>
<repository>
<id>spark sql</id>
<name>spark sql</name>
<url>https://mvnrepository.com/artifact/org.apache.spark/spark-sql</url>
</repository>
<repository>
<id>jdbc hive</id>
<name>jdbc hive</name>
<url>https://mvnrepository.com/artifact/org.apache.hive/hive-jdbc</url>
</repository>
<repository>
<id>hive service</id>
<name>hive service</name>
<url>https://mvnrepository.com/artifact/org.apache.hive/hive-service</url>
</repository>
<repository>
<id>mysql driver</id>
<name>mysql driver</name>
<url>https://mvnrepository.com/artifact/mysql/mysql-connector-java</url>
</repository>
<repository>
<id>commons-loggin</id>
<name>commons-loggin</name>
<url>https://mvnrepository.com/artifact/commons-logging/commons-logging</url>
</repository>
<repository>
<id>opengis</id>
<name>opengis</name>
<url>https://mvnrepository.com/artifact/org.opengis/geoapi</url>
</repository>
</repositories>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>exe.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>junit:junit</include>
<include>org.geotools:gt-shapefile</include>
<include>org.geotools:gt-swing</include>
<include>org.geotools:gt-epsg-hsql</include>
<include>org.geotools:gt-geotiff</include>
<include>org.geotools:gt-image</include>
<include>org.geotools:gt-wms</include>
<include>org.apache.spark:spark-graphx_2.12</include>
<include>org.apache.spark:spark-hive_2.12</include>
<include>org.apache.spark:spark-sql_2.12</include>
<include>org.apache.hive:hive-jdbc</include>
<include>org.apache.hive:hive-service</include>
<include>mysql:mysql-connector-java</include>
<include>commons-logging:commons-logging</include>
<include>org.opengis:geoapi</include>
</includes>
</artifactSet>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>exe.Main</mainClass>
</transformer>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Here the full error trace which I get:
Exception in thread "main" java.lang.NoClassDefFoundError: org/opengis/feature/type/Name
at exe.Main.initialize(Main.java:119)
at exe.Main.main(Main.java:86)
Caused by: java.lang.ClassNotFoundException: org.opengis.feature.type.Name
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
I would really appreciate any help/suggestion. I've been stack at this point for quite a long time but still not getting any solution.
You should avoid the maven assembly plugin as it will cause you issues in the future. GeoTools modules often define one or more files in its META-INF/services directory with the same names as files defined in other modules. The assembly plugin just copies files with the same name over the top of each other rather than merging their contents.
The good news is that the Maven shade plugin can be used instead and it will correctly merge the META-INF/services files from each of the GeoTools modules used by your application.
See the FAQ for more details.
And finally, please use a stable release unless you are explicitly testing the release candidate for us (22-RC for example, became useless on the release of 22.0).
I've added this assembly plugin:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>exe.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
But is still not working
**SOLVED: **
I just had to add <sourceDirectory>src/com/foobar</sourceDirectory> to <build> and execute the mvn clean compile assembly:single command.
There is another plugin if you want to build your entire app to a single jar: http://maven.apache.org/plugins/maven-assembly-plugin/
Maven assembly also support various type of packaging. You can consider using this if you cannot find a way to fix your current problem.

Error: Could not find or load main class Spring Boot application

I have a Spring Boot application and I can't figure out why I am getting this "Error: Could not find or load main class com.example....".
I am only getting this problem with the jar file, packaged with maven, which is including all dependencies. The jar file without dependencies is working just fine, as the whole project in STS. I have read this question (What does "Could not find or load main class" mean?) and all the linked articles and it still is above my head. I did everything suggested and in the end it still threw the same error. I do have now Main-Class: com.fully.qualified.name in my MANIFEST.MF in the created jar.
I might have a classpath issue as I feel from that article, as when I included the <addClasspath>true</addClasspath> in the maven plugin, I got some 150+ dependency jar files as Class-Path in my MANIFEST.MF file. These jar files are also in my jar\Boot-INF\lib, whereas my code files are in jar\BOOT-INF\classes. Do you think it has something to do with it and how can I solve this?
My POM:
<?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>
<groupId>com.fully.qualified</groupId>
<artifactId>name</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>example</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<scala.majorVersion>2.11</scala.majorVersion>
<scala.minorVersion>8</scala.minorVersion>
<start-class>com.fully.qualified.name.Demo</start-class>
</properties>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<id>pele.farmbio.uu.se</id>
<url>http://pele.farmbio.uu.se/artifactory/libs-snapshot</url>
</repository>
<repository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.majorVersion}.${scala.minorVersion}</version>
<exclusions>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.19.3</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.lamma</groupId>
<artifactId>lamma_2.11</artifactId>
<version>2.2.2</version>
</dependency>
<!-- fix java.lang.ClassNotFoundException: org.codehaus.commons.compiler.UncheckedCompileException -->
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>commons-compiler</artifactId>
<version>2.7.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/log4j-over-slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<recompileMode>incremental</recompileMode>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.fully.qualified.name.Demo</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
</plugins>
<!-- Following is to remove pom errors only -->
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
net.alchim31.maven
</groupId>
<artifactId>
scala-maven-plugin
</artifactId>
<versionRange>
[2.15.2,)
</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Java command: java -jar example-0.0.1-SNAPSHOT-jar-with-dependencies.jar
java -jar example-0.0.1-SNAPSHOT.jar works just fine.
Thanks.

Maven 'forget' classes it generated in previous 'package' command

I quite stuck with something I think is basic, but Maven does not enable me to package my project twice without doing some cleaning.
I'm working on a java project with multi-dependencies (different modules developped by different people, usual stuff) and one of them uses java classes generated using JAXB.
I'm using maven to make all that work together (one pom per module and one pom parent to built the whole project, basic stuff I said).
When I package the modules using dedicated pom there is no trouble (even if I do several successive package without cleaning). When I package the whole project for the first time (or after a clean) there is no problem at all too (*.java generated from XSDs, *.class, tests executed, Jar generated properly).
But now, if I re-do the package command, then maven says that it cannot find the classes generated using JAXB (and, then there are compilation issues in other java classes due to symbols that cannot be found, logic).
I think that Maven kind of "forgot" that it generated java classes during previous package but I don't know how to make it remember. So, up to now, I'm obliged to make it generate those classes and delete them, again and again (and its quite long as the clean cleans every other modules that will then be built again...).
So, if anyone has any clue on what I'm missing/doing wrong, I would be glad as none of my search here and there were successful.
I hope that I was clear enough. If not, feel free to ask for further explanation.
Thank you
P.S. I forgot to tell you that I'm using Maven with command line
EDIT :
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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>my.package.for.mysoft</groupId>
<artifactId>mysoft-parent</artifactId>
<packaging>pom</packaging>
<version>1.3.0-SNAPSHOT</version>
<name>Main parent for MySoft modules</name>
<properties>
<mysoft_version>1.3.0-SNAPSHOT</mysoft_version>
<main_other_soft_version>1.3.1</main_other_soft_version>
<!-- SCADAsoft packages -->
<scadasoft.version>6.2.4.4</scadasoft.version>
<!-- Hypervisor packages -->
<othersoft2.version>2.9.0_P03</othersoft2.version>
<othersoft1.version>1.8.0_P03</othersoft1.version>
<othersoft3.version>1.2.8</othersoft3.version>
<hv.quartz-tc.version>2.2.1</hv.quartz-tc.version>
<!-- TVS packages -->
<tvs.common.version>3.6.5.0001</tvs.common.version>
<!-- Loggers -->
<slf4j.version>1.7.2</slf4j.version>
<log4j.version>1.2.17</log4j.version>
</properties>
<modules>
<module>mysoft-bom</module>
<module>mysoft-jaxb</module>
<module>mysoft-common</module>
<module>My-project-that-uses-jaxb-generated-classes</module>
</modules>
<distributionManagement>
<snapshotRepository>
<id>soft-repo-releases</id>
<name>SOFT maven repository - SNAPSHOTS</name>
<url>http://url.of.the.server:123/nexus/content/repositories/mysoft_snapshots/</url>
</snapshotRepository>
<repository>
<id>soft-repo-releases</id>
<name>Soft maven repository - RELEASES</name>
<url>http://url.of.the.server:123/nexus/content/repositories/mysoft_releases/</url>
</repository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.terracotta.quartz</groupId>
<artifactId>quartz-terracotta</artifactId>
<version>${hv.quartz-tc.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<deployAtEnd>false</deployAtEnd>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-parent-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>project.parent.version</property>
<regex>1.3.0.SNAPSHOT</regex>
</requireProperty>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Pom of the module that generates java classes
<?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>mysoft-jaxb</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>my.package.for.mysoft</groupId>
<artifactId>mysoft-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>MySoft generated classes</name>
<description>Classes generated by JAXB</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<othersoft1.version>1.8.0</othersoft1.version>
<othersoft2.version>2.9.0</othersoft2.version>
<othersoft3.version>1.2.8</othersoft3.version>
<mysoft.data.model>${main_other_soft_version}</mysoft.data.model>
<mysoft.common>${main_other_soft_version}</mysoft.common>
<mysoft.core>${main_other_soft_version}</mysoft.core>
<skipTests>false</skipTests>
</properties>
<distributionManagement>
<snapshotRepository>
<id>soft-repo-releases</id>
<name>Soft maven repository - SNAPSHOTS</name>
<url>http://url.of.the.server:123/nexus/content/repositories/mysoft_snapshots/</url>
</snapshotRepository>
<repository>
<id>soft-repo-releases</id>
<name>Soft maven repository - RELEASES</name>
<url>http://url.of.the.server:123/nexus/content/repositories/mysoft_releases/</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.6.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<environmentVariables>
<PATH>${java.library.path};${my_api_dir}\Bin;${project.basedir}\..\module-with-cpp\target\nar\lib\x86-Windows-msvc\jni</PATH>
</environmentVariables>
<argLine>-Xmx1024m</argLine>
</configuration>
</plugin>
<!-- Maven Compiler plugin: Inherited from Parent -->
<!-- Maven Jar plugin: Inherited from Parent -->
<!-- Maven Check Style Plugin: Inherited from Parent -->
<!-- Maven Assembly Plugin Plugin: Inherited from Parent -->
<!-- Maven JavaDoc Plugin: Inherited from Parent -->
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
</plugin>
<!-- generation of java classes using JAXB -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<sources>
<source>${project.build.sourceDirectory}/../resources/xsd/config.xsd</source>
</sources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>system_configuration/**</exclude>
<exclude>mysoft.properties</exclude>
<exclude>connector_configuration.xml</exclude>
<exclude>log4j.xml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
Module that uses the one with JAXB generated java classes
<?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>My-project-that-uses-jaxb-generated-classes</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>my.package.for.mysoft</groupId>
<artifactId>mysoft-parent</artifactId>
<version>1.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>My project module 1</name>
<description>Module that uses Jaxb generated classes</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<othersoft1.version>1.8.0</othersoft1.version>
<othersoft2.version>2.9.0</othersoft2.version>
<othersoft3.version>1.2.8</othersoft3.version>
<mysoft.data.model>${main_other_soft_version}</mysoft.data.model>
<mysoft.common>${main_other_soft_version}</mysoft.common>
<mysoft.core>${main_other_soft_version}</mysoft.core>
<skipTests>false</skipTests>
</properties>
<distributionManagement>
<snapshotRepository>
<id>soft-repo-releases</id>
<name>Soft maven repository - SNAPSHOTS</name>
<url>http://url.of.the.server:123/nexus/content/repositories/mysoft_snapshots/</url>
</snapshotRepository>
<repository>
<id>soft-repo-releases</id>
<name>Soft maven repository - RELEASES</name>
<url>http://url.of.the.server:123/nexus/content/repositories/mysoft_releases/</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>dependency.package.1</groupId>
<artifactId>connector-sdk-impl</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<!-- datamodels -->
<dependency>
<groupId>dependency.package.1</groupId>
<artifactId>data-model-1</artifactId>
<version>3.6.5.0001</version>
</dependency>
<dependency>
<groupId>dependency.package.2</groupId>
<artifactId>data-model-2</artifactId>
<version>${scadasoft.version}</version>
</dependency>
<!--
...
-->
<dependency>
<groupId>my.package.for.mysoft</groupId>
<artifactId>mysoft-common</artifactId>
<version>${mysoft_version}</version>
</dependency>
<dependency>
<groupId>my.package.for.mysoft</groupId>
<artifactId>mysoft-jaxb</artifactId>
<version>${mysoft_version}</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<environmentVariables>
<PATH>${java.library.path};${my_api_dir}\Bin;${project.basedir}\..\module-with-cpp\target\nar\lib\x86-Windows-msvc\jni</PATH>
</environmentVariables>
<argLine>-Xmx1024m</argLine>
</configuration>
</plugin>
<!-- Maven Compiler plugin: Inherited from Parent -->
<!-- Maven Jar plugin: Inherited from Parent -->
<!-- Maven Check Style Plugin: Inherited from Parent -->
<!-- Maven Assembly Plugin Plugin: Inherited from Parent -->
<!-- Maven JavaDoc Plugin: Inherited from Parent -->
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>system_configuration/**</exclude>
<exclude>mysoft.properties</exclude>
<exclude>connector_configuration.xml</exclude>
<exclude>log4j.xml</exclude>
</excludes>
</configuration>
</plugin>
<!-- One of the dependencies uses C++ -->
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>nar-download</id>
<goals>
<goal>nar-download</goal>
</goals>
</execution>
<execution>
<id>nar-test-unpack</id>
<goals>
<goal>nar-test-unpack</goal>
</goals>
</execution>
<execution>
<id>nar-integration-test</id>
<goals>
<goal>nar-integration-test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

Custom Maven plugin hosting and prefix resolution

I've wrote my own custom Maven plugin and uploaded it to my Archiva server. It works fine with the full name specified:
mvn com.mjolnirr:maven-plugin:manifest
But when I want to do it via the prefix, it fails:
mvn mjolnirr:manifest
[ERROR] No plugin found for prefix 'mjolnirr' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/sk_/.m2/repository), mjolnirr (http://mjolnirr.dyndns.org/archiva/repository/plugins), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
My plugin's 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mjolnirr</groupId>
<artifactId>mjolnirr-maven-plugin</artifactId>
<version>0.2</version>
<packaging>maven-plugin</packaging>
<name>Mjolnirr Maven Plugin</name>
<url>http://mjolnirr.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>mjolnirr</id>
<name>Mjolnirr snapshot repository</name>
<url>http://mjolnirr.com/archiva/repository/snapshots</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mjolnirr</id>
<name>Maven Plugin Repository</name>
<url>http://mjolnirr.com/archiva/repository/snapshots</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.8</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<!-- For superclass resolving -->
<dependency>
<groupId>com.mjolnirr</groupId>
<artifactId>core</artifactId>
<version>0.2</version>
</dependency>
<!-- For XML producing -->
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.5</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.2</version>
<configuration>
<goalPrefix>mjolnirr</goalPrefix>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
<execution>
<id>help-goal</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>run-its</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>1.7</version>
<configuration>
<debug>true</debug>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<settingsFile>src/it/settings.xml</settingsFile>
<goals>
<goal>clean</goal>
<goal>test-compile</goal>
</goals>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>install</goal>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
It looks like I have to put some definition into my repository. Can you help me?
ADD I've discovered that maven trying to download maven-metadata.xml from org/apache/maven/plugins. Is it possible to change this path in the project POM, without changing the maven settings?
Only plugins with a groupId of org.apache.maven.plugins will be searched by default.
To get Maven to search additional groupIds for plugins, additional plugin groups can be configured in each user's settings.xml file, e.g.:
<pluginGroups>
<pluginGroup>org.mortbay.jetty</pluginGroup>
<pluginGroup>org.apache.tomcat.maven</pluginGroup>
</pluginGroups>
More information on this in the Maven plugin guide.

WEB-INF/lib folder disappears when deploying on JBoss with Eclipse

I am trying to deploy a simple Seam 3 application on JBoss 7.1.1.
The project uses Maven but is also a Dynamic web project so it can be run directly on my configured JBoss server.
I am using Eclipse Juno for Java EE.
The project structure is:
src/main/java
src/main/resources
src/main/webapp
src/test/java
src/test/resources
target
pom.xml
The thing is, after I do a mvn:clean, mvn:package -> all the contents of the src/main/webapp/WEB-INF are copied to the "target/project/WEB-INF" folder. Also, there is a "lib" folder under WEB-INF as normal. The same contents appear in the project.war archive.
But, after doing a "Run as..run on server" or a "Full publish" if the server is running, the whole WEB-INF/lib folder disappears from the war! I checked the exploded war in the JBoss deployments folder and everything is there, except for this folder..
If I try copying it manually, it works, but I want to have the possibility to debug and that's why I want to use the Eclipse approach.
Any ideas of what is going on?
Find below the pom.xml that I am using:
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test.project</groupId>
<artifactId>test</artifactId>
<packaging>war</packaging>
<version>alpha</version>
<name>test</name>
<properties>
<seam.version>3.1.0.Final</seam.version>
<drools.version>5.4.0.Final</drools.version>
<jpamodelgen.version>1.1.1.Final</jpamodelgen.version>
<primefaces.version>3.3</primefaces.version>
<arquillian.version>1.0.1.Final</arquillian.version>
<junit.version>4.8.1</junit.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>seam-bom</artifactId>
<version>${seam.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>${arquillian.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Commons -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.3</version>
</dependency>
<!-- Java EE 6.0 -->
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0-4</version>
</dependency>
<!-- Seam International -->
<dependency>
<groupId>org.jboss.seam.international</groupId>
<artifactId>seam-international</artifactId>
<!-- <scope>runtime</scope>-->
</dependency>
<!-- Seam Mail -->
<dependency>
<groupId>org.jboss.seam.mail</groupId>
<artifactId>seam-mail</artifactId>
<scope>compile</scope>
</dependency>
<!-- Seam Security -->
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>${drools.version}</version><!--$NO-MVN-MAN-VER$-->
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>${drools.version}</version><!--$NO-MVN-MAN-VER$-->
</dependency>
<dependency>
<groupId>org.jboss.seam.security</groupId>
<artifactId>seam-security</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam.persistence</groupId>
<artifactId>seam-persistence</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.seam.transaction</groupId>
<artifactId>seam-transaction</artifactId>
</dependency>
<!-- Seam Faces required for messages support -->
<dependency>
<groupId>org.jboss.seam.faces</groupId>
<artifactId>seam-faces</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.seam.faces</groupId>
<artifactId>seam-faces-api</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.solder</groupId>
<artifactId>solder-impl</artifactId>
</dependency>
<!-- CDI (JSR-299) -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Bean Validation (JSR-303) -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Bean Validation Implementation -->
<!-- Provides portable constraints such as #NotEmpty, #Email and #Url -->
<!-- Hibernate Validator is the only JSR-303 implementation at the moment,
so we can assume it's provided -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.0.GA</version>
<scope>provided</scope>
</dependency>
<!-- JSF -->
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<!-- Pretty faces -->
<!--<dependency>
<groupId>com.ocpsoft</groupId>
<artifactId>ocpsoft-pretty-time</artifactId>
</dependency>
<dependency>
<groupId>com.ocpsoft</groupId>
<artifactId>prettyfaces-jsf2</artifactId>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.1</version>
</dependency>-->
<!-- Prime faces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.3</version>
</dependency>
<!-- Dependencies used in testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>package</defaultGoal>
<finalName>vms</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5</classpathContainer>
</classpathContainers>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<!-- activate only when you need to generate the metamodel -->
<!-- <compilerArgument>-proc:none</compilerArgument> -->
</configuration>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<additionalBuildcommands>
<!-- annoyingly creates a bin directory <buildCommand> <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
</buildCommand> -->
<buildCommand>
<name>org.jboss.tools.common.verification.verifybuilder</name>
</buildCommand>
</additionalBuildcommands>
<additionalConfig>
<file>
<name>.settings/org.maven.ide.eclipse.prefs</name>
<content>eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources
resources\:testResources
skipCompilerPlugin=true
version=1</content>
</file>
</additionalConfig>
<additionalProjectFacets>
<jst.jsf>2.0</jst.jsf>
</additionalProjectFacets>
<additionalProjectnatures>
<projectnature>org.eclipse.wst.jsdt.core.jsNature</projectnature>
<projectnature>org.jboss.tools.jsf.jsfnature</projectnature>
</additionalProjectnatures>
<wtpdefaultserver>JBossAS</wtpdefaultserver>
<wtpversion>2.0</wtpversion>
<!-- <downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs> -->
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>distribution</id>
<activation>
<property>
<name>release</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jboss-public-repository</id>
<activation>
<property>
<name>jboss-public-repository</name>
<value>!false</value>
</property>
</activation>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
<repository>
<id>prime-repo</id>
<name>Prime Repo</name>
<url>http://repository.primefaces.org</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>jbossas7</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>arquillian</name>
<value>jbossas-managed-7</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>src/main/resources</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Functional test profiles -->
<profile>
<id>ftest</id>
<activation>
<property>
<name>arquillian</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/ftest/*Test.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Edit: I have also tried the JBoss 7 plugin (from here) and now I can do a mvn:jboss-as:deploy. But, with no better results..WEB-INF/lib is still empty.
On Eclipse, select your Web Project -> right click -> Properties -> Deployment Assembly -> Add -> Java Build Path Entries -> Maven Dependencies
With this steps, maven libraries will be included on WEB-INF/lib when full publish wildfly eclipse.
Don't do Run as..run on server" or a "Full publish"
Enable jpda settings in standalone.conf (standalone.conf.bat) and use remote debug to localhost. Default port is 8787. To deploy war use mvn:jboss-as:deploy or copy war file in deployments dir manually.
Have you tried mvn:deploy ? Note that the configuration about the project structure is on maven, but not in JBoss server

Categories