java - No sources in project. Archive not created -
I use maven-source-plugin to generate Java-source though "MVN Clean; MVAn Package" target Does not generate a project-source.zer in the directory.
& lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven source-plugin & lt; / ArtifactId> & Lt; Version & gt; 2.3 & lt; / Edition & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; ID & gt; Giving-sources & lt; / Id & gt; & Lt; Goals & gt; & Lt; Goal & gt; Jar-no-fork & lt; / Target & gt; & Lt; / Targets & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt; info:
[info] --- Maven-compiler plugin: 2.5.1: testCompile (default-testCompile) @ weibo4j --- [ INFO] No source to compile [INFO] [INFO] --- Maven-surefire-plugin: 2.12.4: No test for running (default-trial) @ weibo4j --- [INFO]. [Information] [information] --- Maven-jar-plugin: 2.4: jar (default-jar) @ weibo4j --- [info] Building Jar: F: \ step-by-step \ weibo4j \ target \ weibo4j-0.0 .1 -SNAPSHOTEZAR [INFO] [INFO] --- Maven-source-plugin: 2.3: Jar-no-fork (enclosed-source) @ weibo4j --- [INFO] There is no source in the project. The archive is not created
If you have a source directory in which the Maven source directory is considered Does not - - Webpam - Your files will not be inserted in your project-sources.jar . Solution: Indication to indicate in your source directory. Add:
& lt; Build & gt; & Lt; SourceDirectory & gt; $ {Basedir} / src / home / webapp & lt; / SourceDirectory & gt; & Lt; / Create & gt;
Comments
Post a Comment