> -----Original Message-----
> Eventually, I found out what was wrong with my code. It took
> me a while... :-)
>
> It seems one cannot use the refid. I changed my Ant-based mojo to:
>
> <classpath>
> <pathelement path="${maven.compile.classpath}"/>
> </classpath>
>
> This works fine now.
I was a bit too fast claiming success.
Final question: does it *really* work, these "maven.<xxx>.classpath"
references?
http://svn.apache.org/viewvc/maven/shared/trunk/maven-script/maven-scrip
t-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java?view
=markup
I attached a complete Ant-based mojo that prints out the
maven.compile.classpath. Actually, it is supposed to do that, but I
always get the following output:
--- start of output ---
hellocp:
[echo] Referring to Maven classpaths
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to execute: Executing Ant script: /hellocp.build.xml
[hellocp]: Failed to execute.
Reference maven.compile.classpath not found.
--- end of output ---
If anyone can tell me what I'm doing wrong, please do so, but meanwhile
I give up on Ant-based mojo's as it just doesn't work for me!
Ringo
*************************************************************
Dit e-mail bericht inclusief eventuele ingesloten bestanden kan informatie
bevatten die vertrouwelijk is en/of beschermd door intellectuele
eigendomsrechten. Dit bericht is uitsluitend bestemd voor de geadresseerde(n).
Elk gebruik van de informatie vervat in dit bericht (waaronder de volledige of
gedeeltelijke reproductie of verspreiding onder elke vorm) door andere personen
dan de geadresseerde(n) is verboden. Indien u dit bericht per vergissing heeft
ontvangen, gelieve de afzender hiervan te verwittigen en dit bericht te
verwijderen.
This e-mail and any attachment thereto may contain information which is
confidential and/or protected by intellectual property rights and are intended
for the sole use of the addressees. Any use of the information contained herein
(including but not limited to total or partial reproduction or distribution in
any form) by other persons than the addressees is prohibited. If you have
received this e-mail in error, please notify the sender and delete its contents.
Ce courriel et les annexes éventuelles peuvent contenir des informations
confidentielles et/ou protégées par des droits de propriété intellectuelle. Ce
message est adressé exclusivement à son (ses) destinataire(s). Toute
utilisation du contenu de ce message (y compris la reproduction ou diffusion
partielle ou complète sous toute forme) par une autre personne que le(s)
destinataire(s) est formellement interdite. Si vous avez reçu ce message par
erreur, veuillez prévenir l'expéditeur du message et en détruire le contenu.
*************************************************************
<project>
<target name="hellocp">
<echo>Referring to Maven classpaths</echo>
<property name="compile_classpath" refid="maven.compile.classpath"/>
<echo message="Compile classpath: ${compile_classpath}"/>
</target>
</project>
<pluginMetadata>
<mojos>
<mojo>
<goal>hellocp</goal>
<!-- this element refers to the Ant target we'll invoke -->
<call>hellocp</call>
<requiresProject>true</requiresProject>
</mojo>
</mojos>
</pluginMetadata>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]