In eclipse I am trying to reference a plain Java project (let's call it "Common") from a Dynamic Web Project ("Server").
While "Server" is a faceted project and targets the Glassfish runtime, "Common" should stay a plain Java project (and not be faceted).
In "Server", I added a reference to "Common" using the "Project References" in the project properties. On deployment, however, the classes in "Common" cannot be found (NoClassDefFoundError
).
This problem can be solved adding the "Common" project to the Deployment Assembly of "Server".
However, this action causes Eclipse to change the type of the "Common" project to a faceted project and let it target the Glassfish Runtime, too.
This then causes problems for team memebers who don't have GlassFish installed but still want to be able to build the "Common" project as it is used by another project, too.
How am I able to reference a plain Java project from my Server project (and add it to the deployment assembly) while keeping the referenced project's runtime and type unchanged?