The par packaging not working
The "par" packaging is not working. It is dependent on the org.apache.maven.plugins:maven-par-plugin, but this plugin does not exist. Is it deprecated? I am using the latest maven 3.2.1. How should I make the par package these days? I know this thing is relatively simple: just a collection of jars plus manifest with a few special entries. But I don't want to re-invent the wheel. -- View this message in context: http://maven.40175.n5.nabble.com/The-par-packaging-not-working-tp5788937.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Separate executions for maven-compiler-plugin
I need help with configuring the maven-compiler-plugin to run compiler twice, with different set of source roots and/or different settings for includes/excludes. Based on the documentation, it seemed to be a simple thing to do, but somehow I cannot make it work. It started with the other problem I had (see my other post http://maven.40175.n5.nabble.com/Using-annotationProcessor-in-maven-compiler-plugin-td3298435.html ) . That one I got working, though it feels like magic. Basically I have a class A.java that uses some special annotation, and I have an annotation processor that will create another class A1.java based on A. I also have class B.java that uses A1. Obviously the processor should do its job before the main compilation. Everything worked with this simple configuration: org.apache.maven.plugins maven-compiler-plugin 2.3.2 1.6 1.6 my_processor Except one minor annoying thing: while doing the annotation processing, it tried to compile all classes, including B.java, which uses A1 that does not exist yet. So it gave a message that looked like an error, but it was not a stopper for the further processing. So I thought that in some other situation it may become critical, and I wanted to solve this problem. I actually need to run the compiler two times: 1. Do annotation processing, by setting proc=only, and compile only A.java, with B.java excluded. 2. Compile everything, including A1.java (which is sitting in a different tree "target/generated-sources/annotations"), and B.java. I know that I need to define separate executions, and the manual says that I can configure "default-compile" execution. I tried various configurations, but could not make it work: the default-compile execution could not see the "target/generated-sources/annotations" root, no matter what I tried. I would really appreciate if somebody can give me an example of how this is done. -- View this message in context: http://maven.40175.n5.nabble.com/Separate-executions-for-maven-compiler-plugin-tp3300553p3300553.html Sent from the Maven - Users mailing list archive at Nabble.com.
Re: Using annotationProcessor in maven-compiler-plugin
Thanks Anders, I tried the default value and I got one step ahead, not 100% there yet. First I run the clean build, it generates the source I want under target/generated-sources-annotations. Still complains about the class not found when trying to compile the main tree (I use the generated class there for my test). It is interesting to note that the source generation actually is done before it goes to javac, but apparently it is not visible in the classpath at that point. Then I run the build again (without clean). This time my processor is not called at all - I guess, the framework knows it's job is done already. It compiles the main tree and at this time everything is OK. I tried maven 2.2.1, the same story. So I hope there must be some trick I have to do in configuration to make it run in two steps. What can it be? You mentioned the integration test. How can I see it? -- View this message in context: http://maven.40175.n5.nabble.com/Using-annotationProcessor-in-maven-compiler-plugin-tp3298435p3299293.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Using annotationProcessor in maven-compiler-plugin
I am trying to learn how to use annotationProcessor feature with maven-compiler-plugin 2.3.2 under maven 3. My configuration is below. The processor indeed works and it generates the files. My problem is that the compiler does not see those files during compile phase. What am I doing wrong? I tried to put my generated-sources in different places, under target, directly under the project folder. I tried to use generated-sources/src/main/java structure. Nothing works. = org.apache.maven.plugins maven-compiler-plugin 2.3.2 1.6 1.6 generated-sources/src/main/java com.newamsterdam.framework.flexrecord.FlexRecordProcessor -- View this message in context: http://maven.40175.n5.nabble.com/Using-annotationProcessor-in-maven-compiler-plugin-tp3298435p3298435.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org