Part of the results for the client includes the source code of the project we are working on. I am using maven with mvn generate-sources. The problem is that it includes all the dependencies and aggregates the sources for the dependency. I am trying to create a flat structure with .javafiles filtered on groupid.
The documentation is very biased by maven-source-plugin . All the search queries that I do indicate me filtering resources, which I am not looking for.
The structure of my project is the parent pom with the children, and I am trying to achieve something like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<resouces>
<filter>
<include>com.mygroupid.project</include>
</filter>
</resouces>
</plugin>
What I expect:
- The "fat" structure (all project sources aggregated by package name in one directory)
- No duplicate sources
Edit:
:
- module-1 pom.xml // aggregate project
|- module-1-core (has dependency to module-2 and module-2)
|- module-1-war
- module-2 pom.xml // aggregate project
|- module-2-commons
- module-3 pom.xml // aggregate project
|- module-3-services
- // etc...
:
- big-fat-code-sources.zip
|- module-1-core sources + test source
|- module-1-war sources + test source
|- module-2-commons sources + test source
|- module-3-services sources + test source
|- // etc...