Giter VIP home page Giter VIP logo

maven-jetty-run-m2e-wtp's Introduction

Example maven project using both jetty:run and m2e-wtp

While eclipse properly integrate a range of JEE servers, Jetty support is a bit lacking wrt Jetty 9. As the existing solutions are not real WTP servers adapters, using the jetty-maven-plugin might be desirable.

The main issue with such a setup is that m2e-wtp does not process resources the same way a standard maven build does. What's more, on the latest Eclipse version to date (Luna), web resources filtering deactivate the maven archiver JEE integration, making things a bit harder.

This projects solves this with a simple profile activation:

  • when the m2e-wtp directory exists in target - i.e. eclipse is running and processing the project - the jetty-m2e-wtp profile is active. It overlay the m2e-wtp/web-resources directory to the target/${project.build.finalName} where maven usually stores the processed resources

  • when the m2e-wtp directory is missing - i.e. we're doing a conventional maven build - the jetty-no-m2e-wtp is active, and only integrates the target/${project.build.finalName} directory, thus preventing the jetty:run goal to fail on a missing source directory

You can check which profile is active at any given time using:

$ mvn help:active-profiles

IMPORTANT profile activation does not support properties resolution so ${project.build.directory} is hardcoded to target. This should be changed when the default build directory is changed in the pom.xml.

maven-jetty-run-m2e-wtp's People

Contributors

clueware avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.