Re: Antrun and profiles
2009/10/15 Jörg Schaible > > and you can define the phase for an execution. Typically a delete task can > be run in the "clean" phase while copy is often something > for "generate-resources". > > yes, I did that already as I saw that the above solution worked perfectly, but thanks anyway :) --Sven
Re: Antrun and profiles
That helped, thanks! --Sven 2009/10/15 Stephen Connolly > put the configuration into the execution > > e.g. > > > > > > .. > > > > > > and not outside > > > > > .. > > > > .. > > > > > 2009/10/15 Sven Preßler > > > Hi, > > > > I've got 2 antrun tasks: The first one should delete some files, the > second > > copies some files. > > The copy-task is in a profile, since I don't need it every time. > > However, if I need it, the configuration of the ant-tasks get merged. > > Apart from the problem that the tasks get merged in the wrong order (copy > > before delete, but delete is defined before copy in the pom), I want the > > tasks to be executed in different phases -> so when the configuration > gets > > merged, both tasks get to be executed in either phase. > > Is there a solution for maven 2.0.9? I remember reading some jira-Entry > > that > > there was a problem with such kind of things, but don't remember exactly. > > And does the problem still exist in newer versions of maven? > > > > thanks, > > Sven > > >
Re: Antrun and profiles
I just found http://jira.codehaus.org/browse/MNG-1847 and http://jira.codehaus.org/browse/MNG-1701 This doesn't solve my problem, but answers my question, I think. --Sven 2009/10/15 Sven Preßler > Hi, > > I've got 2 antrun tasks: The first one should delete some files, the second > copies some files. > The copy-task is in a profile, since I don't need it every time. > However, if I need it, the configuration of the ant-tasks get merged. > Apart from the problem that the tasks get merged in the wrong order (copy > before delete, but delete is defined before copy in the pom), I want the > tasks to be executed in different phases -> so when the configuration gets > merged, both tasks get to be executed in either phase. > Is there a solution for maven 2.0.9? I remember reading some jira-Entry > that there was a problem with such kind of things, but don't remember > exactly. > And does the problem still exist in newer versions of maven? > > thanks, > Sven >
Antrun and profiles
Hi, I've got 2 antrun tasks: The first one should delete some files, the second copies some files. The copy-task is in a profile, since I don't need it every time. However, if I need it, the configuration of the ant-tasks get merged. Apart from the problem that the tasks get merged in the wrong order (copy before delete, but delete is defined before copy in the pom), I want the tasks to be executed in different phases -> so when the configuration gets merged, both tasks get to be executed in either phase. Is there a solution for maven 2.0.9? I remember reading some jira-Entry that there was a problem with such kind of things, but don't remember exactly. And does the problem still exist in newer versions of maven? thanks, Sven
Re: Including a local jar
Hi, There is a difference between dependencies and dependencyManagement, see [1]. dependencyManagement manages versions of dependencies, it doesn't include them. In this case: just discard the -tag and it should work. -Sven [1] http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html 2009/9/9 Jeremy Jones > Hello, > > > > In my current build from maven, it acts like it does not have classes > included for compilation. When I do a manual install, it doesn't make a > difference. I have also tried adding a dependency tag like so(with > specifics changed): > > > > > > > >... > > > >etc. > >etc. > >some version > > > > > > > > > > > > It still doesn't seem to make a difference. I guess my question is, how > do I have maven include this jar in order to properly compile the code? > > > > Thanks, > > Jeremy > >
Re: Can we write a custom webapp plugin that uses the war plugin and its configruation?
Hi Jörg, never thought of that, thanks. Didn't have any problems so far, though. -Sven 2009/8/26 Jörg Schaible > Hi Sven, > > Sven Preßler wrote: > > > You might want to take a look at the maven-inherit-plugin: > > http://www.ops4j.org/projects/pax/construct/maven-inherit-plugin/ > > Honestly, this plugin leads directly into Maven plugin dependency hell. If > you like to have arbitrary side effects in multi-project builds, well, go > ahead and use it - otherwise stay as far away as you can. > > Why? Maven will load each plugin only once. Now, if you write an extension > to the maven-compiler-plugin and refer e.g. version 2.0 as dependency and > in your POM you declare the maven-compiler-plugin with version 2.2, it > depends on your build order which version of the compiler plugin is used. > However, from your POM you'll never ever recognize that this extension will > actually inject an old version of the maven-compiler-plugin and it might > simply fail on unknown configuration elements or the other way round, your > extension plugin can fail, because the newer version is no longer > compatible (Maven plugins are never required to be binary compatible). > > - Jörg > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Can we write a custom webapp plugin that uses the war plugin and its configruation?
You might want to take a look at the maven-inherit-plugin: http://www.ops4j.org/projects/pax/construct/maven-inherit-plugin/ -Sven 2009/8/25 Anil-C > > I am trying to create a new plugin webapp with two goals clean and refresh > to > extend the functionality of the maven-war-plugin. webapp:clean would clean > the webappDirectory and webapp:refresh would refresh the warSourceDirectory > and apply modifications to the webappDirectory (similar to war:exploded but > doesn't proces the source directory) skipping the web.xml (guessed it > right, > hotdeploy for jsp's, tags, images alone) and ofcourse use the configuration > defined in maven-war-plugin as it is like any filtering, blah blah, without > . > > The way i am hoping to achieve this is,get hold of the maven-war-plugin > instance based on the project pom somehow and invoke custom methods with in > that Mojo. I don't know if there is a way to do the first part? > > I have digged through the users forum and the tutorials/blogs available on > maven plugin development. However, i couldn't find a good example that i > can > refer to in my situation. I am not experience plugin writer (infact this is > the first onmy own, apart from the standard hello world examples). Any > suggesstions that can help me getting through my first plugin is greatly > appreciated. > > Thank you > Anil > -- > View this message in context: > http://www.nabble.com/Can-we-write-a-custom-webapp-plugin-that-uses-the-war-plugin-and-its-configruation--tp25140948p25140948.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: Can aggregator be other type than pom?
What's so bad about having one extra pom for your project structure? 2009/8/25 Edelson, Justin > no. > not sure about that: In a project with pom you could define a tag and do some stuff. So it is possible to do something like this: POMA pom B B ... But you lose the benefits of all the default stuff that's performed during a packaging:jar build, so I guess having one extra pom for the project structure isn't too bad and a lot less to write... -Sven > > > > From: solo1970 [mailto:sonia.lodoviche...@ericsson.com] > Sent: Tue 8/25/2009 11:15 AM > To: users@maven.apache.org > Subject: Can aggregator be other type than pom? > > > > > Hello, > > I have the followng scenario: Currently I have 1 POM that generates a jar > file. I want to separate some code (B) in a separate jar file and add it > as a dependency, but want to minimize the number of POM files I need to > write... > > Can I do this? > POMA > jar > B > B > > > POMB > jar > > Any ideas? > > Sonia > -- > View this message in context: > http://www.nabble.com/Can-aggregator-be-other-type-than-pom--tp25136362p25136362.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: Problem with updating non-unique snapshot versions of a plugin
hmm, interesting, thanks! I actually just deleted the metadata-local files in the remote repository, since your answer made me check for the file structure of other plugins in the remote repo... and now it's working, great! Thanks, Sven 2009/8/20 Stephen Connolly > 2009/8/20 Sven Preßler : > > 2009/8/20 Stephen Connolly > > > >> 2009/8/12 Sven Preßler : > >> > Hello, > >> > > >> > I'm currently using maven 2.0.9. > >> > I've got a project X which uses a Plugin my-plugin with version > >> > 1.0-SNAPSHOT. > >> > How do I force maven to update this plugin from the repository, no > matter > >> > what? > >> > I tried the following: make some changes to the plugin, build it with > >> >>mvn package > >> > and upload the newly created .jar to the repository. > >> > >> how exactly are you doing the upload? > >> > >> There is maven metadata that needs to be updated, if you are not using > >> a repository manager that knows how to do this, and are instead > >> uploading by hand, then this would completely explain your problems > >> > >> -Stephen > >> > > > > > > I'm uploading via a svn commit. > > I commit the .jar and I also commit updated versions of the two > > maven-metadata-local.xml files (I edit the timestamp by > hand) > > Are there other files involved that need to be changed? > > > > Aha! > > You are doing it all wrong! > > Remote repositories and local repositories are not the same thing. > > You cannot use a local repository as a remote repository. > > The short answer is get yourself a good repository manager (e.g. nexus > or artifactory) > > The long answer is get yourself a good repository manager or else use > a webdav based repository and deploy to it only using the maven deploy > plugin (i.e. deploy:deploy-file or deploy:deploy) > > If you insist on doing what you are doing then you will end up with > the issues you are seeing > > -Stephen > > > Sven > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Problem with updating non-unique snapshot versions of a plugin
2009/8/20 Stephen Connolly > 2009/8/12 Sven Preßler : > > Hello, > > > > I'm currently using maven 2.0.9. > > I've got a project X which uses a Plugin my-plugin with version > > 1.0-SNAPSHOT. > > How do I force maven to update this plugin from the repository, no matter > > what? > > I tried the following: make some changes to the plugin, build it with > >>mvn package > > and upload the newly created .jar to the repository. > > how exactly are you doing the upload? > > There is maven metadata that needs to be updated, if you are not using > a repository manager that knows how to do this, and are instead > uploading by hand, then this would completely explain your problems > > -Stephen > I'm uploading via a svn commit. I commit the .jar and I also commit updated versions of the two maven-metadata-local.xml files (I edit the timestamp by hand) Are there other files involved that need to be changed? Sven
Re: Problem with updating non-unique snapshot versions of a plugin
hmm, no response for a week, I guess that answers my question with 'no, no, yes'... 2009/8/12 Sven Preßler > Hello, > > I'm currently using maven 2.0.9. > I've got a project X which uses a Plugin my-plugin with version > 1.0-SNAPSHOT. > How do I force maven to update this plugin from the repository, no matter > what? > I tried the following: make some changes to the plugin, build it with > >mvn package > and upload the newly created .jar to the repository. > I do that, because I want to simulate the situation on the build server, on > which I cant just compile the latest version of my plugin. > Now when I try to build project X with > >mvn package -U, I get something like > [INFO] snapshot group:my-plugin:1.0-SNAPSHOT: checking for updates from > m2repo-plugins > but nothing is downloaded, I checked the .jar in my local repository, but > it's unchanged. > > I found that it's possible to recreate (or something like that) the local > repository with > >mvn dependency:purge-local-repository > However, this only seems to work if I create a -entry for my > plugin and even if I do that, it's not really a good solution, since I > cannot run a command like that on our build server. > > Then I found this issue: http://jira.codehaus.org/browse/MNG-2839 > It's a bit different than my problem, so I'm not sure if I'm actually > facing the same problem. > So my question is: Is there any quick solution to this problem, did I miss > something > or do I just have to wait for the Fix Version 2.2.x as described in the > issue? > > Thanks, > Sven >
Problem with updating non-unique snapshot versions of a plugin
Hello, I'm currently using maven 2.0.9. I've got a project X which uses a Plugin my-plugin with version 1.0-SNAPSHOT. How do I force maven to update this plugin from the repository, no matter what? I tried the following: make some changes to the plugin, build it with >mvn package and upload the newly created .jar to the repository. I do that, because I want to simulate the situation on the build server, on which I cant just compile the latest version of my plugin. Now when I try to build project X with >mvn package -U, I get something like [INFO] snapshot group:my-plugin:1.0-SNAPSHOT: checking for updates from m2repo-plugins but nothing is downloaded, I checked the .jar in my local repository, but it's unchanged. I found that it's possible to recreate (or something like that) the local repository with >mvn dependency:purge-local-repository However, this only seems to work if I create a -entry for my plugin and even if I do that, it's not really a good solution, since I cannot run a command like that on our build server. Then I found this issue: http://jira.codehaus.org/browse/MNG-2839 It's a bit different than my problem, so I'm not sure if I'm actually facing the same problem. So my question is: Is there any quick solution to this problem, did I miss something or do I just have to wait for the Fix Version 2.2.x as described in the issue? Thanks, Sven