I set up a new webapp Maven project and wanted to test it with Jetty's Maven plugin.
So I issued the console command: mvn jetty:run
After defining the pluginGroup
in Maven's settings file I ran once again the command.
Unfortunately, it failed because I was using one of the below mentioned versions of the plugin:
Why are there 2 Maven based plugins for achieving the same thing - running Jetty? Why do they have to bring so much confusion?
Or be so kind as to explain me the differences between them.
The Jetty Maven plugin is useful for rapid development and testing. You can add it to any webapp project that is structured according to the usual Maven defaults. The plugin can then periodically scan your project for changes and automatically redeploy the webapp if any are found.
Using the Jetty Plugin enables you to quickly test your web application by skipping the last two steps. By default the Jetty Plugin scans target/classes for any changes in your Java sources and src/main/webapp for changes to your web sources.
You could use your Jetty Server in Intellij IDEA using a Run/Debug Configuration : Run > Edit Configurations... > + > Jetty Server > Local. Then you can add artifacts (war exploded) that will be deployed on your jetty and then simply launch it via Debug (doc here).
With Jetty7 this plugin was renamed to jetty-maven-plugin to better conform to maven2 convention. The Jetty 7 version of the plugin has also undergone substantial changes in configuration. For more information, see the Jetty 7 Maven Plugin feature guide.
See the docs here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With