grieve
grieve

Reputation: 13508

Is there a way to make Maven build 1.5 and 1.6 bytecode jars simultaneously?

Is there a way to make maven build 1.5 and 1.6 bytecode jars simultaneously. I know I can use classifiers to name them, but this forces to me to build them separately. I would ultimately like to do the following:

mvn clean install

And in my target directory see something like:

fooSource.jar
foo-1.6.jar
foo-1.5.jar

Upvotes: 2

Views: 510

Answers (2)

Pascal Thivent
Pascal Thivent

Reputation: 570545

Is there a way to make maven build 1.5 and 1.6 bytecode jars simultaneously?

No, you'll have to run two clean builds. I'd use profiles and a CI engine supporting build matrix for this (Hudson does).

Upvotes: 1

Bozho
Bozho

Reputation: 597304

You can try using sub-projects (modules) with different compiler configurations.

But except for installing the repository, this wouldn't be useful. Instead you can use maven profiles in order to generate different artifacts in different cases.

Upvotes: 1

Related Questions