maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jemos Infra <jemos.in...@googlemail.com>
Subject Re: Maven is downloading older version of junit
Date Wed, 12 May 2010 20:28:24 GMT
This will happen because Maven is compiling with a version < 1.5. Define
the java compiler plugin with source and target >= 1.5

Regards,

M.

On Wed, 2010-05-12 at 06:59 -0700, AVSUNIL wrote:
> 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: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> > 
> > 
> > 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message