I want to distribute the war of my web application generated with Maven with the source code inside it. How to do that with Maven?
相关问题
- How to resolve Maven exec plugin: classpath too lo
- Maven: How to read the Parent POM version
- Is there a maven plugin that can diff files and ou
- Ant inheriting Maven properties
- Maven2: How to be sure Maven build is using a spec
相关文章
- Maven directory structure
- Passing the Maven Debug Flag from Hudson
- Eclipse war export: optimize for a specific server
- Can't get Jenkins to start using Tomcat
- Tomcat 7 symbolic link to war file
- Jacoco code coverage show 0% coverage on Jenkins
- Using native dependencies inside Maven
- Replace a Source file in maven compile
If you want the source files in the same directory as the class files you would use:
At your war project's
pom.xml
:In the projects you want do use it:
Usually I think you would go this way: (this won't include the source files, but provides them as separate files)
It is possible configure the maven-war-plugin to include the source directory as it was a web resource:
The java sources will be included in a
sources
directory in the war. Of course you should adapt the resource directory to your own maven layout.