I checked that junit 4.8.1 jar is proper and is downloaded from my
remote/server repository to my proxy/local repository. It is present in
storage location of nexus file system. I have Java 1.5 on my system. I have
set junit 4.8.1 in my build classpath. Still it is giving compilation issues
as it is not recognizing annotations of junit 4.x. 

When I see in local/proxy repository, it still has junit 3.8.1 as well as
junit 4.8.1. I think from below dependancy tree junit 3.x is downloaded as
some of maven plugins have it as dependnacy while junit 4.x is downloaded as
I have mentioned it as dependency in my project pom. That could have been
fine, but why is it not compiling. Here is pom, dependnacy tree as well as
compilation debugging messages:


mvn dependency:tree gives only this result (I have removed others unrelated
to junit). This seems to be correct


[INFO] com.mycompany:myproject:jar:1.0.0

[INFO] +- junit:junit:jar:4.8.1:test


mvn compile provides this result when in debug mode:


[INFO] Scanning for projects...

[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo-parent:pom:20 for
project: org.codehaus.mojo:buildnumber-maven-plugin:maven-plugin:1.0-beta-3
from the repository.

[DEBUG] Adding managed dependencies for
org.codehaus.mojo:buildnumber-maven-plugin

[DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0

[DEBUG]   junit:junit:jar:3.8.2:test


[DEBUG] Retrieving parent-POM: org.codehaus.plexus:plexus:pom:1.0.4 for
project: org.codehaus.plexus:plexus-containers:pom:1.0.3 from the
repository.

[DEBUG]      
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:runtime
(selected for runtime)

[DEBUG]         junit:junit:jar:3.8.1:runtime (applying version: 3.8.2)

[DEBUG]         junit:junit:jar:3.8.2:runtime (applying scope: test)


[DEBUG] Trying repository ist-mycompany-plugin-releases

[DEBUG] Using mirror:
http://localhost:8081/nexus/content/repositories/Myproject_Repos (id:
Myproject_Repos)

[DEBUG] Checking for pre-existing User-Agent configuration.

[DEBUG] Adding User-Agent configuration.

[DEBUG] Connecting to repository: 'Myproject_Repos' with url:
'http://localhost:8081/nexus/content/repositories/Myproject_Repos'.

Downloading:
http://localhost:8081/nexus/content/repositories/Myproject_Repos/junit/junit/3.8.2/junit-3.8.2.pom

[DEBUG]
http://localhost:8081/nexus/content/repositories/Myproject_Repos/junit/junit/3.8.2/junit-3.8.2.pom
- Status code: 200

[DEBUG] last-modified = Mon, 14 May 2007 21:34:53 GMT (1179178493000)

[DEBUG] attempting to create parent directories for destination:
junit-3.8.2.pom.tmp

747b downloaded  (junit-3.8.2.pom)

[DEBUG]   Artifact resolved

[DEBUG]         junit:junit:jar:3.8.2:test (selected for test)

[DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed
- nearer found: 1.4.1)

[DEBUG]         classworlds:classworlds:jar:1.1-alpha-2:runtime (selected
for runtime)



[DEBUG] Adding managed dependencies for unknown:wagon-provider-api

[DEBUG]   org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2

[DEBUG]   org.apache.maven.wagon:wagon-provider-test:jar:1.0-beta-2

[DEBUG]   org.apache.maven.wagon:wagon-ssh-common-test:jar:1.0-beta-2

[DEBUG]   org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-2

[DEBUG]   junit:junit:jar:3.8.1

[DEBUG]   org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4

[DEBUG]   org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8

[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.0.4

[DEBUG]      
org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:runtime (selected
for runtime)

[DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed
- nearer found: 1.4.1)



DEBUG] Adding managed dependencies for
org.apache.maven:maven-plugin-registry

[DEBUG]   easymock:easymock:jar:1.2_Java1.3:test

[DEBUG]   classworlds:classworlds:jar:1.1

[DEBUG]     org.apache.maven:maven-plugin-registry:jar:2.0.6:runtime
(selected for runtime)

[DEBUG]     org.codehaus.plexus:plexus-utils:jar:1.4.1:runtime (selected for
runtime)

[DEBUG]     org.apache.maven:maven-artifact:jar:2.0.6:runtime (selected for
runtime)

[DEBUG]    
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:runtime
(selected for runtime)

[DEBUG]       junit:junit:jar:3.8.1:runtime (applying version: 3.8.2)

[DEBUG]       junit:junit:jar:3.8.2:runtime (applying scope: test)

[DEBUG]       junit:junit:jar:3.8.2:test (selected for test)

[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed -
nearer found: 1.4.1)

[DEBUG]       classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for
runtime)

[DEBUG]   org.apache.maven:maven-settings:jar:2.0.6:runtime (selected for
runtime)


[DEBUG] Retrieving parent-POM:
org.apache.maven.wagon:wagon-providers:pom:1.0-beta-2 for project:
null:wagon-file:jar:1.0-beta-2 from the repository.

[DEBUG] Adding managed dependencies for unknown:wagon-file

[DEBUG]   org.apache.maven.wagon:wagon-provider-test:jar:1.0-beta-2

[DEBUG]   junit:junit:jar:3.8.1


 POM br>
            
        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
                                                                        
                    
                
                                        
            



-- 
View this message in context: 
http://old.nabble.com/Maven-is-downloading-older-version-of-junit-tp28535146p28544378.html
Sent from the Maven Developers mailing list archive at Nabble.com.

Reply via email to