On my project, i try to install it for the first time. But when i launch clean install, it can't download the dependency "jbossweb" because of unauthorized.
On mvnrepository( https://mvnrepository.com/artifact/org.jboss.web/jbossweb/7.4.10.Final) , it says this artifact is located at Spring Plugins repository (https://repo.spring.io/plugins-release/).
That is what I have in my pom.xml :
<repositories>
<repository>
<id>securecentral</id>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<id>spring</id>
<url>https://repo.spring.io/plugins-release/</url>
</repository>
</repositories>
And it define this dependency like this :
<dependency>
<groupId>org.jboss.web</groupId>
<artifactId>jbossweb</artifactId>
<version>7.4.10.Final</version>
</dependency>
The error when I launch clean install :
[ERROR] Failed to execute goal on project Pilotage_WS: Could not
resolve dependencies for project bpce:Pilotage_WS:war:1.0-SNAPSHOT:
Failed to collect dependencies at
org.jboss.web:jbossweb:jar:7.4.10.Final: Failed to read artifact
descriptor for org.jboss.web:jbossweb:jar:7.4.10.Final: Could not
transfer artifact org.jboss.web:jbossweb:pom:7.4.10.Final from/to
spring (https://repo.spring.io/plugins-release/): authentication
failed for
https://repo.spring.io/plugins-release/org/jboss/web/jbossweb/7.4.10.Final/jbossweb-7.4.10.Final.pom,
status: 401 Unauthorized -> [Help 1]
I don't understand, we need authentication ? If yes i couldn't find any information about this.
Moreover, when I go on https://repo.spring.io/plugins-release/, it redirects to https://repo.spring.io/ui/native/plugins-release/, but i cannot find the dependency here anyway.
Any idea ?
Try with JBoss repository:
<repositories>
...
<repository>
<id>jboss-releases</id>
<url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
</repository>
</repositories>
Related
I have an old project which uses spring data and neo4j. I'm trying to build it, but maven is not able to find the neo4j-cypher-dsl dependency. The dependency is defined as follows:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-dsl</artifactId>
<version>2.0.1</version>
</dependency>
These are the repositories that I have configured in pom.xml:
<repositories>
<repository>
<id>neo4j</id>
<url>http://m2.neo4j.org/</url>
</repository>
<repository>
<id>neo4j-releases</id>
<url>http://m2.neo4j.org/content/repositories/releases/</url>
</repository>
</repositories>
And this is the error that I'm getting from maven:
[ERROR] Failed to execute goal on project evidencefactory: Could not
resolve dependencies for project
com.evidencefactory:evidencefactory:war:0.9-SNAPSHOT: Failed to
collect dependencies at
org.springframework.data:spring-data-neo4j-rest:jar:3.1.0.RELEASE ->
org.springframework.data:spring-data-neo4j:jar:3.1.0.RELEASE ->
org.neo4j:neo4j-cypher-dsl:jar:2.0.1: Failed to read artifact
descriptor for org.neo4j:neo4j-cypher-dsl:jar:2.0.1: Could not
transfer artifact org.neo4j:neo4j-cypher-dsl:pom:2.0.1 from/to neo4j
(http://m2.neo4j.org/): Failed to transfer file
http://m2.neo4j.org/org/neo4j/neo4j-cypher-dsl/2.0.1/neo4j-cypher-dsl-2.0.1.pom
with status code 502 -> [Help 1]
Does anyone know where I can find this old neo4j dependency?
Updating my answer to use another repo.
See my comment below for the location of the artifacts.
Adding this to my pom.xml builds this dependency.
<repositories>
<repository>
<id>xebialabs-releases</id>
<url>https://plugins.xebialabs.com/nexus/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
I am using maven to add dependency. I added
<!-- https://mvnrepository.com/artifact/org.jboss.seam/jboss-seam -->
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<version>2.3.5.Final-redhat-1</version>
</dependency>
jboss-seam jar by using above lines in pom.xml. When I run mvn clean install it gives an error
What is the issue and how to solve this error?
Try adding the below repository in your pom file,
<repositories>
<repository>
<id>redhat</id>
<url>https://maven.repository.redhat.com/ga/</url>
</repository>
</repositories>
The artifact is not available in maven central repository. Its available only in redhat-ga repository.
I am trying to add the "selenium standalone server jar" to my maven project. I found this:
https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server-standalone/2.53.0
Copying the dependency is giving me a missing artifact error which probably mean my current maven settings isn't pointing to the repo that has this jar file. The url is http://repo.jenkins-ci.org/releases/org/seleniumhq/selenium/selenium-server-standalone/2.53.0/ How to I update my pom file so that I can add this dependency?
Check maven documentation:
https://maven.apache.org/guides/mini/guide-multiple-repositories.html
<project>
...
<repositories>
<repository>
<id>my-repo1</id>
<name>your custom repo</name>
<url>http://jarsm2.dyndns.dk</url>
</repository>
<repository>
<id>my-repo2</id>
<name>your custom repo</name>
<url>http://jarsm2.dyndns.dk</url>
</repository>
</repositories>
...
</project>
I need to have a completely offline maven repository due to some limitations. According to http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException , only <pluginRepositories> are searched for plugins. So I am wondering how to configure maven to look up plugins in a local file system. I tried using "file://" prefix when setting <url> but it doesn't work.
DEBUG] Verifying availability of /home/dsun/.m2/repository/org/apache/karaf/tooling/features-maven-plugin/2.3.0/features-maven-plugin-2.3.0.jar from [central (http://repo1.maven.org/maven2, releases=true, snapshots=false, managed=false)]
[ERROR] Plugin org.apache.karaf.tooling:features-maven-plugin:2.3.0 or one of its dependencies could not be resolved: The repository system is offline but the artifact org.apache.karaf.tooling:features-maven-plugin:jar:2.3.0 is not available in the local repository. -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.karaf.tooling:features-maven-plugin:2.3.0 or one of its dependencies could not be resolved: The repository system is offline but the artifact org.apache.karaf.tooling:features-maven-plugin:jar:2.3.0 is not available in the local repository.
dsun#localhost:> ls /home/dsun/.m2/repository/org/apache/karaf/tooling/features-maven-plugin/2.3.0/features-maven-plugin-2.3.0.jar
/home/dsun/.m2/repository/org/apache/karaf/tooling/features-maven-plugin/2.3.0/features-maven-plugin-2.3.0.jar
The settings.xml
<settings>
<offline>true</offline>
<profiles>
<profile>
<id>local</id>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>file://${env.HOME}/.m2/repository</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>local</activeProfile>
</activeProfiles>
<localRepository>${env.HOME}/.m2/repository</localRepository>
Finally, I found the problem, there's a file called _maven.repositories in the plugin directory, after I delete the file, all works well!
More details, see the following links:
http://maven.40175.n5.nabble.com/Maven-3-maven-repositories-and-lastUpdated-td4927537.html
http://jira.codehaus.org/browse/MNG-5181
Since Maven 3.1-alpha-1,
the command line option -llr/--legacy-local-repository
or the system property -Dmaven.legacyLocalRepo=true
should help
See here for a general answer on working offline with maven
This problem annoyed me so much that I patched the war plugin to have a disableOverlaying parameter. You may find it here - forked from the original : https://github.com/crowdcode-de/maven-war-plugin
My build is breaking on a fresh machine because one of the repositories is returning a 301 page for both the pom and jar instead of the expected 404. The dependency is asm:asm:1.3. It is in Central, but Maven doesn't seem to be looking there.
Here's a sample of the build log:
Downloading: http://download.java.net/maven/2/asm/asm/3.1/asm-3.1.pom
[INFO] Unable to find resource 'asm:asm:pom:3.1' in repository java.net2 (http://download.java.net/maven/2)
Downloading: http://repository.primefaces.org/asm/asm/3.1/asm-3.1.pom
[INFO] Unable to find resource 'asm:asm:pom:3.1' in repository prime-repo (http://repository.primefaces.org)
Downloading: https://repository.jboss.org/nexus/content/groups/public-jboss//asm/asm/3.1/asm-3.1.pom
[INFO] Unable to find resource 'asm:asm:pom:3.1' in repository jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public-jboss/)
Downloading: http://maven.thebuzzmedia.com/asm/asm/3.1/asm-3.1.pom
[INFO] Unable to find resource 'asm:asm:pom:3.1' in repository The Buzz Media Maven Repository (http://maven.thebuzzmedia.com)
Downloading: http://maven.glassfish.org/content/groups/glassfish/asm/asm/3.1/asm-3.1.pom
185b downloaded (asm-3.1.pom)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '6c9fd3d150b8a5f0ca676f49b8ed603793cabebb'; remote = '<html>
<head><title>301' - RETRYING
Downloading: http://maven.glassfish.org/content/groups/glassfish/asm/asm/3.1/asm-3.1.pom
185b downloaded (asm-3.1.pom)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '6c9fd3d150b8a5f0ca676f49b8ed603793cabebb'; remote = '<html>
<head><title>301' - IGNORING
[WARNING] POM for 'asm:asm:pom:3.1:compile' is invalid.
Here's the repositories section in my pom.xml:
<repositories>
<repository>
<id>central</id>
<name>Central Maven Repository</name>
<url>http://repo1.maven.org/maven2</url>
<layout>default</layout>
</repository>
<repository>
<id>java.net2</id>
<name>Repository hosting the jee6 artifacts</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>prime-repo</id>
<name>Prime Technology Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
<repository>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<id>jboss-public-repository-group</id>
<layout>default</layout>
<name>JBoss Public Maven Repository Group</name>
</repository>
<repository>
<id>The Buzz Media Maven Repository</id>
<url>http://maven.thebuzzmedia.com</url>
</repository>
</repositories>
I don't have a settings.xml file.
From what I can tell, the dependency on jersey-server-1.3 is breaking the build. Its pom.xml specifies the now non-existant repository at http://maven.glassfish.org/content/groups/glassfish. But all the other repositories I have specified are being checked in the order I have specified. That is, everything except central. How can I make Maven check the central repository first? Or at least make it check Central before using repositories specified in dependencies' poms?
The first recommendation i can make is to read the sonatype article about repositories in your pom. Furthermore the http code 301 means in move permanently. This means your URL you are using for one of your repositories seemed to be out of date or should be different.
The defined glassfish repository seemed to wrong, cause it should be an https connection.
Furthmore i can recommend to use a repository manager.
One questions comes to my mind: Why are you defining Maven Central in your repositories list, cause it's already defined in Maven itself...BTW: Repository definition should be put into the settings.xml instead of the pom.xml apart from using a repository manager.
To define the order of the repository access it is done in reverse order based on their definition in the settings.xml. To get better control over this is to use a repository manager.
One important question: Why don't you use Maven 3.0.X instead of Maven 2.2.1 ?