Moving artifacts from remote repositories to a local one - artifactory

Preventing pulling in new dependencies from one build to the next, due to the way 3rd parties could define their dependencies.
Currently I'm utilizing the Remote Repositories in JFrog Artifact which reduces the downloads from public repos.
In my build scripts I can hard code the versions of the 3rd party modules/libraries I want to pull in. But if one of the dependencies hasn't it could pull in a new version on the next build.
So was curious if it there was a feature within JFrog Artifactory to copy an artifact and it's dependency from a remote repo into a local repo ?

There is a concept of virtual repo's in artifacory that is a combination of remote and loca repo.
local repo --> mostly used for custom build/artifacts/packages
remote repo --> points to the repo server of the technology configured.
For eg. with npm virtual repo.
npm local --> custom packages
npm remote --> https://www.npmjs.com/~npmre

Related

Can I use generic repository type for npm registry?

We are currently in the process of purchasing a license of Artifactory Pro, but the procurement process takes time in our organization. In order to build knowledge around Artifactory and NPM to use Artifactory, is there a way to front the NPM Registry with Artifactory using a Generic Repository Type?
Thank you
If you would like to use the NPM client with Artifactory, you will have to use the NPM repository type and not the Generic Repository Type.
You wont be able to use the Generic Repository Type with the NPM client, as the Generic Repository Type does not calculate metadata / index artifacts.
To configuring your NPM client to work with the NPM repository type, you may use the Artifactory Set me up functionality which will guide you how to configure the NPM client

Local alternate for Git with RStudio?

My colleague & I are starting on a R project, we both would be working simultaneously & interchangeable components of the model we are building. We can not use Git, as we do not want to put our code online, also it is not allowed by the organization. We also do not have a server of our own, what we have is some common shared drive. Is there a way, we can use a tool like Github/SVN completely locally, where both of us can push our code.
There are two options you can manage your R project with git repo.
Option 1: setup remote git repo in the shared directory
You can setup a remote git repo in the shared directory, and then add the remote repo as a remote for your local git repo, then you can push and push from the remote git repo. Detail steps as below:
First, in an empty folder of the shared directory (assume in \\share\path\gitrepo), execute:
git init --bare
Then add the remote repo as a remote for the local repo you are working.
Assume the local git repo (R project) is opened in R Studio, so you can add remote in R Studio terminal window or through git command line:
git remote add origin \\\\share\\path\\gitrepo
Note:
The count of slash \ in the remote repo url.
And the pull and push button is still disabled after adding remote repo since the local branch (maste) has not tracked the remote branch (origin/master).
Then you can commit changes and push to remote repo first time by:
git push -u origin master
After that (local master is tracking origin/master), the pull and push button will be enabled after refresh the git tool bar. And can pull/push by clicking the buttons afterwards.
Option 2: host the remote git repo to third-party private repo
If it’s ok for you to hosted your git repo to third-party, and do not let everyone has read permission, then you can create a private git repo in the third-party organization.
For bitbucket, it’s free to create private git repos, so you can host your git repo there.

Creating a full replica/offline copy of the public pypi repository

Nexus Repository Manager OSS 3.9.0-01.
I wish to create a 'proxy' Nexus repository that will a replica of the public pypi repository. The other machines can then be configured to point to this Nexus repo. so that a 'pip install' on these machines works even if there is no Internet connection. Accordingly, I created a proxy repository of type 'pypi(proxy)'.
When I browse this repo, there aren't any components/assets but whenever someone does a 'pip install' by pointing to this repo, the package shows up in the interface e.g: pip install --user pyspark --verbose
What I am looking for is to clone/copy all the packages in the PyPI repository at once so that the future 'pip install' refers to this local copy and doesn't go to the Internet every time. Once a day, the local copy should be updated.
Is it possible to do so in Nexus OSS?
What you are trying to achieve is a PyPI mirror repository, not a proxy.
The PyPI proxy repository behaviour you described is correct, because it is a proxy, not a mirror. Nexus Repository Manager does not provide functionality to to create a mirror of another repository.
However, you could try to use a PyPI mirror client (e.g. bandersnatch) to obtain a copy of all packages, then move those files over to your PyPI hosted repository and ask Nexus to reindex the files. Later you would have to periodically repeat the process to keep your mirror up to date.

Configuring Nexus OSS as P2 repo

I have have an internal Nexus OSS server with dozens of regular Maven jar artifacts in Inhouse, Snapshots and various proxied repos.
I have also installed the Nexus P2 Repository Plugin and the P2 Bridge Plugin (2.6.3-01) and the Nexus Unzip Plugin (0.12.0). I can browse to the .meta/p2 folder of our group repository, but it is currently empty.
My understanding is that I should be able have one (or a combination) of the aforementioned plugins automagically convert the regular jars into bundles (or maybe I need to manually run the Felix bundle maven plugin to redeploy each of them) and then make them available to Tycho.
What I don't understand is which repo I should be pointing the P2 plugins at in the capabilities tab and the update repo/meta inf scripts configuration - is it necessary to do each hosted/proxy repo individually or can I do it for the Public group repo?
Also, how can I easily verify which bundles/plugins are available via the P2 repo?

Artifactory remote repos and Terracota

I want to setup my maven settings.xml file to download all the external dependencies from Artifactory cache instead of download them directly from any of the public repositories like repo1, repo2 or Jboss. I followed the instructions at http://wiki.jfrog.org/confluence/display/RTF/Configuring+Artifacts+Resolution at but I'm stuck with an error with the terracota library, the error is:
Could not find artifact net.sf.ehcache:ehcache-terracotta:jar:2.5.0 in remote-repos
I tried adding terracota repository at the remote repositories section but this didn't worked either.
Please advice.
I can think of a couple of possibilities:
Your remote-repos cache isn't configured to point to the remote repository that contains the Terracotta files
Your build isn't using the correct organization or module name when resolving the dependency on Terracotta.
Could you add some info to your question detailing where exactly you are seeing the error message, and whether you can browse to ehcache-terracotta version 2.5.0 in Artifactory ?
Please add the terracotta repository to your artifactory
This is the URL= http://www.terracotta.org/download/reflector/releases
Don't worry if the test of the repo doesn't work...
The last step is to go to Edit Virtual Repository and add the new terracotta repo to the virtual repository called "Remote Repo".

Resources