Phantom dependency error

My .war project was building and deploying ok, but Eclipse said there was a problem — the project had a red X by it in the Package Explorer, and in the Problems window it said

Project ‘xa-example’ is missing required library: ‘…\org\apache\activemq\activeio-core\3.1-SNAPSHOT\activeio-core-3.1-SNAPSHOT-tests.jar’

I couldn’t understand why I was getting this, because I had already excluded the activeio-core library:

<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.0.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activeio-core</artifactId>
</exclusion>
</exclusions>
</dependency>

Solution

What I needed to do was run the maven eclipse:clean and eclipse:eclipse goals.  This rebuilt the .classpath file, which is where there was the stray reference to the activeio-core-3.1-SNAPSHOT-tests.jar file.

I had thought I was running the clean goal already, but the External Tools configuration I was using actually ran the maven clean and install goals, not eclipse:clean and eclipse:eclipse.

Once I ran the eclipse:clean and eclipse:eclipse goals, the error went away.

Advertisements

,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s