Adding a classpath element within a Mojo

2014-01-19 Thread William Ferguson
I have a Mojo which needs to add an element to the compile time classpath for future Mojos. I'm struggling to find any doco that points in the right direction. Is it possible? If so, how should I go about it? William

Re: dependencies needed by plugin

2014-01-19 Thread Ron Wheeler
Plug-ins are not part of your code and stuff in the dependency section has no affect on plug-ins. If foo is provided, you probably have to put it in the Java library folder or the Maven folder. You need to go back to the plug-in documentation and see how to include libraries in plug-ins.

Re: dependencies needed by plugin

2014-01-19 Thread Anders Hammar
I have created a mvn plugin called foo that needs a jar file say xyz.jar in order to compile and run. in the pom file of plugin project foo I have provided xyz.jar with provided scope in the dependencies section. That is most likely not correct. If your plugin requires the xyz artifact it

Re: Adding a classpath element within a Mojo

2014-01-19 Thread Anders Hammar
Do you want to change the classpath of the project or of other mojos? Don't think either is possible. And if it was, I don't think it's wise. The dependencies of the project should be declared and not magically added. /Anders On Sun, Jan 19, 2014 at 1:18 PM, William Ferguson

Property that indicates a snapshot or release build?

2014-01-19 Thread Graham Leggett
Hi all, Does there exist a property in maven that will indicate in some fashion whether the build is a snapshot build or a release build? I am aware that -SNAPSHOT appears in the version number, but that won't do. I'm after a variable that has one of two discrete values, one predictable value

Re: Property that indicates a snapshot or release build?

2014-01-19 Thread Anders Hammar
Yes, there is methods isSnapshot() and isRelease() if you get the Artifact object. See [1]. /Anders [1] http://maven.apache.org/ref/3.1.1/maven-artifact/apidocs/index.html On Sun, Jan 19, 2014 at 4:43 PM, Graham Leggett minf...@sharp.fm wrote: Hi all, Does there exist a property in maven

Re: Property that indicates a snapshot or release build?

2014-01-19 Thread Graham Leggett
On 19 Jan 2014, at 5:59 PM, Anders Hammar and...@hammar.net wrote: Yes, there is methods isSnapshot() and isRelease() if you get the Artifact object. See [1]. /Anders [1] http://maven.apache.org/ref/3.1.1/maven-artifact/apidocs/index.html Is there a practical example anywhere of how this

Re: Property that indicates a snapshot or release build?

2014-01-19 Thread Anders Hammar
Don't understand. You need to, through code, get hold of the artifact objects. /Anders On Sun, Jan 19, 2014 at 5:17 PM, Graham Leggett minf...@sharp.fm wrote: On 19 Jan 2014, at 5:59 PM, Anders Hammar and...@hammar.net wrote: Yes, there is methods isSnapshot() and isRelease() if you get

Re: Property that indicates a snapshot or release build?

2014-01-19 Thread Graham Leggett
On 19 Jan 2014, at 6:20 PM, Anders Hammar and...@hammar.net wrote: Don't understand. You need to, through code, get hold of the artifact objects. I am trying to get access to this from a property. What I need is a property that I can embed in a path inside the pom. If the artefact is a

Re: Property that indicates a snapshot or release build?

2014-01-19 Thread Anders Hammar
OK, then I don't know. Don't think there is a property. /Anders On Sun, Jan 19, 2014 at 5:24 PM, Graham Leggett minf...@sharp.fm wrote: On 19 Jan 2014, at 6:20 PM, Anders Hammar and...@hammar.net wrote: Don't understand. You need to, through code, get hold of the artifact objects. I am

Re: Property that indicates a snapshot or release build?

2014-01-19 Thread Dan Tran
Sounds like a candidate enhancement for build-helper-maven-plugin -D On Sunday, January 19, 2014, Graham Leggett minf...@sharp.fm wrote: On 19 Jan 2014, at 6:20 PM, Anders Hammar and...@hammar.netjavascript:; wrote: Don't understand. You need to, through code, get hold of the artifact

Re: Adding a classpath element within a Mojo

2014-01-19 Thread William Ferguson
OK, let me clarify. Project has dependencies on artifacts of type AAR (Android archive - an archive that contains several sub-artifacts including a classes jar). My Mojo unpacks the AAR artifacts and makes the sub-artifacts available to other build components. One of those build components is

Re: Adding a classpath element within a Mojo

2014-01-19 Thread Ron Wheeler
I don't do any Android development but since no one had responded, I thought that I wight try to get you started (or unblocked). Perhaps some of these references will help. http://www.vandalsoftware.com/post/52468430435/publishing-an-android-library-aar-to-a-maven

Re: Adding a classpath element within a Mojo

2014-01-19 Thread William Ferguson
Hi Ron, appreciate the references, but I am not attempting to build an Android project, I am working on the android-maven-plugin which builds Android projects. The AAR consumption within android-maven-plugin is currently incomplete. Ie I need to know how to add a compile time dependency within

Re: Property that indicates a snapshot or release build?

2014-01-19 Thread Dan Tran
Sounds like a candidate enhancement for build-helper-maven-plugin -D On Sunday, January 19, 2014, Graham Leggett minf...@sharp.fm wrote: On 19 Jan 2014, at 6:20 PM, Anders Hammar and...@hammar.netjavascript:; wrote: Don't understand. You need to, through code, get hold of the artifact

Re: Property that indicates a snapshot or release build?

2014-01-19 Thread Baptiste Mathus
+1. At least I agree I don't think there's already a property for that. Le 19 janv. 2014 22:20, Dan Tran dant...@gmail.com a écrit : Sounds like a candidate enhancement for build-helper-maven-plugin -D On Sunday, January 19, 2014, Graham Leggett minf...@sharp.fm wrote: On 19 Jan 2014, at