Yep, I'm aware of the property option, just seems silly to add a property (when it's just the version info for ONE dependency) - when the version isn't truly needed.
Anyway - thanks all for the replies! -----Original Message----- From: Damon Silver [mailto:[email protected]] Sent: Wednesday, June 17, 2009 8:26 PM To: 'Maven Users List' Subject: RE: dependency version in a property If it's a property in a parent pom that you explicitly set, it's available as a property in the child pom, so you could access the version being used via "${junit.version}" in your script invocation. -----Original Message----- From: EJ Ciramella [mailto:[email protected]] Sent: Wednesday, June 17, 2009 5:07 PM To: Maven Users List Subject: RE: dependency version in a property I want the other way around :-) I have a <dependencyManagement> tag and a dependency listed in there (all in a parent pom). Then, in a child module, I need the version of a dependency so I can put that version info INTO a shell script. I can see some things using ${project.artifacts}, I just don't know how to pluck out the dependency from that list successfully. I tried things like ${project.artifacts..... With the groupID or artifactId or the combination of both with no luck. -----Original Message----- From: Damon Silver [mailto:[email protected]] Sent: Wednesday, June 17, 2009 8:04 PM To: 'Maven Users List' Subject: RE: dependency version in a property Something like this should work: <build> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> </dependencies> </build> ... <properties> ... <junit.version>4.4</junit.version> ... </properties> - Damon -----Original Message----- From: EJ Ciramella [mailto:[email protected]] Sent: Wednesday, June 17, 2009 4:54 PM To: [email protected] Subject: dependency version in a property Is there a way to get a dependency version in a property? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
