War plugin (2.1-beta-1,*] problem
Hi, I have an application which was working with maven 2.1-beta-1 quite good. However after upgrading my war plugin I started to have a problem regarding packaging my application. Short decription: Running this command mvn clean war:exploded package Detailed Description: I would like to make some processing at files which are at *target* folder of my application. I have a plugin for this which is working at prepare-package phase of maven. Shortly 1) Create an exploded directory of project 2) Make necessary processing at prepare package phase 3) Create a war which has processed files After upgrading my maven war plugin it started to work not like before. After second step, It is again copying files from project and as a result of that my processed files are deleted because of war plugin. Any help? Thanks -- View this message in context: http://maven.40175.n5.nabble.com/War-plugin-2-1-beta-1-problem-tp3384365p3384365.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
Re: War plugin (2.1-beta-1,*] problem
Also tried such configuration to test. It is still changing that processed files with unprocessed files. org.apache.maven.plugins maven-war-plugin 2.1.1 prepare-war prepare-package exploded -- View this message in context: http://maven.40175.n5.nabble.com/War-plugin-2-1-beta-1-problem-tp3384365p3384392.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
Re: War plugin (2.1-beta-1,*] problem
Hi, I am not sure that I understood everything very good but I changed my custom plugin lifecycle to 'process-resources'. It did not help me as I expected. (Cmd: "mvn clean war:exploded package") At the logs I could see successfully processed files. My custom plugin is processing sources without any problem. War goal of the war plugin is changing files I am sure about this. I tested with (*,2.1-beta-1] and I have not encountered any problem. Just newer version of the 2.1-beta-1 has this problem. By the way, It might be helpful "mvn clean war:exploded prepare-package" is working great too as a flat directory. thanks Marc Rohlfs wrote: > > Just for curiosity: what happens if You configure the 'prepare-war' > execution of Your test configuration for the 'process-resources' phase? > As Your custom plugin goal and the 'war:exploded' goal are both > configured for the same phase, are You sure that they're really executed > in the estimated order? > > -- View this message in context: http://maven.40175.n5.nabble.com/War-plugin-2-1-beta-1-problem-tp3384365p3384464.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
Re: War plugin (2.1-beta-1,*] problem
Hi, I attached a sample project. You can compare with mvn clean prepare-package and mvn clean package Check test.txt file and note that maven replace plugin logs. http://maven.40175.n5.nabble.com/file/n3384991/Test.zip Test.zip Also I dont know how did you conclude that I have not enough knowledge about lifecycle... Anyway. Thanks -- View this message in context: http://maven.40175.n5.nabble.com/War-plugin-2-1-beta-1-problem-tp3384365p3384991.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
Re: War plugin (2.1-beta-1,*] problem
Hi Marc, Firstly, the configuration what you suggessted solved our problem. Actually before posting last example here, I checked out source of the war plugin and checked difference between two version of the files. I noted that there was a change in the behaviour of the cache mechanism of the war plugin. Then I made such a configuration generate-resources exploded test2 package war true I configured war plugin to work war goal with cache as I stated above. However It couldnt help me to solve it. Then I noticed in your example you configured plugin directly instead of execution. >From this problem I understood that I should always an example to make things clearer. :) But another question, why didnt my configuration work? http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html Thanks -- View this message in context: http://maven.40175.n5.nabble.com/War-plugin-2-1-beta-1-problem-tp3384365p3385840.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
Re: War plugin (2.1-beta-1,*] problem
Hi Marc! You really made my day. Thank you very very much. I dont know how to thank you. Have a nice day. -- View this message in context: http://maven.40175.n5.nabble.com/War-plugin-2-1-beta-1-problem-tp3384365p3386181.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
Parent Pom and maven goals for only war projects
Hi, I have a multi module maven project. It has 5 module and 2 of them are web projects. I want to customize my plugins to be run at only war projects. I mean at parent pom level I would like to trigger my goals and only my war projects will be affected. Is there any way for it? As a result of this, I will not have duplicated configurations at my war projects pom. Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Parent-Pom-and-maven-goals-for-only-war-projects-tp4582234p4582234.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
Re: Parent Pom and maven goals for only war projects
thanks guys for your attention. I have solved my problem as @stephenconnolly described. But I will keep in my mind your suggestions. -- View this message in context: http://maven.40175.n5.nabble.com/Parent-Pom-and-maven-goals-for-only-war-projects-tp4582234p4585936.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
Relative path to parent directory at multi module maven project
I have 3 level multi module maven project. I want to utilize a common plugin configuration at parent pom and the rest of the 2nd and 3rd level modules will utilize this configuration. The plugin configuration has a configuration file for 3rd level modules such as: ../../conf/myplugin But this configuration could not be used by 2rd level modules. They need ../conf/myplugin What is the best way to use a common path for all modules in a project even at root parent pom? -- View this message in context: http://maven.40175.n5.nabble.com/Relative-path-to-parent-directory-at-multi-module-maven-project-tp4611798p4611798.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
Re: Relative path to parent directory at multi module maven project
I was really expecting something very very simple. :) I think that we should file an issue regarding that. What we are trying to do is really very simple and essential. Maybe properties should has another attribute like "final" which is forbidding to be overwritten by children modules? What are your opinions? -- View this message in context: http://maven.40175.n5.nabble.com/Relative-path-to-parent-directory-at-multi-module-maven-project-tp4611798p4614958.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
Re: Relative path to parent directory at multi module maven project
@stephenconnolly Sorry but I could not understand your point exactly. Could you explain a little bid more? You mean because of being at another folder such as my repository it will point somewhere else? Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Relative-path-to-parent-directory-at-multi-module-maven-project-tp4611798p4615533.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
Re: Relative path to parent directory at multi module maven project
Thanks for detailed explanation. In order to not having relative path problems at our build server each modules has it is own script and common workplace. I will keep in my mind your suggestions. I am strongly agree with your opinion. Is there any resource for Maven patterns/antipatterns? Cem -- View this message in context: http://maven.40175.n5.nabble.com/Relative-path-to-parent-directory-at-multi-module-maven-project-tp4611798p4616145.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
Maven 3 and Timestamps
I have various questions regarding Maven 3 and Nexus repository. At our nexus repository I would like to resolve only timestamp dependencies. That is to say I would like to prevent downloading timestapped dependencies to my local repository. And also at my nexus configuration having only latest snapshot jar for a version is totally fine. My question is regarding timestamped dependencies at nexus and local repository. 1 - Is having only latest Snapshot at repository a good practice? Why or why not? 2 - I have done at my plugin management section of the parent pom of the deploy plugin false but at hudson I still continue to see timestamps at jar like this bundle-service-client-1.0-20110209.145744-25 3 - I have came across a comment at another question: "The timestamped artifacts should never be see inside your local (~/.m2/repository) repository. If they are, something is wrong." Why? Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Maven-3-and-Timestamps-tp4898232p4898232.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
Maven Enforcer Rule for Having annotation
Hi, Simply I would like to check all classes at a certain package has an annotation. For this requirement, I have thought that enforce plugin rule could be great but I dont know how to load all classes from file system. Is there a simple way to load all classes from target directory? Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Maven-Enforcer-Rule-for-Having-annotation-tp4909485p4909485.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
Re: Multi modules release best practices
We were almost in same situation and after deeply analyzing projects such as Jetty, Camel etc. concluded that the best practice for us releasing all of the modules at one time even if some projects haven't changed. At first it seems that there is nothing changed but it has very crucial side effects. Tests. Each release should increase the safety level of the library despite of unchanging. The key point here is correct classification. If you feel that all of your libraries are tightly coupled to each other, I feel that you are in the correct way to release all of them at one time. However separating API modules to another project seems more reasonable for me in order to prevent confusion for your users. -- View this message in context: http://maven.40175.n5.nabble.com/Multi-modules-release-best-practices-tp5061771p5070889.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
Overwritting parent war-plugin webresources
Hi I have a dozen projects utilizing common war configuration at my parent pom pluginManagement as this: ${ui-dir-jsp} ${jsp-for-war} However this configuration is not applicable for new project. I would like to overwrite this configuration but I could be not successful. It still inherites these values despite of not declaring webResources section. I would like to use totally default configuration. How? Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Overwritting-parent-war-plugin-webresources-tp5094555p5094555.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
Re: Overwritting parent war-plugin webresources
Hi Olivier, Brilliant solution :) I have totally forgotten such kind of features. [1] By the way, I would like to thank you for your all contributions by this opportunity. I really like your blog and articles. :) Thanks [1]: http://www.sonatype.com/people/2011/01/maven-how-to-merging-plugin-configuration-in-complex-projects/ -- View this message in context: http://maven.40175.n5.nabble.com/Overwritting-parent-war-plugin-webresources-tp5094555p5094768.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
Re: custom unique version
For those who wants another use case for custom unique version is: At our legacy application based on JPA has persistence.xml. Our domain jars were divided into the two module and they are included at our persistence.xml at like this: SearchV2DS domain-A-${A-version}.jar domain-B-${B-version}.jar Our persistence.xml file is filtered at build time by maven. However because of the unique version of each SNAPSHOT, it can not be filtered correctly. Our persistence provider Eclipse can not locate domain-A-***.jar since the name of it changing daily. Please do not suggest me to use release version of domain A dependency. This domain dependency is changing very rapidly and its daily usage is very critical. I strongly need "custom unique version" of the snapshot and filter my persistense.xml. Still looking for a solution. Thanks -- View this message in context: http://maven.40175.n5.nabble.com/custom-unique-version-tp5159884p5281260.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
Non Recursive Maven as a Pom Configuration
Hi, Is there a way to restrict reactor plugin to forbid running sub modules in a pom configuration. What I want to do is exact equivalent of non recursive parameter ( -N ) of Maven. My parent pom is inherited by all sub modules and my goal is running my pom profile without command line parameter. mvn -Pcheck instead of mvn -Pcheck -N Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Non-Recursive-Maven-as-a-Pom-Configuration-tp5485284p5485284.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
Re: the simplest Maven Project that can possibly work in Intellij?
Simplest way * mvn archetype:generate It helps you create a demo project. Read here [1] * At idea: File, new project, import from external resource, and select your created project folder. You can run your goals. [1]: http://maven.apache.org/archetype/maven-archetype-plugin/usage.html -- View this message in context: http://maven.40175.n5.nabble.com/the-simplest-Maven-Project-that-can-possibly-work-in-Intellij-tp5483841p5485336.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
Re: Non Recursive Maven as a Pom Configuration
Hi Stephen, Thanks for suggestion. This is not applicable because of the 3 level architecture. 2nd level modules might be a parent pom too. :( I though that maybe I might pass -N parameter to reactor plugin. :) It seems this is deliberately disabled. Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Non-Recursive-Maven-as-a-Pom-Configuration-tp5485284p5486055.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