maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <>
Subject Re: How to compile twice
Date Wed, 25 May 2011 17:43:26 GMT
2011/5/25 Ron Wheeler <>

> On 25/05/2011 10:58 AM, David McCabe wrote:
>> In that case, how does one handle a single module build that produces
>> multiple artefacts? Is this 'not the Maven way'? What about multi-platform
>> builds? What about multiple output types (header files, DLLs, import
>> libraries and JNI JARs)?
>> I'm getting very confused by this, because the 'Maven way' seems to
>> indicate
>> that I should have the following:
>> imaging-core-win32-x86-dll
>> imaging-core-win32-x86-lib
>> imaging-core-win32-x64-dll
>> imaging-core-win32-x64-lib
>> imaging-core-osx-x86-so
>> imaging-core-osx-x64-so
>> imaging-core-linux-glibc22-x86-so
>> imaging-core-jar
>> imaging-core-includes
>> ...
>> as separate *modules* and then build each of these separately, rather than
>> simply building several things with different classifiers. That is a
>> nightmare. Maven must surely be suitable for more than collections of
>> JARs.
>> What have I missed?
> In what sense is this a nightmare?
>  You have to be smart about how you build up your application but in the
> end you have a neat structure that is easy to maintain since all of the
> Win32-x86 code is in one place and the windows version maintainer/developer
> does not have to worry about the core and includes since they are generic
> and can not break the linux or osx versions accidently.

I disagree here.
The concept of "architecture" is well established in the native compilation
world. This is a thing that Maven does not understand, at least "natively".
IMHO the classifier could be used in this use case, and it is in fact used,
for example, in maven-retrotranslator-plugin to provide Java 1.4-compatible
packages of the same artifact.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message