Here I am having an issue while downloading the artifacts from the Jfrog artificatory. Below is the scenario where the download is failing.
We have jfrog artifcatory as our repository management application. When we install our
software it downloads the bundles/modules from jfrog repositories.
We were installing our application in a very closed network. We only allow whitelisted
IPs/domains to be allowed. We have whitelisted our jfrog URL, let it be <jfrogURL.jfrog.io> .
But while downloading artifacts the application fails throwing connect exceptions from jfrog-
prod-apse2-shared-sydney-main.s3.amazonaws.com:443. i.e when we hit the jfrogURL.jfrog.io
local repository it is redirecting to jfrog-prod-apse2-shared-sydney-
main.s3.amazonaws.com:443.
Do they make any re-directions, when we access our url i.e <jfrogURL.jfrog.io>? If so how can
we whitelist these redirected url/ip i.e is these url is static one?
Can anyone please help us with these above queries?
If you use Gradle project>>>
After proxy setting ( What is the proxy IP in your organization), I have added following code in build.gradle file. The problem has gone.
sourceSets {
main {
output.setResourcesDir(java.outputDir)
}
}
If you face same problem, please update gradle version
Related
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
I have a hosted Sonatype Nexus repository on a local network. It has a Maven group containing a proxy repository for the public Maven repository. In the past this configuration was superb and I encountered few issues.
I recently configured https and ssl on the Nexus repository as Docker would not easily log into insecure Nexus Docker registries during CI/CD processes. I did end up re-configuring the Maven repositories at this point.
Then I updated build.gradle:
repositories {
maven {
credentials {
username "${nexusUsername}"
password "${nexusPassword}"
}
name = 'RepositoryName'
url = "https://${nexusURL}:${nexusPort}/repository/maven-public"
}
}
with the nexus* variables defined in ~/.gradle/gradle.properties:
nexus<Variable>=<value>
I have also added the appropriate certificate to the java jre keystore with the keytool and added the certificate in Idea's settings (File > Settings... : Tools > Server Certificates).
When trying to download dependencies (through the Maven proxy) using Gradle (by clicking "import changes" on the pop-up notification in Intellij Idea) the Build output shows "Could not resolve: <dependency>" for each dependency. This behavior is consistent across all of my projects (even ones that previously were able to resolve dependencies).
I have, under most circumstances, been able to get the dependencies to resolve through Nexus when running a Gradle task (:dependencies, :idea, :build) from the project's build.gradle file from a command line. The resulting downloads are not available to the project in Idea. However, after the dependencies have been resolved once, the artifacts are cached in Nexus's Maven proxy repository allowing Gradle/Idea to correctly resolve all dependencies.
What could be causing Gradle/Idea's failure to resolve artifacts through Nexus's Maven proxy? Is there a way to get Gradle/Idea to correctly resolve dependencies through the Nexus Maven group/proxy?
For now I've just added mavenCentral() to the repository list in build.gradle but I would prefer to only include the Nexus Maven group in the future. Caching resources for 1GB/s download is really nice. I would also like to better understand Gradle/Idea and what is causing this issue.
More information:
Intellij Idea has been reinstalled to version 2018.2.6 Build #IC-182.5107.16 during the process of trying to fix this issue. The old version is lost to history.
Gradle has been updated to version 4.10.2. Previous version was 4.5.1.
I've printed each of the nexus* variables via println to ensure the values were correct.
No configuration of Idea's settings for Gradle (local Gradle distribution, default Gradle wrapper, Gradle 'wrapper' task configuration) managed to resolve dependencies.
Every configuration of deleting at least one of ./.idea, ./.gradle, and ~/.gradle/caches was tried.
Idea is not in offline-mode. Sequences of toggling offline-mode and "Refresh all Gradle projects" did not change the outcome.
I have run an Idea configuration of Gradle's dependencies task with --warning-mode all --debug and compared the log to the output of gradle dependencies --warning-mode all --debug on command line. The logs seem to be producing the same statements (in wildly different orders) until the "Could not resolve:" message appears in the Idea output. I did not find any nearby error messages that would explain the failure. If it would help diagnose the issue I can upload those files.
I have tried setting the repository to point directly at the Nexus Maven proxy instead of the Maven group. This did not allow Gradle/Idea to resolve dependencies.
Should I be using a http/https proxy for Gradle? I don't understand the goal of using a proxy in this context.
I have not done anything with Grail. I don't know what Grail is and suspect I do not currently need it.
OS is Windows 10.
Dependencies are not resolved when using compile or implementation in build.gradle.
Transitive dependencies don't seem to be relevant.
I must not have added the certificate to the correct jre installation. I added it more recently and the issue was resolved.
Also, superstitious notes for anyone else having a similar issue:
I added the certificate (a wildcard certificate) under the alias (using the -alias command line parameter for keytool): *.example.com
I also added it under an alias for the full address: nexus.example.com
I don't know whether either of those had any impact on Idea/Gradles' success in resolving artifacts. I believe it was working before I added the second alias.
I want to simply download a war file from a Nexus repo and deploy it on a remote tomcat server.
I found this plugin https://wiki.jenkins.io/display/JENKINS/Repository+Connector+Plugin, which seems to help me do the same.
I have the following configuration:
In hue-central, I have correctly configured the repo url.
If I open <repo url>/com/worksap/company/hue-interface-front in my browser, I can see all the versions along with maven-metadata.xml, which contains all the versions.
Am I missing something?
Try following: Go to Jenkins Administration / System configuration, find the Artifact Resolver section, and check Repo Type of your repository. If it is empty, set it to "default". It was causing the same problem in my case.
Example here.
I have a Maven 3 Nexus installed on a server. Through the Nexus GUI, I have added a proxy repository of repository policy as "Snapshot" and the URL is a remote Vendor URL, from where the artifacts/plugins are required to be downloaded. Then I have added the newly added proxy repository to the Public Repositories under Ordered Group Repositories.
Post the above activity, I have tried to build the project using mvn clean install. However the build is failing due to missing artefacts from vendor URL.
In Nexus, when I go under the Public repository and look under Browse storage, I do not see the artefact folder, which should have been downloaded from remote repository.
The "Browse remote" on the newly created repository is working fine and I can navigate to the required artifacts.
I am not sure what I am doing wrong. Any help is much appreciated.
If while the first run of :
mvn clean install
the required artefact was not available on Nexus, maybe it is now cache localy (on your laptop) as not found.
Maybe you just have to tell maven to update cache using -U option ?
mvn clean install -U
The other solution could be a mismatch snapshot/release repository information. Check your Repository policy proxy configuration on your Nexus server proxy.
I'm have a artifactory running in a server here, and my settings.xml are configured to use it has a mirror.
But, one dep I use is in a github page, and seems like artifactory doesnt get it, because it throws me "UNABLE TO DOWNLOAD blah..".
I try to add the repo in Artifactory remote repositories, click in test, and it shows me a
Connection failed: Error 403: Forbidden
I am using the correct URL (I think): http://gwtbootstrap.github.com/maven/snapshots
Got any help?
Thanks in advance
I think the URL should be:
https://github.com/gwtbootstrap/maven/tree/gh-pages/snapshots