To me that seems over complicated in that you need a whole other sub- system in Maven to define the requirements of a target. Why not just state explicitly what the target needs and dispense with the rest of the machinery. Dependencies accrued via profiles is a very nasty beast in the project builder.

On 31-Jul-08, at 7:59 AM, Daniel Kulp wrote:


Yea, there are bunches of examples. Any JAX-WS or JAXB thing wouldn't need the jaxb/jaxws api jars if running on Java 6. Recent xml apis are in java 5. Java 7 will probably have a ton of other things.

I'm wondering if we could activate profiles based on classifiers.

<profile>
   <activation>
        <classifier>jdk15</classifer>
   </activation>
   <dependencies>
       .....
   </dependencies>
</profile>

or similar.

Dan


On Jul 31, 2008, at 10:53 AM, Jochen Wiedmann wrote:

On Thu, Jul 31, 2008 at 4:43 PM, Jason van Zyl <[EMAIL PROTECTED]> wrote:

If it is the case where it is common that for a given GAV the classified artifact requires different dependencies then I think we have some flaws in
the system.

But that seems to be quite naturally to me. Consider the case of a jar file which has been processed by RetroTranslator or something similar.
The artifact with the jdk14-classifier might (for example) need
additional retrotranslator libraries. It might also need jaxp3 and
lots of other stuff thats in JDK 1.5 by default.


That said, if people know of many cases where a classified artifact does indeed require changes in the dependency set I don't think we can use classifiers. The asymmetry in the requirements for an artifact with a classifier look problematic in this case. For an artifact that participates in a build or runtime, it needs a POM of its own if the system is going to
be deterministic.

Ok, but in that case I would also suggest to reconsider the "one
artifact per project" dogma. At least, I wouldn't be overly happy to
split a lot of projects into multiple just because they finally run
retrotranslator to obtain a JDK 1.4 version.


Jochen


--
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.

  -- Jacques Ellul, The Technological Society


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to