i have a multi-module project and am stuck with this strange situation:
command> mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mysoft-service-api 3.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mysoft-service-api ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\dev\mysoft\service\api\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mysoft-service-api ---
[INFO] Compiling 150 source files to C:\dev\mysoft\service\api\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ mysoft-service-api ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\dev\mysoft\service\api\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ mysoft-service-api ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.5:test (default-test) @ mysoft-service-api ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ mysoft-service-api ---
[INFO] Building jar: C:\dev\mysoft\service\api\target\mysoft-service-api-3.4-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.524s
[INFO] Finished at: Thu Mar 15 19:54:12 EET 2012
[INFO] Final Memory: 21M/225M
[INFO] ------------------------------------------------------------------------
after this the target/classes folder is empty. how could that be, when the classes were found and it reports build success?
the jar is built also, but obviously without classes in it.
this module’s pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>mysoft-service</artifactId>
<groupId>mysoft.service</groupId>
<version>3.4-SNAPSHOT</version>
</parent>
<groupId>mysoft.service.api</groupId>
<artifactId>mysoft-service-api</artifactId>
<name>mysoft-service-api</name>
<version>3.4-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
using maven 3.0.4.
any hint would be much appreciated (have been trying various things for days).
the whole software compiles and runs fine in intellij idea.
and yes i did run mvn clean, and did a fresh checkout. in fact i even used a fresh windows install with everything fresh (no local mvn repo leftovers) to be sure, and can reproduce that problem. running mvn from IDE and command line.
We’ve never figured out what exactly the problem was. But after some pom refactorings the problem went away. So I’m “closing” this now.