Issue Details (XML | Word | Printable)

Key: MWAR-147
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Dominique Jean-Prost
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven 2.x WAR Plugin

add the possibility to use the inplace goal with a specific out directory

Created: 27/Feb/08 10:41 AM   Updated: 19/Feb/09 09:56 AM
Component/s: None
Affects Version/s: 2.1-alpha-1
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide

I actually use war:exploded to speed up my development. I configured the webappDirectory so that the war gets produced in my jboss deploy directory.

As war:exploded is bound to package phase, when I use mvn package, I then get a .war in my target dir and the exploded war in my jboss dir which not what I want.

So I tried to use war:inplace, as it does what exploded does, but not bound to the package lifecycle. But inplace does not allow to override the out directory.

So what I would like is to have a goal that allows me to have the exploded war in a specific directory, but I would like this goal to be not bound to the package lifecycle. Could you add this feature to the inplace goal ?



Dennis Lundberg added a comment - 17/Feb/09 02:45 PM

war:inplace will "Generate the webapp in the source directory", so you are not allowed to change the output directory for that goal.

What is it with war:explode that doesn't work for you? Can you explain your use case a bit more?


Dominique Jean-Prost added a comment - 18/Feb/09 02:08 AM

Basically, I needed 2 different behaviour :

  • one for my development in exploded mode, where output Dir is in place A (in my jboss dir)
  • one for my development in "normal mode" where package artifacts (and "temporay files") are under the target dir.

As war:exploded is bound to package phase, if I change the webappDirectory for my "exploded development period", it also impacts the package phase. That's why I suggested to "improve" the war:inplace as this goal is not bound to package phase, and so has no impact to the package "goal".

I finally used 2 different profiles to achieve what I wanted, where they define the target dir. As I write this comment, I realize I could also setup my jboss so that it scans my target dir too. Maybe the latter is the correct solution.


Dennis Lundberg added a comment - 19/Feb/09 09:56 AM

Using profiles is usually the way to go when you need to have multiple setups for different target environments.