Artifact deploys old jar not found in pom.xml

Answered

Hello all, 

 

I am running into a problem where my pom.xml file shows I am using 1.1.0 for a jar. But, when I build/deploy the artifact to my local server it uses an older jar 1.0.3. If I run the Maven lifecycle build to package my app - it uses the correct jar to package it. But, for some reason when I use the Build Artifact... Clean option it uses an older jar.

The dependency should be resolved from workspace as I have the module open in my current project. If I check the apps dependencies I do see the folder for the library so it appears to recognize it anyway.

 

I have tried  a Maven .. Re import and that doesn't work either.

Any idea what I am missing? 

0
2 comments

Try to delete the artifact and reimport the project so that it's generated again from Maven.

If the issue remains, please provide a sample project illustrating the problem and the exact steps to reproduce.

0
Avatar
Permanently deleted user

I should have been a bit more clear. If i checked the dependencies via Show Dependencies I do see that my library shows up a couple times via transitive dependency, but wasn't included in the final build.

I did as you suggested and deleted the workspace project library, but the build still used the old jar. To fix this I was able to delete the Maven dependencies from the artifact and then re-add them. After I did this the build deployed the correct version of the jar.

 

I should have thought to delete the project and re-import!

 

Thanks for you reply!

0

Please sign in to leave a comment.