the problem with that us always going to be transitives...
if I depend on your module, unless I know how to get the property
values, I will be unable to get your transitive dependencies... so as
such the only way maven could determine what your transitive
dependencies are, would be to fire up a lifecycle on your pom... but I
only have your pom downloaded from the remote repo, and not your full
project...
that is why what you are trying to do is a bad plan... perhaps if you
describe your ultimate end game, but I suspect you are putting
scripting into your pom because you want to avoid creating a maven
plugin for "this one special case"... sometimes it's just easier to
create a plugin...
we have one project that did some code generation by using a peel
script to parse a C++ header file generate some XML which was then
passed through xslt to generate the java source code... it's a one
off... but in the end it was better off writing a maven plugin... and
now we gave replaced the perl with java code to parse... so our whole
build is now in java... easier bootstrap for new devs
but 3 years ago I almost said, just hack it with antrun and exec...
Sent from my [rhymes with tryPod] ;-)
On 21 Feb 2010, at 13:19, eyal edri <[email protected]> wrote:
hi,
is it possible to read a property that is calculated by maven in
runtime:
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.install</groupId>
<artifactId>JavaInstaller</artifactId>
<packaging>pom</packaging>
<version>0.0.2-SNAPSHOT</version>
<name>Java Installer</name>
<description>Installer for maven java projects</description>
<parent>
<groupId>com.company.maven.pom</groupId>
<artifactId>CtchParent</artifactId>
<version>0.0.16-SNAPSHOT</version>
</parent>
* <properties>*
* <installedVersion>0.0.1-SNAPSHOT</installedVersion>*
* </properties>*
<dependencies>
<dependency>
<groupId>${installedGroupId}</groupId>
<artifactId>${installedArtifactId}</artifactId>
* <version>(${installedVersion},)</version> -> this will
install the
latest version available from the repo.*
</dependency>
</dependencies>
can i access the project.dependencies.dependency.version value?
i need it in a groovy code that is run afterward using GMaven plugin.
thanks!
--
Eyal Edri
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]