Question

Context: Within the application's server Jboss, at the company I work for, there are several war packages that were packaged by Ant as well as a couple of other war projects, but in late case they were packaged by Maven. Ant's packaged projects make use of share libraries (jar files) located within the jboss lib directory, on the other hand each Maven's packaged war is bundled with all their dependencies inside.

Question: Is there any way to specify a dependency in the maven's pom file in order to reference any of those shared libraries, but without actually including them in the war package? Or is it that the only change I have is to use these libraries throughout the classpath of the war project.

Was it helpful?

Solution

Use the "scope" property for dependencies, more specifically:

    <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>1.1.0.Final</version>
        <scope>provided</scope>
    </dependency>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top