1

I have my own organization internal repository which is configured as follows in global setting.xml:

   <mirror>             
            <id>nexus-public-snapshots</id>
            <mirrorOf>public-snapshots</mirrorOf>
            <url>http://nexus.tk.com/content/groups/public-snapshots</url>
        </mirror>
        <mirror>
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <url>http://nexus.tk.com/content/groups/public</url>
        </mirror>
    </mirrors>

Is it possible to move the mirror details to parent pom file as repository? so we do not need to change the default setting.xml for each developer and CI server.

I configured repository as follows in project parent pom.xml but could not build the project. Even the required jar file available in internal company repo maven trying to download the jar from central and report an error could not find artifact

<repositories>
    <repository>
        <id>nexus</id>
        <name>Sonatype's Maven repository</name>
        <url>http://nexus.tk.com/content/groups/public</url>
    </repository>
</repositories>
nayakam
  • 4,149
  • 7
  • 42
  • 62
  • http://stackoverflow.com/questions/7065165/maven-repository-lookup-order – nayakam Oct 19 '15 at 22:00
  • http://stackoverflow.com/questions/4972288/maven-repository-mirrors – nayakam Oct 19 '15 at 22:39
  • http://stackoverflow.com/questions/12844693/using-multiple-repositories-in-maven – nayakam Oct 19 '15 at 22:41
  • http://stackoverflow.com/questions/14333577/adding-maven-nexus-repo-to-my-pom-xml – nayakam Oct 19 '15 at 22:53
  • http://stackoverflow.com/questions/2225535/where-is-the-best-place-to-specify-maven-repositories-pom-xml-or-settings-xml – nayakam Oct 20 '15 at 00:29
  • settings.xml file is the real only location to define a company repository...never use pom files for this. On CI server you have to configure that simply once...For the developers should use that already, cause they use other repositories than the one you have defined. – khmarbaise Oct 25 '15 at 16:43
  • @khmarbaise Thanks, That's what I did. – nayakam Oct 26 '15 at 00:50

0 Answers0