I'm currently getting this error doing Maven Site:
Unable to create Maven project from repository.
My configuration:
<url>grocery.com</url>
<distributionManagement>
<repository>
<id>grocery</id>
<url>grocery.com</url>
</repository>
</distributionManagement>
As far as I understand Maven Site, at the end of the process, it should pop a report website link and this link would work locally. So, I can use any url or do I need a specific one?
Here is the full bug report:
https://codeshare.io/5XbJe8
My complete pom.xml:
https://codeshare.io/ad0nr4
Related
I am trying to deploy the Maven build JAR to Github Package Registry.
I am getting exception when I execute mvn deploy command.
I am using a simple Maven project which I want to create a component JAR and store in Github Package Registry.
The build is successful I now want to deploy this artifact to registry.
I have added the below in ~./m2/settings.xml.
Added a repository element under repositories in profile.
<repository>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://maven.pkg.github.com/swastikaa-in</url>
</repository>
<servers>
<server>
<id>github</id>
<username>swastikaa</username>
<password>my personal token from github</password>
</server>
</servers>
Also, I have added the below in Maven project's pom.xml:
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://maven.pkg.github.com/swastikaa-in/math</url>
</repository>
</distributionManagement>
Expected:
Deployment to be successful , build artifact is deployed to Github package registry.
Actual:
Exception as below:
Caused by: org.eclipse.aether.transfer.MetadataTransferException:
Could not transfer metadata com.redjohn.tools:math:0.0.2-SNAPSHOT/maven-metadata.xml
from/to github (https://maven.pkg.github.com/swastikaa-in/math):
Failed to transfer file https://maven.pkg.github.com/swastikaa-in/math/com/redjohn/tools/math/0.0.2-SNAPSHOT/maven-metadata.xml
with status code 400
Caused by: org.apache.maven.wagon.TransferFailedException:
Failed to transfer file https://maven.pkg.github.com/swastikaa-in/math/com/redjohn/tools/math/0.0.2-SNAPSHOT/maven-metadata.xml
with status code 400
Can someone help me in resolving the issue.
I have followed the instructions provided in the below link:
https://help.github.com/en/articles/configuring-apache-maven-for-use-with-github-package-registry
I had the same problem and I found that snapshot versions don't work well. If you deploy a non snapshot version, it should work.
Inside your settings.xml file, <url>https://maven.pkg.github.com/OWNER/REPOSITORY</url> you need to make use that OWNER is replaced with your github username and REPOSITORY is replaced with the name of your project repository in github.
In Java I am adding below maven dependency,
<dependency>
<groupId>cloudant-labs</groupId>
<artifactId>spark-cloudant</artifactId>
<version>2.0.0-s_2.11</version>
</dependency>
but it is not loading package even in pom.xml file showing below error,
Missing artifact cloudant-labs:spark-cloudant:jar:2.0.0-s_2.11
Can anyone help me please why it is causing issue?
I am able to add another maven dependencies but particularly this is not working..
It's not in the official maven repository. (http://search.maven.org/#search%7Cga%7C1%7Cspark-cloudant)
But when you check: https://mvnrepository.com/artifact/cloudant-labs/spark-cloudant/2.0.0-s_2.11 there is note:
Note: this artifact it located at Spark Packages repository
(https://dl.bintray.com/spark-packages/maven/)
So you will need to add following to your pom.xml:
<repositories>
<repository>
<id>bintray</id>
<name>bintray.com</name>
<url>https://dl.bintray.com/spark-packages/maven/</url>
</repository>
</repositories>
EDIT:
According to https://spark.apache.org/news/new-repository-service.html
Bintray, the original repository service used for https://spark-packages.org/, is in its sunset process, and will no longer be available from May 1st. To consume artifacts from the new repository service, please replace “dl.bintray.com/spark-packages/maven” with “repos.spark-packages.org” in the Maven pom files or sbt build files in your repositories.
So this should work:
<repositories>
<repository>
<id>bintray</id>
<name>bintray.com</name>
<url>https://repos.spark-packages.org</url>
</repository>
</repositories>
Check your maven repo to verify that the file name and version matches what you've specified. Most Maven repo's give you an example of what to use, copy/paste.
ex: Sonatype Nexus is a repo that I use and they let you search and get snippets so you never have to worry about typing things wrong.
I'm trying to import a maven project into Eclipse.
I'm using Helios. I've downloaded m2eclipse. I've imported the project.
But I'am having so much troubles to compile the project.
The full project contains 5 Eclipse projects, ie: prj1, prj2, prj3, prj4 and prj5
If I look the (Eclipse) marker at prj1/pom.xml I have this troubles:
Multiple annotations found at this line:
- Missing artifact log4j:log4j:jar:1.2.15:compile
- Missing artifact org.apache.xmlbeans:xmlbeans-xpath:jar:2.4.0:compile
- Missing artifact org.apache.ws.commons.axiom:axiom-dom:jar:1.2.5:compile
- Missing artifact org.apache.httpcomponents:httpcore:jar:4.0-alpha5:compile
.... and so many more ...
If I understood how maven works those dependecies must be downloaded my maven, am I wrong?
Why is it that those dependencies are not being downloaded? Should I download one by one, by hand?
It is not a unique issue, happens every now and then (sometimes due to a slow connection and sometimes due to proxy servers not allowing to download)
You can get rid of this by either of the following ways:
1) Force Update: Right Click on the Project in Eclipse -> Maven -> Update Project
On this screen select the check box Force Update for Snapshots/Releases
2) Clearing Maven Cache: If you are still facing a problem, go to the local repository on your system, which might be present at C:\Users\myusername\.m2\repository and delete the .cache folder and then follow step 1.
If you're still facing issues after this, manually go to the org/apache folder and delete everything and then follow step 1. (This will definitely solve the issue.)
Make sure your build path is going to /target/classes
to check:
right click on your project and go to properties
-> choose java build path
-> then go to the source tab
the default output folder is on the bottom
With Eclipse/Maven projects, I've always had more luck building from the command line (mvn clean package) first in order to download all of the dependencies. Once that completes without errors, then I import the project into Eclipse.
It can be a mistake in pom repository / dependency definition
i.e. I want include in pom groupId:org.clapper artifactId:javautil
The home page of clapper say use:
http://software.clapper.org/javautil
<repositories>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<id>clapper-org-maven-repo</id>
<name>org.clapper Maven Repo</name>
<url>http://maven.clapper.org/</url>
<layout>default</layout>
</repository>
...
</repositories>
and
<dependency>
<groupId>org.clapper</groupId>
<artifactId>javautil</artifactId>
<version>3.1.2</version>
</dependency>
It don't work! I got "Multiple annotations found at this line"!!!
If I use dependency from
https://github.com/shilad/wikibrain/blob/master/wikibrain-utils/pom.xml
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<id>clapper-org-maven-repo</id>
<name>org.clapper Maven Repo</name>
<url>http://maven.clapper.org/</url>
<layout>default</layout>
</repository>
+
<dependency>
<groupId>org.clapper</groupId>
<artifactId>javautil</artifactId>
<version>3.1.1</version>
</dependency>
It work fine!!!
Problem deploying my jaudiotagger project since java.net moved from CollabNet to Project Kenai
I made the following changes to pom.xml
from
<repository><id>maven2-repository.dev.java.net</id>
to
<repository><id>maven2-repository.java.net</id>
from
<repository>
<uniqueVersion>false</uniqueVersion>
<id>java.net-maven2-repository</id>
<url>java-net:/maven2-repository/trunk/repository/</url>
</repository>
to
<repository>
<uniqueVersion>false</uniqueVersion>
<id>java.net-m2-repository</id>
<url>java-net:/maven2-repository-svn/trunk/repository/</url>
</repository>
and Wagon version from
<version>1.8</version>
to
<version>1.12</version>
When I run mvn deploy it just complains:
Error retrieving previous build number for artifacts 'org:jaudiotagger:jar' repository metadata for: 'snapshot org:jaudiotagger:2.0.4-SNAPSHOT' could not be retrieved from repository: java.net-m2-repository due to an error: Connection failed:Unable to connect to https://svn.java.net/svn/maven2-repository-svn/trunk/repository
What am I doing wrong
thanks Paul
They have discontinued hosting their own repository but failed to mention it to anyone
http://www.java.net/forum/topic/forum-help/project-moved-project-kenjai-unable-deply-maven-repository?force=216
I am trying to create a Eclipse project from Hibernate tutorials under path
\hibernate-distribution-3.5.3-Final\project\tutorials\eg
using command line mvn eclipse:eclipse. But i am getting this error
Reason: POM 'org.jboss.maven.plugins:maven-jdocbook-style-plugin' not found in repository: Unable to download the artifact from any repository
Can anyone faced this issue with the latest release of Hibernate?
I don't know what version of the plugin you need but JBoss has moved recently to Nexus and, while the previous repositories (mentioned here) will stay online indefinitely, ultimate versions of stuff is pushed to their Nexus repo now. So I suspect that you need the following declaration somewhere:
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</repository>
...
</repositories>