Reputation: 1216
I need to build different type of library which differ only in manifest information.
It is not a good idea to make different projects since sources are exactly the same.
I tried module pom, but the child pom can not reference to the parent source.
I also tried artifactId
with property(eg: libarayname-${type}
), but it doesn't look right.
Anyone has an idea?
Upvotes: 2
Views: 691
Reputation: 32567
What you should actually use is a classifier. Check the maven-jar-plugin
for more info on how to produce more than one artifacts from a single project. For example, if the project is called foo
, then you can have foo-1.2.3
and foo-1.2.3-jdk14
, or something along those lines.
Upvotes: 0
Reputation: 3354
You should try using the assembly plugin
Use two different assembly descriptors, and you will also be able to specify different MANIFEST files. See the plugin usage for more info.
You two libraries can then be generated with different classifiers, so that other project can depend on any.
Upvotes: 1
Reputation: 13821
You can customize the MANIFEST.MF by configuring the maven archiver plugin
A "brute force" approach to what you're trying to achieve is to create a maven profile for each variation of MANIFEST.MF that you need.
Upvotes: 0