Thanks Kalpak for response. The issue is that compilation fails when I try to use anything specific to junit 4.8 in my junit test classes. Here is what is happening:
> When I see the nexus proxy (or local) repository, after I do mvn clean and > mvn compile, it is downloading 3.8.1, 3.8.2 and 4.8.1 versions from remote > repository > I can see these 3 versions in website of my local/procy repository as well > in filesystem in //nexus/storage/MyRepository_dir > mvn compile fails saying junit annotations is not recognized. I am > assuming this is happening as it is not there in junit 3.8 version Thanks Sunil ------------------------------------------------------------------------- Kalpak Gadre wrote: > > Hi Sunil, > > Firstly, this is not the right list to post this questions. This > question belongs to Maven Users List > > I don't think plugin dependencies will interfere with your project > dependencies? Is there any side effect of junit 3.8.1 being downloaded > on your packaging? > > You can anyway try dependency:tree and make sure that none of your > project dependencies are downloading it. I don't think plugin > downloading a Junit dependency is any problem? > > Thanks, > > Kalpak > >> Hi, >> >> In one of project application, I was using junit 3.8.1. Now I want to >> move >> to junit 4.8.1. I have changed the pom dependancy for downloading junit >> 4.8.1 and it is working fine. But I am noticing that junit 3.8.1 is still >> being downloaded by Maven through nexus repository. How do I avoid >> downloading junit 3.8.1? >> >> When I did “mvn –X clean”, it showed me the junit 3.8.1 is getting >> downloaded may be because it is present as a dependency in the artifact >> buildnumber-maven-plugin which is under group org.codehaus.mojo. To try >> avoiding this, I went and changed pom of that artifcats and version found >> in >> /org/apache/maven//maven-xxx.pom >> >> But it is still downloading 3.8.1 when I do mvn clean. Here is the pom: >> >> >> org.codehaus.mojo >> buildnumber-maven-plugin >> 1.0-beta-3 >> >> >> validate >> >> create >> >> >> >> >> false >> false >> >> >> >> org.apache.maven.plugins >> maven-compiler-plugin >> >> 1.5 >> 1.5 >> >> >> >> org.apache.maven.plugins >> maven-surefire-plugin >> 2.5 >> >> >> test >> test >> >> test >> >> >> >> >> >> >> >> junit >> junit >> 4.8.1 >> test >> >> --- >> >> Thanks >> Sunil >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://old.nabble.com/Maven-is-downloading-older-version-of-junit-tp28535146p28536325.html Sent from the Maven Developers mailing list archive at Nabble.com.
