Handling Artifactory Maven Repository URL reidrect - maven

Via the jfrog artifactory version: 4.14.0 dashboard, when adding a remote maven repository, the repository is browsable at one url but the downloads are on a different url.
Example:
https://nexus.pentaho.org/service/rest/repository/browse/omni/pentaho-library/libfonts/5.0.1-stable/
Download a file from that service DOES NOT resolve to
https://nexus.pentaho.org/service/rest/repository/browse/omni/pentaho-library/libfonts/5.0.1-stable/libfonts-5.0.1-stable.jar
It leads to
https://nexus.pentaho.org/repository/omni/pentaho-library/libfonts/5.0.1-stable/libfonts-5.0.1-stable.jar
Convert:
https://nexus.pentaho.org/service/rest/repository/browse/omni/
to
https://nexus.pentaho.org/repository/omni/
Looked into user plugins such as this
https://github.com/jfrog/artifactory-user-plugins/blob/master/download/modifyNuGetDownload/modifyNuGetDownload.groovy but these change the path after the base url, not the repository url itself
Is there a way to supply a custom repository url for downloading files?

Related

Install spring-boot-starter-parent and upload to nexus

I would like to install the spring-boot-starter-parent jar and upload it to my private nexus 3 repo. Then I hope to configure my project pom file to retrieve the dependency from there. How can i download spring-boot-starter-parent jar?
My intention is to set up this nexus repo so that future projects will pull depencies from this nexus repo (where this environment is not connected to the internet)
No need to upload in your nexus. You can configure proxy-repository:
A repository that proxies everything you download from Maven Central. Next time you download the same dependency, it will be cached in your Nexus.
Look at this for details
Need to do following configuration:
– create a private (hosted) repository for our snapshots
– create a private (hosted) repository for our releases
– create a proxy repository pointing to Maven Central
– create a group repository to provide all of these repos under a single URL
Another procedure:
If you want to upload list of jar then write gradle task to upload nexus repository. here you get details.

How to connect remote repository in JFrog Artifactory to repo.manento.com?

Is possible to add repo.magento.com as a remote repository to Jfrog Artifactory?
I added repo.magento.com as remote php repo but when I try to require a module like "magento/product-community-edition" in the Artifactory logs I see the error
Error occurred while parsing the response of a remote composer package JSON query on 'https://repo.magento.com/p/magento.json': Expected a file but found a folder, at: php-magento:.composer/p/magento.json
This occurs because repo.magento.com doesn't use lazy url but explicit all packages in https://repo.magento.com/packages.json.
There is any way to customize Artifactory packages.json to prevent lazy url?
I asked to jFrog support and they answer me
Currently Artifactory does not support repo.magento.com.
I created and issue on JFrog Jira https://www.jfrog.com/jira/browse/RTFACT-18169

archetype-catalog of jcenter.bintray.com to old when proxing it with Sonatype Nexus

I have problems to reach some artefacts from jcenter/bintray over Sonatype Nexus.
I created a maven2 Nexus configuration which points to http://jcenter.bintray.com (remote storage location). I set "Download Remote Index" to true.
Nevertheless /nexus/content/repositories/com.bintray.jcenter/archetype-catalog.xml did not contain my desired artefact. The catalog itself is not empty.
Browsing jcenter.bintray.com/com/moowork/gradle/gradle-grunt-plugin/0.4/ reveals the artefact.
Any idea, any help?
Creating a proxy in Nexus with the following url works for me:
http://dl.bintray.com/srs/maven/.
At that url there are no maven catalog files, but you can navigate through the artifact structure. Nexus works on repos without catalog, too.
It looks like you have to point Nexus to the project specific repository, and not to the root url.

maven artifacts for local repository

I want to create a local repository for maven. For that, I have to download all required artifacts. Is there any direct download link available for all artifacts to be downloaded once?
The local repository will be automatically be created during your first call of Maven in relationship with a project. The default location for the local repository is $HOME/.m2/repository.
You don't need to download dependencies etc. cause Maven will do that automatically.

How to create the repository (role is repository manager)with nexus

i created a maven repository using nexus and upload the jars files.Same way how to upload the maven plugins to repository.i directly add the maven-complier-plugin,it is not working.it will gives some exception like org.apahce,parenet ,plexus ,codehaus required and org.apache.maven.lifecycle errors are geting..
i will not be maven central repository,only using commpany repository includes every in my repository jars and maven plug
plz help me i am first create the repository.
Did you specify a mirror in your settings.xml file? If you want to force all users to use your repo and not repo1.maven.org, you'll need to enforce that. Also, you probably want your nexus to proxy central so that any artifact you don't host will still be available once you setup the mirror to block all outside repos.

Resources