I tried to set up an internal remote repository for our organization and want to use that repository as a mirror.
- I setup repository manager using Artifactory.
- I used once of the default local repository "libs-release-local" as my remote repo.
As it will not connect to any central repos to resolve artifacts (even I need this behavior as my server can not connect internet), I deployed all artifacts manually from my local repository following below steps
- open Deploy tab on my artifactory web-ui
- click on Artifacts Bundle
- browse .zip file of my repo
- click on upload.
artifacts deployed successfully and I'm able to browse those form UI.
Now i'm using this repo as mirror in my settings.xml
<mirrors> <mirror> <id>internal</id> <url>http://localhost:8081/artifactory/libs-release-local</url> <mirrorOf>external:*</mirrorOf> </mirror> </mirrors>
I tried to build my project using target mvn clean package
Now I'm getting Error:
Return code is: 503 , ReasonPhrase:Service Unavailable
Error log:
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for o rg.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to internal (http://localhost:8081/artifactory/libs-release-local): Failed to transfer file: http://localhost:8081/artifactory/libs-release-local/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom. Return code is: 503 , ReasonPhrase:Service Unavailable. -> [Help 1]
If I user the same URL(localhost:8081/artifactory/libs-release-local/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom ) in web browser it is downloading artifact.
settings.xml
<settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxy_user</username>
<password>proxy_password</password>
<host>proxy_name</host>
<port>8080</port>
</proxy>
</proxies>
<mirrors>
<mirror>
<id>internal</id>
<url>http://localhost:8081/artifactory/libs-release-local</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>
What am I missing?