我有一個多模塊項目,我堅持這個奇怪的情況:行家包不編譯
命令> MVN包
[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] ------------------------------------------------------------------------
在此之後,目標/ classes文件夾爲空。當這些課程被發現並報告建造成功時,怎麼會這樣呢?
罐子也建造,但顯然沒有它的類。
該模塊的POM:
http://maven.apache.org/xsd/maven-4.0.0.xsd 「 的xmlns =」 http://maven.apache.org/POM/4.0 0.0" 的xmlns:的xsi = 「http://www.w3.org/2001/XMLSchema-instance」> 4.0.0
<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>
使用maven 3.0.4 任何暗示。將不勝感激(一直在嘗試各種各樣的天數)。
整個軟件編譯運行良好intellij思想。
是的,我沒有運行mvn乾淨,並做了一個新鮮結帳。事實上,我甚至使用新鮮的Windows安裝與一切新鮮(沒有本地mvn回購殘羹剩飯)是肯定的,並可以重現該問題。從想法和命令行運行mvn。
您的pom文件中有標記嗎? –
2012-03-15 18:13:04