You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Anders Hammar <an...@hammar.net> on 2013/02/19 10:53:44 UTC

Re: Maven 3.0.4 not able to download new jars

The jar for activation 1.0.2 does not exist in central. But v1.1 for
example does.

Use http://search.maven.org

/Anders


On Tue, Feb 19, 2013 at 9:42 AM, sarmahdi <sa...@hotmail.com> wrote:

> Hello all,
>
> I mavenized my project just fine and it is working. and I updated my maven
> to 3.0.4 from 3.0.3 and its working fine. I started helping out on another
> project to be mavenized and we dowanloaded 3.0.4 and started to mavenize
> the
> project. for some plugins and jars they were downloaded but then the error
> came on activation.jar 1.0.2, and one more jar (given below). the error
> happens for both the jars.
> <dependency>
>         <groupId>javax.activation</groupId>
>         <artifactId>activation</artifactId>
>         <version>1.0.2</version>
> </dependency>
>             <dependency>
>           <groupId>javax.xml</groupId>
>           <artifactId>xmldsig</artifactId>
>           <version>1.0</version>
> </dependency>
>
>  as we all know activation.jar is very common. it just said artifact not
> found. So i added a depndency tag from the site mavenrepo.com for the same
> jar and tried to do it again. Again it gave the same error.
>
> I copied the xml tag from his pom file into my working pom file for another
> project and now this project has the same error :
>
> [DEBUG]
> =======================================================================
> [DEBUG] Using connector WagonRepositoryConnector with priority 0 for
> http://repo.maven.apache.org/maven2 via 10.2.224.50:80 as null
> Downloading:
>
> http://repo.maven.apache.org/maven2/javax/activation/activation/1.0.2/activation-1.0.2.pom
> 776/776 B
>
> Downloaded:
>
> http://repo.maven.apache.org/maven2/javax/activation/activation/1.0.2/activation-1.0.2.pom
> (776 B at 0.8 KB/sec)
> [DEBUG] Writing resolution tracking file
>
> C:\RSA75Workspace\Maven\repository\javax\activation\activation\1.0.2\activation-1.0.2.pom.lastUpdated
> [DEBUG] Writing resolution tracking file
>
> C:\RSA75Workspace\Maven\repository\javax\activation\activation\1.0.2\_maven.repositories
> [DEBUG] business:business:jar:1.0
> [DEBUG]    javax.activation:activation:jar:1.0.2:compile
> [DEBUG]    javax.xml:xmldsig:jar:1.0:compile
> [DEBUG]    org.slf4j:slf4j-parent:jar:1.5.10:compile
> [DEBUG]    ch.qos.logback:logback-access:jar:0.9.18:compile
> [DEBUG]    ch.qos.logback:logback-core:jar:0.9.18:compile
> [DEBUG]    ch.qos.logback:logback-classic:jar:0.9.18:compile
> [DEBUG]       org.slf4j:slf4j-api:jar:1.5.10:compile
> [DEBUG]    javaee:javaee-api:jar:5:compile
> [DEBUG] Using connector WagonRepositoryConnector with priority 0 for
> http://repo.maven.apache.org/maven2 via 10.2.224.50:80 as null
> Downloading:
>
> http://repo.maven.apache.org/maven2/javax/activation/activation/1.0.2/activation-1.0.2.jar
>
> [DEBUG] Writing resolution tracking file
>
> C:\RSA75Workspace\Maven\repository\javax\activation\activation\1.0.2\activation-1.0.2.jar.lastUpdated
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2.078s
> [INFO] Finished at: Tue Feb 19 11:38:51 GMT+03:00 2013
> [INFO] Final Memory: 3M/15M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal on project business: Could not resolve
> dependencies for project business:business:jar:1.0: The following artifacts
> could not be resolved: javax.activation:activation:jar:1.0.2,
> javax.xml:xmldsig:jar:1.0: Could not find artifact
> javax.activation:activation:jar:1.0.2 in central
> (http://repo.maven.apache.org/maven2) -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal on project business: Could not resolve dependencies for project
> business:business:jar:1.0: The following artifacts could not be resolved:
> javax.activation:activation:jar:1.0.2, javax.xml:xmldsig:jar:1.0: Could not
> find artifact javax.activation:activation:jar:1.0.2 in central
> (http://repo.maven.apache.org/maven2)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117)
>         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
>         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
>         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>         at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.project.DependencyResolutionException: Could
> not
> resolve dependencies for project business:business:jar:1.0: The following
> artifacts could not be resolved: javax.activation:activation:jar:1.0.2,
> javax.xml:xmldsig:jar:1.0: Could not find artifact
> javax.activation:activation:jar:1.0.2 in central
> (http://repo.maven.apache.org/maven2)
>         at
>
> org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:189)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185)
>         ... 22 more
> Caused by: org.sonatype.aether.resolution.DependencyResolutionException:
> The
> following artifacts could not be resolved:
> javax.activation:activation:jar:1.0.2, javax.xml:xmldsig:jar:1.0: Could not
> find artifact javax.activation:activation:jar:1.0.2 in central
> (http://repo.maven.apache.org/maven2)
>         at
>
> org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:375)
>         at
>
> org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:183)
>         ... 23 more
> Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: The
> following artifacts could not be resolved:
> javax.activation:activation:jar:1.0.2, javax.xml:xmldsig:jar:1.0: Could not
> find artifact javax.activation:activation:jar:1.0.2 in central
> (http://repo.maven.apache.org/maven2)
>         at
>
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
>         at
>
> org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
>         at
>
> org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358)
>         ... 24 more
> Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could
> not
> find artifact javax.activation:activation:jar:1.0.2 in central
> (http://repo.maven.apache.org/maven2)
>         at
>
> org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:947)
>         at
>
> org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
>         at
>
> org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
>         at
>
> org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
>
>
> Now my own project has this issue my POM file is like this :
>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>         <modelVersion>4.0.0</modelVersion>
>         <groupId>business</groupId>
>         <artifactId>business</artifactId>
>         <version>1.0</version>
>         <packaging>jar</packaging>
>         <name>business</name>
>
>
>
>         <dependencies>
>         <dependency>
>         <groupId>javax.activation</groupId>
>         <artifactId>activation</artifactId>
>         <version>1.0.2</version>
> </dependency>
>
>             <dependency>
>           <groupId>javax.xml</groupId>
>           <artifactId>xmldsig</artifactId>
>           <version>1.0</version>
> </dependency>
>
>                 <dependency>
>                         <groupId>org.slf4j</groupId>
>                         <artifactId>slf4j-parent</artifactId>
>                         <version>1.5.10</version>
>                         <type>jar</type>
>                 </dependency>
>
>                 <dependency>
>                         <groupId>ch.qos.logback</groupId>
>                         <artifactId>logback-access</artifactId>
>                         <version>0.9.18</version>
>                 </dependency>
>
>                 <dependency>
>                         <groupId>ch.qos.logback</groupId>
>                         <artifactId>logback-core</artifactId>
>                         <version>0.9.18</version>
>                 </dependency>
>                 <dependency>
>                         <groupId>ch.qos.logback</groupId>
>                         <artifactId>logback-classic</artifactId>
>                         <version>0.9.18</version>
>                 </dependency>
>
>
>                 <dependency>
>                         <groupId>javaee</groupId>
>                         <artifactId>javaee-api</artifactId>
>                         <version>5</version>
>                         <type>jar</type>
>                 </dependency>
>
>         </dependencies>
>
>         <build>
>                 <sourceDirectory>${basedir}\src</sourceDirectory>
>
> <scriptSourceDirectory>${basedir}\src\main\scripts</scriptSourceDirectory>
>
> <testSourceDirectory>${basedir}\src\test\java</testSourceDirectory>
>
> <outputDirectory>${basedir}\target\build\classes</outputDirectory>
>
> <testOutputDirectory>${basedir}\target\test-classes</testOutputDirectory>
>                 <resources>
>                         <resource>
>
> <directory>${basedir}\src\main\resources</directory>
>                         </resource>
>                 </resources>
>                 <testResources>
>                         <testResource>
>
> <directory>${basedir}\src\test\resources</directory>
>                         </testResource>
>                 </testResources>
>                 <directory>${basedir}\target</directory>
>                 <finalName>business</finalName>
>
>                 <plugins>
>                         <plugin>
>                                 <groupId>org.apache.maven.plugins</groupId>
>
> <artifactId>maven-compiler-plugin</artifactId>
>                                 <version>2.3.2</version>
>                                 <configuration>
>                                         <source>1.6</source>
>                                         <target>1.6</target>
>
>                                 </configuration>
>                         </plugin>
>                 </plugins>
>         </build>
> </project>
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Maven-3-0-4-not-able-to-download-new-jars-tp5747518.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven 3.0.4 not able to download new jars

