Maven 2.x WAR Plugin

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

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 2.1-alpha-1
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

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 ?

Activity

Hide
Dennis Lundberg added a comment -

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?

Show
Dennis Lundberg added a comment - 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?
Hide
Dominique Jean-Prost added a comment -

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.

Show
Dominique Jean-Prost added a comment - 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.
Hide
Dennis Lundberg added a comment -

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

Show
Dennis Lundberg added a comment - Using profiles is usually the way to go when you need to have multiple setups for different target environments.
Hide
Dennis Lundberg added a comment -

See previous comments.

Show
Dennis Lundberg added a comment - See previous comments.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: