Moro, you wrote in a comment that X has the following dependency declared:
<dependency>
<groupId>Y</groupId>
<artifactId>Y</artifactId>
<scope>provided</scope>
<version>1.0</version>
</dependency>
First point. You are using a "fixed" version here (as opposed to "SNAPSHOT
"). When using SNAPSHOT
, maven will automatically grab the latest SNAPSHOT
every time you build. On the other hand, when you are using 1.0, once maven has downloaded this artifact, it never tries to get a new 1.0. So, you should increment Y's version or, if Y is under active development (enhancements, bug fixes, etc), you should really use SNAPSHOT
.
For more informations about SNAPSHOT
, check out the chapter 9.3.1.2. SNAPSHOT Versions of Sonatype's book:
Why would you use this? SNAPSHOT
versions are used for projects under
active development. If your project
depends on a software component that
is under active development, you can
depend on a SNAPSHOT release, and
Maven will periodically attempt to
download the latest snapshot from a
repository when you run a build.
Similarly, if the next release of your
system is going to have a version
"1.4", your project would have a
version "1.4-SNAPSHOT" until it was
formally released.
Second point. You are using a provided
scope. According to the chapter
9.4.1. Dependency Scope:
provided
dependencies are used when
you expect the JDK or a container to
provide them. For example, if you were
developing a web application, you
would need the Servlet API available
on the compile classpath to compile a
servlet, but you wouldn’t want to
include the Servlet API in the
packaged WAR; the Servlet API JAR is
supplied by your application server or
servlet container. provided
dependencies are available on the
compilation classpath (not runtime).
They are not transitive, nor are they
packaged.
Is this really what you want? How are you deploying X and Y on JBoss? Shouldn't you use the default compile
scope?