Host maven artifact with Cloudbees - java

I managed to have my maven jar hosted in my private repo (at least this is what I see).
https://repository-{my-library}.forge.cloudbees.com/snapshot/
When I access it from the browser the folder 'org' shows up and browsing I can see the XML and jar.
The problem is when I try to use the jar for my app, I get this error:
Downloading: http://repository-{my-library}.forge.cloudbees.com/release/org/{my-library}/{my-library}/0.0.1-SNAPSHOT/maven-metadata.xml
Downloading: https://raw.github.com/{my-library}/spring-boot-legacy/mvn-repo/org/{my-library}/{my-library}/0.0.1-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.{my-library}:{my-library}:0.0.1-SNAPSHOT/maven-metadata.xml from/to {my-library}-snapshot (http://repository-{my-library}.forge.cloudbees.com/release/): Not authorized , ReasonPhrase:Unauthorized.
[WARNING] Failure to transfer org.{my-library}:{my-library}:0.0.1-SNAPSHOT/maven-metadata.xml from http://repository-{my-library}.forge.cloudbees.com/release/ was cached in the local repository, resolution will not be reattempted until the update interval of {my-library}-snapshot has elapsed or updates are forced. Original error: Could not transfer metadata org.{my-library}:{my-library}:0.0.1-SNAPSHOT/maven-metadata.xml from/to {my-library}-snapshot (http://repository-{my-library}.forge.cloudbees.com/release/): Not authorized , ReasonPhrase:Unauthorized.
I don't understand why I can accesss the repo snapshot from the browser yet maven says "Unauthorized"?

You need to add a custom settings.xml to your private repository, mount it and load the configuration from there. Otherwise you won't be able to access your (protected) artifacts.
The documentation is pretty well hidden, but you can find it here: http://developer.cloudbees.com/bin/view/DEV/Accessing+under+an+external+Maven+repository

Related

I have a problem when I fix my code in the first java maven project

