views:

15

answers:

2

Is there a way to do incremental deployments with these three tools when in a multi-module project?

Example of Maven project:

  • project
  • project-data
  • project-service
  • project-webapp

The above are Maven modules with dependencies between them. The project-webapp module contains the .war file, but I don't want to create a new .war file every time I need to deploy. Is there a way to perform deployments upon file saves?

A: 

Use the Eclipse WTP support (and either the maven eclipse plugin or m2eclipse to import your project as a dynamic project). Did you try? Are you facing any particular problem?

Pascal Thivent
A: 

Thanks for the answer. Not sure what you really mean though. I will explain further my example so it is clearer.

In the projects above, project-data and project-service contain Java code, and the build output is a .jar for each.

project is the parent project and is a pom one, so no .jar artifact is produced.

project-webapp does not contain any code, but only the dependencies to project-data and project-service. Eventually, project-webapp produces a .war file as part of the build, containing both libraries just mentioned.

I am currently importing those projects as Maven ones into Eclipse via the m2Eclipse plugin.

I have hot deployment as I can build the 3 projects, and that will generate: 2 .jars and 1 .war, which can be deployed to JBoss without shutting it down (hot deployment).

What I want to have is incremental hot deployment, that is, publishing changes upon file saving.

WTP does not recognize any of the projects above as a candidate for incremental hot deployment, and therefore cannot be "Added/removed" to JBoss using Eclipse.

Also, I cannot create a dynamic web project from any of them (well I probably can, but it does not solve my problem as I need the 3 projects to be incrementally deployed, and not only one).

If I had a single web module with all the code I need to deploy on it (not imported as a Maven dependency) I would probably be able to create a dynamic web project and get the incremental deployment, but that's not the case here because of the reasons mentioned above.

Anonimo