I've just set up Archiva and I'm testing it. I'm trying to get mysql-connector-java and I'm expecting it to not find it in the internal repository, download it from the central repository and then cache it.
When I check <archiva>/data/repositories/internal, however, it's empty. Also Browse in the admin pages is empty and Search won't return anything.
I'm assuming this means that it's not storing the artifact and that it will get it from the central repo again next time. I'm also assuming I'm not getting something so some help would be great.
My bad - I was using the wrong URL for the repository. I had http://myrepo:8080/archiva and it needed http://myrepo:8080/archiva/repository/internal so it was going to central repo directly. Works fine now.
Related
We've been experiencing problems with our overit-central repository on Artifactory. Some elements appear as "not-cached" and while trying to retrieve them from a build, we're encountering an "element not found" error. That same element does exist in the overit-central repo, but somehow our Artifactory instance doesn't seem to find it or cache it. (The problem doesn't happen with all the elements of the repo, and we don't know why. Some of them are actually cached)
We've already run a re-index of said repository but still the "This item is not cached" continues to appear.
We tried creating a new remote repository hooked to the same url and running some maven re-indexes from Artifactory, but it didn't help.
How do we force the caching of the elements from Artifactory? The documentation in the JFrog support page mentions it, but doesn't explain how to do it.
Thank you in advance
Regards
A remote repository in Artifactory is a mirror of the endpoint you have configured. It doesn't download the artifacts by default and this is the reason it says "Artifact is not cached". It is the intended behavior and it lets you know that you have never downloaded this artifact.
In order to cache an artifact, you have to simply download it from the remote endpoint. This can be done in two ways:
From the UI - Right click --> download
Using the API "curl -uUSERNAME:PASSWORD http://ARTIFACTORY_URL:PORT/artifactory/REMOTE_REPOSITORY/PATH_TO_ARTIFACT
Once the artifact is downloaded, it means that it is cached and you will be able to see it in the "name-of-the-remote-repository-cache" repository which shows the downloaded cached artifacts.
I want to proxy google maven using nexus,I use the url https://dl.google.com/dl/android/maven2/ for remote storage location,the repository status is In Service-Remote Automatically Blocked and Unavailable. I try to set Auto Blocking Enabled false,but problem still happen.
This is a known bug in Nexus Repo 2:
https://issues.sonatype.org/browse/NEXUS-9508
However, your work-around SHOULD have worked. Try running a build against the repo, our support people say you might be trying to browse remote or checking the index tabs, which will not work in this case.
You can try out Nexus Repo 3 in case you aren't using it, I'd be interested to see what your mileage is there. Let me know either way if this helps!
I have the same problem, the solution, is not use a "public" repo, but a specific repo like "http://nexusrepo/repository/Google" and not "http://nexusrepo/repository/public", and in build.gradle add this entry
maven{
url = "http://nexusrepo/repository/Google"
}
I'm using version :
Nexus Repository ManagerOSS 3.0.0-03
I'm new to Artifactory. I'm trying to understand better how the remote repository cache mechanism works.
Right know I have 3 imported remote repositories at the system:
google-code-cache.
java.net-cache.
jcenter-cache.
At the first two (google and java), After I'm entering to the remote url and downloading an artifact it seems to be saved at the repository-cache.
At jcenter that doesn't work. even if I'm downloading a file the file doesn't goes to the cache.
Can anyone help me understand better the logic behind the cache mechanism - when does it save the artifacts at the cache and when it's don't?
Thanks,
Nadav
First of all, with JCenter you don't need the other repositories. You'll be able to retrieve all the artifacts from java.net and google-code directly from jcenter.
Second, the easiest way to configure remote repositories is using the configuration import functionality. Just click on the Import button. The default server to import from will be repo.jfrog.org, which is a good choice, since it has a lot of remote repos to choose. Select 'jcenter' from the list of the proposed repositories and it will be added to your Artifactory and configured correctly.
I have an instance of Artifactory installed locally. Within the instance, I am able to create references to other remote repositories.
Now, I have another instance of Artifactory, which exposes its own repository: .../remoteArtifactory/repo
I am trying to point to this repo in the first instance of Artifactory.
But in doing so, I have:
Connection failed with exception: Circular redirect to
".../remoteArtifactory/repo"
What am I doing wrong here?
I had exactly the same problem as you, and fixed it by completely ignoring that error message and saving the repository. To reiterate:
Ensure you have the correct path to the remote repository, eg: http://host:8080/artifactory/libs-release-local/
Click Test, and you'll get the Connection failed with exception: Circular redirect to - Ignore this!
Click Save
Note: different versions of Artifactory have slightly different paths/URLs. This caused me a little grief.
Remote Repository Settings
I guess it's worth mentioning that I needed to specify the local proxy server (TdmsProxy).
Also, to confirm that you've got the correct path to the remote instance, check that you can receive a POM via the browser (or wget) from it, eg:
http://your-remote-repo:8080/artifactory/libs-releases-local/com/company/area/project/version/project-version.pom
Once, you've received the POM, just use the first part of the URL, eg:
http://your-remote-repo:8080/artifactory/libs-releases-local/
(I realise you've probably checked your path at least 10 times, but this bit me!)
I'm trying to add a proxy to a public repository (specifically camel-extra). However, I get the following error in my Nexus logs:
Cannot fetch remote index for repository camel-extra
and then further down:
The remoteURL we requested does not exists on remote server (remoteUrl="http://camel-extra.googlecode.com/svn/maven2/releases/.index/nexus-maven-repository-index.properties")
I've ensured that 'Download Remote Indexes' is 'True', repaired the index, updated the index, all to no avail. Browsing to the provided URL shows that the artifacts are there.
So if a repository doesn't have this file, is it not proxy-able through Nexus?
TIA,
Roy
UPDATE
Thanks for the answers everyone - was able to pull the artifacts without the index. Thanks again!
Repositories without indexes published will be still proxy-able thru Nexus (or any other MRM). Index is only a "topping" providing useful extras like searching the whole remote content, etc.
The index does not participate in proxy-ing at all, hence the lack of it on remote does not affect main functionality of Nexus at all: to proxy artifacts from remote repository.
From the nexus documentation, it appears that downloading an index is configurable.
The default for new proxy repositories
is enabled, but all of the default
repositories included in Nexus have
this option disabled.
You should disable the Downloading of Remote Index.
Yes, it is proxyable. Just try to download an artifact which is hosted in that repository. The indexes only affect searching and the index published in turn by Nexus.