Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Through much trial and error I came to a configuration quite similar to Raghuram's. Yet, using archiva, I found one or two things that might still be noteworthy. Also, I used the mirrors in my configuration to be accessed by my projects (set in <code>&lt;distributionManagement/&gt;</code> in the pom.xml), instead of directly accessing the repositories.</p> <p>This is the relevant part of my maven settings.xml:</p> <pre><code>&lt;!-- set up servers to point to mirror, for use in project pom --&gt; &lt;servers&gt; &lt;server&gt; &lt;id&gt;my.snapshots&lt;/id&gt; &lt;!-- use name of the mirror here --&gt; &lt;username&gt;user&lt;/username&gt; &lt;password&gt;pwd&lt;/password&gt; &lt;/server&gt; &lt;/servers&gt; &lt;!-- map mirror names to actual repositories --&gt; &lt;mirrors&gt; &lt;!-- leave the default mirror in place --&gt; &lt;mirror&gt; &lt;id&gt;archiva.default&lt;/id&gt; &lt;mirrorOf&gt;*&lt;/mirrorOf&gt; &lt;url&gt;http://server:port/archiva/repository/internal/&lt;/url&gt; &lt;/mirror&gt; &lt;!-- enter my own --&gt; &lt;mirror&gt; &lt;id&gt;my.snapshots&lt;/id&gt; &lt;mirrorOf&gt;archiva.snapshots&lt;/mirrorOf&gt; &lt;url&gt;http://server:port/archiva/repository/snapshots/&lt;/url&gt; &lt;/mirror&gt; &lt;mirrors&gt; &lt;!-- activate the repo for artifact downloads by setting profile --&gt; &lt;profiles&gt; &lt;activation&gt; &lt;activeByDefault&gt;true&lt;/activeByDefault&gt; &lt;/activation&gt; &lt;repositories&gt; &lt;repository&gt; &lt;!-- mirror will be used during runtime instead of this --&gt; &lt;id&gt;archiva.snapshots&lt;/id&gt; &lt;!-- do not use mirror name here --&gt; &lt;url&gt;http://server:port/archiva/repository/snapshots/&lt;/url&gt; &lt;releases&gt; &lt;enabled&gt;false&lt;/enabled&gt; &lt;/releases&gt; &lt;snapshots&gt; &lt;enabled&gt;true&lt;/enabled&gt; &lt;/snapshots&gt; &lt;/repository&gt; &lt;/repositories&gt; &lt;/profile&gt; </code></pre> <p>I found out that I had to give different ids in the <code>&lt;mirrors&gt;</code> section than in the <code>&lt;profiles&gt;</code> section, so I seemingly wasn't allowed to give them the same name as Raghuram did.</p> <p>Now, with the settings.xml in place, I set out to change the <code>&lt;distributionManagement&gt;</code> section in my project's pom.xml. To be precise, I changed this setting in a pom that is parent to all my projects: It chiefly contains the <code>&lt;distributionManagement&gt;</code> section and little else. This parent pom is itself deployed to archiva.</p> <p>This is the relevant section of the parent pom.xml:</p> <pre><code>&lt;distributionManagement&gt; &lt;repository&gt; ... &lt;/repository&gt; &lt;snapshotRepository&gt; &lt;id&gt;my.snapshots&lt;/id&gt; &lt;name&gt;Archiva Managed Snapshot Repository&lt;/name&gt; &lt;url&gt;http://server:port/archiva/repository/snapshots&lt;/url&gt; &lt;layout&gt;default&lt;/layout&gt; &lt;/snapshotRepository&gt; &lt;/distributionManagement&gt; </code></pre> <p>This kind of streamlined things, and it has, I think, some benefits:</p> <ul> <li><p>I am now able to build projects depending on my own artifacts (including parent pom), without having either of those artifacts in my local build repository (I wiped my local repository for testing this).</p></li> <li><p>Downloads (the <code>&lt;dependencies&gt;</code> sections of the pom.xml) as well as uploads (the <code>&lt;distributionManagement&gt;</code> sections of the pom.xml) are now handled via the mirrors.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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