When you say "inplace", I assume you mean a Tomcat instance that is already deployed somewhere. If so, you'll want to use the remote host deployment features of IntelliJ IDEA. Try taking a look at the following help guide documents.If you are running the Ultimate edition of IDEA, these same documents are available via the menu Help > Help Topics. If you are still have questions or run into any difficulties let us know.
Unfortunately, it does not solve my question. When I said "inplace" I mean the ability to load resources from source folders and the compiled classes folder (instead of load them from build folder, it's much more faster because it does not require you to build or move directories).
How can I invoke the Maven goals "war:inplace tomcat:inplace" from Intellij?
OPTION 1 Define a maven run/debug configuration. This has the advantage of being the most configurable and usable with multiple goals.
OPTION 1 METHOD 1 (a bit quicker)
Open the Maven tool window
Expand the maven module and then its "Plugins"
Expand the plugin or plugins whose goal(s) you want to run.
Select the desired goal(s). Use the ctrl key to select multiple goals.
Right click and select "Create [Module name] <goalNames>"
Change the name if desired.
Change any other configurations desired.
Click OK.
You can now run the configuration via the run toolbar or via Alt+Shift+F10 to open a popup listing all run configurations. You can also type Shift+F10 to run the run/debug configuration shown in the run toolbar bar.
You can also just define a Run/Debug configuration from scratch:
OPTION 1 METHOD 2
Run > Edit Configurations (or select "Edit Configurations from the Run toolbar dropdown)
Click the add icon (the plus sign)
Select "Maven"
Configure the maven configuration
On the "Parameters" tab of the "Configuration" tab, enter the goals you want to run. For example: war:inplace tomcat:inplace
Be sure not to forget the "working directory" setting. This is where IDE will look for the pom file
Click OK.
You can now run the configuration via the run toolbar or via Alt+Shift+F10 to open a popup listing all run configurations
You can define maven runner settings in File > Settings > [Project Settings] > Maven > Runner. These can be set/overridden in each run configuration. But it is easier to set here if you will use a consistent configuration.
Finally, you can modify the defaults for a new maven run/debug configuration by:
Run > Edit Configurations (or select "Edit Configurations from the Run toolbar dropdown)
Expand the "Defaults" node
Select "maven"
Set the desired defaults
These changes will only affect new run/debug configurations for the current project.
OPTION 2 Set a hot key to run the goal. The advantage is that it is always quick and easy to launch. With the above, you may need to key commands to launch. Not a big deal for most. But it is for some. The disadvantage is slightly reduced configuration ability and an inability to run multiple goals (to the best of my knowledge).
File > Settings > [IDE Settings] > Keymap
Expand the "Maven Goals" node
Expand the maven module
Select the desired goal. All plugin goals are shown.
Map a hot key
Click OK
For some more information on IntelliJ IDEA's maven integration, take a look at this screencast I recorded for some folks at my office a year or so ago.
Hello Alexandre,
When you say "inplace", I assume you mean a Tomcat instance that is already deployed somewhere. If so, you'll want to use the remote host deployment features of IntelliJ IDEA. Try taking a look at the following help guide documents.If you are running the Ultimate edition of IDEA, these same documents are available via the menu Help > Help Topics. If you are still have questions or run into any difficulties let us know.
http://www.jetbrains.com/idea/webhelp/remote-hosts.html - and its children
http://www.jetbrains.com/idea/webhelp/deployment.html - and its children
http://www.jetbrains.com/idea/webhelp/run-debug-configuration-tomcat.html
Best Regards
Hi Mark, thank you for your help.
Unfortunately, it does not solve my question. When I said "inplace" I mean the ability to load resources from source folders and the compiled classes folder (instead of load them from build folder, it's much more faster because it does not require you to build or move directories).
Please take a look in http://blog.radaczynski.com/2012/12/webapp-development-stack-evolution-aka.html
How can I invoke the Maven goals "war:inplace tomcat:inplace" from Intellij?
Regards,
Alexandre
OPTION 1
Define a maven run/debug configuration. This has the advantage of being the most configurable and usable with multiple goals.
OPTION 1 METHOD 1 (a bit quicker)
You can also just define a Run/Debug configuration from scratch:
OPTION 1 METHOD 2
You can define maven runner settings in File > Settings > [Project Settings] > Maven > Runner. These can be set/overridden in each run configuration. But it is easier to set here if you will use a consistent configuration.
Finally, you can modify the defaults for a new maven run/debug configuration by:
These changes will only affect new run/debug configurations for the current project.
OPTION 2
Set a hot key to run the goal. The advantage is that it is always quick and easy to launch. With the above, you may need to key commands to launch. Not a big deal for most. But it is for some. The disadvantage is slightly reduced configuration ability and an inability to run multiple goals (to the best of my knowledge).
For some more information on IntelliJ IDEA's maven integration, take a look at this screencast I recorded for some folks at my office a year or so ago.
I hope that helps.