Posted by Anders Hammar <an...@hammar.net>.
You can always control the version of a transitive dependency through the
dependencyManagement section in your pom.

/Anders


On Tue, Feb 19, 2013 at 11:24 AM, sarmahdi <sa...@hotmail.com> wrote:

> Thanks Anders for the reply,
>
> the problem is I am not downaloding the 1.0.4 version, maven itself is
> doing
> it as a nested dependency for some other jar so i dont know how to change
> the version for which to downalod, (besides having the dependency tags
> write
> myself)
>
> Also, if it was a sun/oracle un distributable jar, and are already added in
> the JRE then they should be excluded automatically. Don't you think this is
> more of a hassle now that it tries to download something that is not there
> and also when it should be excluded.
>
> I added a log4j in netbeans and it added the excludes automatically for
> javax jars. but this pom I am running is from the command line, the net
> beans on his machine does not work like that and i am not able to download
> jars/identify dependencies from that like i did on my machine. some
> firewall
> issue i guess.
>
> I will add the excludes myself and will see where i go from there
>
> Thanks again
>
> Syed
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Maven-3-0-4-not-able-to-download-new-jars-tp5747518p5747548.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven 3.0.4 not able to download new jars

Posted by sarmahdi <sa...@hotmail.com>.
Thanks Anders for the reply,

the problem is I am not downaloding the 1.0.4 version, maven itself is doing
it as a nested dependency for some other jar so i dont know how to change
the version for which to downalod, (besides having the dependency tags write
myself) 

Also, if it was a sun/oracle un distributable jar, and are already added in
the JRE then they should be excluded automatically. Don't you think this is
more of a hassle now that it tries to download something that is not there
and also when it should be excluded. 

I added a log4j in netbeans and it added the excludes automatically for
javax jars. but this pom I am running is from the command line, the net
beans on his machine does not work like that and i am not able to download
jars/identify dependencies from that like i did on my machine. some firewall
issue i guess. 

I will add the excludes myself and will see where i go from there

Thanks again

Syed



--
View this message in context: http://maven.40175.n5.nabble.com/Maven-3-0-4-not-able-to-download-new-jars-tp5747518p5747548.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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