Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven. Repository authentication
    text
    copied!<p>I tried setup deploy to local repository:</p> <p>-- settings.xml --</p> <pre><code>&lt;server&gt; &lt;id&gt;myrepo&lt;/id&gt; &lt;username&gt;deployer&lt;/username&gt; &lt;password&gt;123456&lt;/password&gt; &lt;/server&gt; </code></pre> <p>-- pom.xml ---</p> <pre><code>&lt;repositories&gt; &lt;repository&gt; &lt;id&gt;myrepo&lt;/id&gt; &lt;url&gt;http://myserver.com/artifactory/libs-release-local&lt;/url&gt; &lt;releases&gt; &lt;enabled&gt;true&lt;/enabled&gt; &lt;updatePolicy&gt;always&lt;/updatePolicy&gt; &lt;/releases&gt; &lt;snapshots&gt; &lt;enabled&gt;false&lt;/enabled&gt; &lt;updatePolicy&gt;always&lt;/updatePolicy&gt; &lt;/snapshots&gt; &lt;/repository&gt; &lt;/repositories&gt; </code></pre> <p>when I execute "mvn deploy" I got error: </p> <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.4: deploy (default-deploy) on project xxx: Failed to deploy artifacts: Co uld not transfer artifact xxx:xxx:war:0.1-20130527.121430-3 from/to myserver.com (http://myserver.com:8083/artifactory/libs-snapshot-local): Failed to transfer file: http://myserver.com:8083/artifactory/libs-snapshot-local/xxx/0.1-SNAPSHOT /xxx-0.1-20130527.121430-3.war. Return code is: 401 </code></pre> <p>Artifactory log:</p> <pre><code>2013-05-27 16:14:38,158 [DENIED DEPLOY] libs-snapshot-local:xxx/0.1-SNAPSHOT /xxx-0.1-20130527.121430-3.pom for anonymous/192.168.6.36. </code></pre> <p>If I change server/repository id to "myserver.com" - deploy WORK! But it does not suit me because that did not work plugin changelog with svn at myserver.com</p> <p>I tried to add tags "profile" and "mirror" to server.xml and "distributionManagement" to pom.xml - getting the same error</p> <p>server/repository id must be named ONLY as my server?</p> <p><strong>UPDATE1:</strong></p> <p>I remove tag 'repositories' from pom.xml and added tag 'distributionManagment':</p> <p>--- pom.xml ---</p> <pre><code>&lt;distributionManagement&gt; &lt;repository&gt; &lt;id&gt;myrepo&lt;/id&gt; &lt;name&gt;myrepo&lt;/name&gt; &lt;url&gt;http://myserver.com/artifactory/libs-release-local&lt;/url&gt; &lt;/repository&gt; &lt;snapshotRepository&gt; &lt;id&gt;myrepo&lt;/id&gt; &lt;name&gt;myrepo&lt;/name&gt; &lt;url&gt;http://myserver.com/artifactory/libs-snapshots-local&lt;/url&gt; &lt;uniqueVersion&gt;false&lt;/uniqueVersion&gt; &lt;/snapshotRepository&gt; &lt;/distributionManagement&gt; </code></pre> <p>(server.xml has not changed) - getting the same error "Failed to deploy..."</p> <p><strong>UPDATE2:</strong></p> <p>Try...</p> <p>--- server.xml ---</p> <pre><code>&lt;profiles&gt; &lt;profile&gt; &lt;id&gt;artifactory&lt;/id&gt; &lt;repositories&gt; &lt;repository&gt; &lt;snapshots&gt; &lt;enabled&gt;false&lt;/enabled&gt; &lt;/snapshots&gt; &lt;id&gt;central&lt;/id&gt; &lt;name&gt;libs-release&lt;/name&gt; &lt;url&gt;http://myserver.com/artifactory/libs-release-local&lt;/url&gt; &lt;/repository&gt; &lt;repository&gt; &lt;snapshots /&gt; &lt;id&gt;snapshots&lt;/id&gt; &lt;name&gt;libs-snapshot&lt;/name&gt; &lt;url&gt;http://myserver.com/artifactory/libs-snapshot-local&lt;/url&gt; &lt;/repository&gt; &lt;/repositories&gt; &lt;/profile&gt; &lt;/profiles&gt; &lt;activeProfiles&gt; &lt;activeProfile&gt;artifactory&lt;/activeProfile&gt; &lt;/activeProfiles&gt; &lt;server&gt; &lt;id&gt;snapshots&lt;/id&gt; &lt;username&gt;deployer&lt;/username&gt; &lt;password&gt;123456&lt;/password&gt; &lt;/server&gt; &lt;server&gt; &lt;id&gt;central&lt;/id&gt; &lt;username&gt;deployer&lt;/username&gt; &lt;password&gt;123456&lt;/password&gt; &lt;/server&gt; </code></pre> <p>--- pom.xml ---</p> <pre><code>&lt;distributionManagement&gt; &lt;repository&gt; &lt;id&gt;central&lt;/id&gt; &lt;name&gt;Internal Releases&lt;/name&gt; &lt;url&gt;http://myserver.com/artifactory/libs-release-local&lt;/url&gt; &lt;/repository&gt; &lt;snapshotRepository&gt; &lt;id&gt;snapshots&lt;/id&gt; &lt;name&gt;Internal Snapshots&lt;/name&gt; &lt;url&gt;http://myserver.com/artifactory/libs-snapshots-local&lt;/url&gt; &lt;uniqueVersion&gt;false&lt;/uniqueVersion&gt; &lt;/snapshotRepository&gt; &lt;/distributionManagement&gt; </code></pre> <p>execute 'mvn deploy' - again error :(</p> <pre><code>Failed to deploy artifacts: Could not transfer artifact xxx:xxx:war:0.1-20130528.050526-1 from/to snapshots (http://myserver.com/artifactory/libs-snapshots-local) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload