Hi,

 

Maven 2.0.4

 

We are trying to prevent any users from accessing the central repository
by providing a controlled internal corporate repository.

 

I do a build with a vanilla settings.xml add any stuff I need to my
local repository by hand. Then make a network copy of the local
repository delete my local repository and then my troubles start.

 

Reading a number of posts this should be as simple as creating a
definition in the settings.xml (or in the POM) for repositories

 

<project>

. . .

            <repositories>

                        <repository>

                                    <releases>

                                                <enabled>true</enabled>

                                                <updatePolicy/>

                                                <checksumPolicy/>

                                    </releases>

                                    <snapshots>

                                                <enabled>false</enabled>

 
<updatePolicy>never</updatePolicy>

 
<checksumPolicy>fail</checksumPolicy>

                                    </snapshots>

                                    <id>test</id>

                                    <name>Dialect Central</name>

                                    <url>file:///\\
fileServer01/repository</url>

                                    <layout/>

                        </repository>

            </repositories>

            <pluginRepositories>

                        <pluginRepository>

                                    <releases>

                                                <enabled>false</enabled>

                                                <updatePolicy/>

                                                <checksumPolicy/>

                                    </releases>

                                    <snapshots>

                                                <enabled>false</enabled>

 
<updatePolicy>never</updatePolicy>

 
<checksumPolicy>fail</checksumPolicy>

                                    </snapshots>

                                    <id>central</id>

                                    <name>Dialect Central</name>

 
<url>file:///\\fileServer01/repository</url>

                                    <layout/>

                        </pluginRepository>

            </pluginRepositories>

. . . 

</project>

 

However this does not work Maven seems to get quite confused if it does
not find a real central Repository.

 

I have tried to get it working by defining a mirror of central

 

<settings>

. . . 

  <mirrors>

    <mirror>

      <id>mirror-maven-central</id>

      <mirrorOf>central</mirrorOf>

      <name>Local Override For Maven Central Repository</name>

      <url>file:///\\fileServer01\repository\</url>

    </mirror>

 

  </mirrors>

. . . 

</settings>

 

This seems to have problems not finding maven-resources-plugin but it is
there in the network repository (which is just a copy of local) before I
tear all my hair out has anyone else had any similar problems.

 

 

Peter Anning

Sr Software Engineer

Reply via email to