I have a maven project with a non standard configuration:
$> tree
.
├── pom.xml
├── symbolic-link-to-sources -> ../src
└── target
├── maven-archiver
│ └── pom.properties
├── project-1.0-SNAPSHOT-sources.jar
├── project-1.0-SNAPSHOT.jar
└── surefire
I am trying to generate the sources jar of this maven module, whose sources are in ../src. I created a symbolic link to ../src in the case the plugin does not accept parent folders in paths. To do so I use the maven source plugin configured like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<includePom>true</includePom>
<includes>
<include>symbolic-link-to-sources/**</include>
</includes>
</configuration>
</plugin>
I run this plugin with mvn source:jar
. Unfortunately I get only pom.xml in my sources jar. If I set includePom to false the plugin does not create the source archive.
I tried a lot of things as <include>
: ../src
, ../src/**
, ../**
, symbolic-link-to-sources
, symbolic-link-to-sources/**
, ../**/*.java
none of them get me my sources into my sources jar. Although the documentation about it say its a relative fileset pattern.
Any idea how to get the content the java files of the ../src folder into my sources jar?
(Yes my symbolic link is not broken, no there is no way to rearrange my modules to have a standard folder hierarchy, this is a wrapper project around an ant based project).