I'm tired of trying to fix this:
com.thoughtworks.xstream:xstream:jar:1.3.1 failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced Original error: Could not transfer artifact com.thoughtworks.xstream:xstream:jar:1.3.1 from/to central (https://repo.maven.apache.org/maven2 ): The operation was cancelled.
I need help from everyone

Maven Build Issue with spring-boot-starter-parent <version>2.1.3.RELEASE</version>

I have tried multiple options changing the spring boot starter parent versions updating the
repository URL in the POM file, But still no luck keep on getting the below issue.
Tried adding the repository config in the pom still getting the issue. I have tried deletng the entire m2 repo but no luck its trying to download other tuff but not the plugin.
Error :
plugin org.springframework.boot:spring-boot-maven-plugin:2.1.3.RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.springframework.boot:spring-boot-maven-plugin:jar:2.1.3.RELEASE: Could not transfer artifact org.springframework.boot:spring-boot-maven-plugin:pom:2.1.3.RELEASE from/to central (http://repo.maven.apache.org/maven2): Failed to transfer http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.1.3.RELEASE/spring-boot-maven-plugin-2.1.3.RELEASE.pom. Error code 501, HTTPS Required
The url from where your code is trying to fetch the dependency should be an https url
expected url
in your case it is :-
your code URL
You might need to change your artifactory url

Create maven project is on some PC

I try the steps in it work at Home , when I back to work and I encounter some new problems
https://maven.apache.org/guides/getting-started/index.html#How_do_I_make_my_first_Maven_project it
mvn archetype:generate -DgroupId=com.mycompany.app
-DartifactId=Maven-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false I get the following errors
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metada
ta.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xm
l from/to central (https://repo.maven.apache.org/maven2): Access denied to: http
s://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml , R
easonPhrase:Forbidden.
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/
to central (https://repo.maven.apache.org/maven2): Access denied to: https://rep
o.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml , ReasonPhrase:Fo
rbidden.
[WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from h
ttps://repo.maven.apache.org/maven2 was cached in the local repository, resoluti
on will not be reattempted until the update interval of central has elapsed or u
pdates are forced. Original error: Could not transfer metadata org.apache.maven.
plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2
): Access denied to: https://repo.maven.apache.org/maven2/org/apache/maven/plugi
ns/maven-metadata.xml , ReasonPhrase:Forbidden.
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from https://
repo.maven.apache.org/maven2 was cached in the local repository, resolution will
not be reattempted until the update interval of central has elapsed or updates
are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-
metadata.xml from/to central (https://repo.maven.apache.org/maven2): Access deni
ed to: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
, ReasonPhrase:Forbidden.
1) How do I test my proxy setting ? there is the username equals my PC login name?
2) How can it look for the repositories in C?
No plugin found for prefix 'archetype' in the current project and in the
plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the
[local (C:\path\to\local\repo), central (https://repo.maven.apache.
org/maven2)] -> [Help 1]
I have setting like, I though the repository suppose under my username
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ${user.home}/.m2/repository-->
<localRepository>/path/to/local/repo</localRepository>

maven-metadata.xml build error

I am getting the error below in log whenever I try to build my Spring project.
Could anyone please help me?
[WARNING] Could not transfer metadata org.springframework:spring-core:3.2.1.SPR-10124-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (like--//tinkerpop.com/maven2): Access denied to link-->//tinkerpop.com/maven2/org/springframework/spring-core/3.2.1.SPR-10124-SNAPSHOT/maven-metadata.xml. Error code 403, Forbidden
[WARNING] Failure to transfer org.springframework:spring-core:3.2.1.SPR-10124-SNAPSHOT/maven-metadata.xml from link: //tinkerpop.com/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of tinkerpop-repository has elapsed or updates are forced. Original error: Could not transfer metadata org.springframework:spring-core:3.2.1.SPR-10124-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (link://tinkerpop.com/maven2): Access denied to link---//tinkerpop.com/maven2/org/springframework/spring-core/3.2.1.SPR-10124-SNAPSHOT/maven-metadata.xml. Error code 403, Forbidden
I had the same error. In my case I am using Netbeans 7.1.2, I am posting this because maybe someone end up here same as I did.
I tried to configure the proxy options from the GUI, but the documentation says that maven doesn't read those. So I checked the NetBeans FAQ here :
What mainly you have to do is create (if it does not exist) a settings.xml under
user.home/.m2/settings.xml
if you don't have it you can copy from
netbeans.home/java/maven/conf/settings.xml
then uncomment if you already have it otherwise just fill this section:
<proxies>
<proxy>
<active>true</active>
<host>myproxy.host.net</host>
<port>80</port>
</proxy>
</proxies>
you have to check your proxy configuration and replace it there

Unable to use Neo4j 1.9.M05

When I add Neo4j 1.9.M05 to my project dependencies (with maven), I'm getting the following error in eclipse:
ArtifactDescriptorException: Failed to read artifact descriptor for org.neo4j:neo4j-kernel:jar:tests:1.9.M05: UnresolvableModelException: Failure to find org.neo4j:parent:pom:1.9.M05 in http://m2.neo4j.org/releases was cached in the local repository, resolution will not be reattempted until the update interval of neo4j-release-repository has elapsed or updates are forced
This seems to make sense because the URL "http://m2.neo4j.org/content/repositories/releases/org/neo4j/parent" does not exist. Was anybody able to use 1.9.M05 already? Is there another public repository where I can find this dependency?
ps: does anybody know when the neo4j-cypher-dsl module gets updated to 1.9.M05?
For now, you can bypass this problem by manually placing this parent pom in your local maven repository (or upload it to your companies nexus, or ...).
If the parent has not been deployed, I would suggest you file a bug report with the authors, as this won't work. They'll either have to deploy the parent, of spin off a new release.

Categories

Resources