You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Oleg Gusakov <ol...@gmail.com> on 2008/12/30 09:16:21 UTC
mercury-ant update
FYI - a new dev. snapshot.
After the first round of testing and discussions mercury-ant has had a
face lift:
* added simplified syntax and a system of defaults - examples in
http://people.apache.org/~ogusakov/sites/mercury-ant/mercury-ant-tasks/howto.html
In the simplest form it could be used as:
<javac srcdir="src/main/java"
destdir="target/classes"
>
<classpath>
<deps> <!-- Defaults (central, local) take care of repositories -->
<dependency name="asm:asm:3.0"/>
</deps>
</classpath>
</javac>
* added reading dependencies from a POM file
<classpath>
<deps>
<dependency name="t:t:1.0::pom" pom="${basedir}/t-1.0.pom"/>
</deps>
</classpath>
* support for some of maven-ant syntax - in the howto doc
* added doc. site at
http://people.apache.org/~ogusakov/sites/mercury-ant - please treat as
work-in-progress, I am still writing it
Thanks,
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: mercury-ant update
Posted by Oleg Gusakov <ol...@gmail.com>.
Hervé BOUTEMY wrote:
> I didn't have time to really look at it, but I like this deps directly into
> classpath!
> really kewl ;)
>
I know man, I was really excited when it all worked! The coolest part is
that <deps> can also be used inside filesets, so you don't need to do
anything special to access files behind artifacts. I have not tested it,
so I will add a UT to showcase this.
> I have only one little question:
>
>> <dependency name="t:t:1.0::pom" pom="${basedir}/t-1.0.pom"/>
>>
> why specify name when you use pom? All the information in in the pom content,
> no? This leads to information duplication, or even worse, inconsistency...
>
It's because Mercury does not know anything about POM files, it only has
a Java object that captures the dependency part of the model. This
design was intentional and came from the requirement to separate
dependency resolution from dependency storage.
As a result - Mercury relies solely on external providers to convert
stored dependencies into Java objects. Naturally - the interface to this
provider is GAV-only: this is the GAV, give me it's dependencies.
So if there is a raw POM file - I have 3 choices:
1. write an interpreter - bad idea as there is too much maven core
involved, and I only need dependencies
2. call project builder to read it this mixes in ProjectBuilder as a
direct dependency and conversion from Maven Artifact to Mercury
Artifact, so I chose to avoid it for now. This is still an option, and
this is how I would do it if this becomes a nuisance
3. require user to supply it. Used this now as the least resistance way
Please let me know if supplying GAV and POM is too much of a burden; I
will switch to #2.
Thanks,
Oleg
Re: mercury-ant update
Posted by Hervé BOUTEMY <he...@free.fr>.
I didn't have time to really look at it, but I like this deps directly into
classpath!
really kewl ;)
I have only one little question:
> <dependency name="t:t:1.0::pom" pom="${basedir}/t-1.0.pom"/>
why specify name when you use pom? All the information in in the pom content,
no? This leads to information duplication, or even worse, inconsistency...
regards,
Hervé
Le mardi 30 décembre 2008, Oleg Gusakov a écrit :
> FYI - a new dev. snapshot.
>
> After the first round of testing and discussions mercury-ant has had a
> face lift:
>
> * added simplified syntax and a system of defaults - examples in
> http://people.apache.org/~ogusakov/sites/mercury-ant/mercury-ant-tasks/howt
>o.html In the simplest form it could be used as:
>
> <javac srcdir="src/main/java"
> destdir="target/classes"
>
> <classpath>
> <deps> <!-- Defaults (central, local) take care of repositories -->
> <dependency name="asm:asm:3.0"/>
> </deps>
> </classpath>
> </javac>
>
>
> * added reading dependencies from a POM file
> <classpath>
> <deps>
> <dependency name="t:t:1.0::pom" pom="${basedir}/t-1.0.pom"/>
> </deps>
> </classpath>
>
>
> * support for some of maven-ant syntax - in the howto doc
>
> * added doc. site at
> http://people.apache.org/~ogusakov/sites/mercury-ant - please treat as
> work-in-progress, I am still writing it
>
> Thanks,
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org