maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Sand" <>
Subject input artifacts to plugin
Date Fri, 12 Jul 2013 16:45:30 GMT
Hi all - another hopefully simple question:

Can I add a custom configuration property to my plugin which takes in the
normal <dependencies><dependency>......</ schema used in the build? E.g.
instead of calling mavenProject.getArtifacts() to get a Set<Artifact> for
the build, I'd have a @Property Set<Artifact> which maven will still resolve
& manage but specifically for use by the plugin.

As a sample, this is what I want to put into the pom.xml:


And in the plugin code:

	 * Other artifacts to include in obfuscation
	Set<Artifact> includedArtifacts

This doesn't work of course - Artifact cannot be instantiated... can someone
give me some hints for which portions of the API can help achieve what I'm
trying to accomplish?

Another option I have is to use a Set<String> and just enter the toString
representation of an artifact, and then look through
mavenProject.getArtifacts() to find a match. That just seems a hack to
require two different formats for specifying artifacts, but if it's the only
way, so be it.

Thanks for any input!

Richard Sand | CEO
IDF Connect, Inc. 
2207 Concord Ave, #359
Wilmington | Delaware 19803 | USA 
Office: +1 302 425 0516 | Fax: +1 856 866 1899
Mobile: +1 267 984 3651

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message