If you want to always download artifacts from your Archiva, you must define a
mirror of central instead of a repository in your settings.xml:
<mirrors>
<mirror>
<mirrorOf>central</mirrorOf>
<name>Archiva Mirror Repository</name>
<url>http://m2repo.atsdev.sensis.com:8080/archiva/repository/internal</url>
<id>central-mirror</id>
</mirror>
</mirrors>
Emmanuel
cbrown a écrit :
Actually, there are instances when mvn still goes directly to Central.
E.g. below it loads junit out of the archiva repo, but pulls all the
surefire components from http://repo1.maven.org/maven2, without even
touching the archiva site.
Since I don't have central in any of my settings or poms, it must be
hardcoded into surefire itself.
54) mst1::/export/home/cbrown/junk/my-app> mvn clean install
[INFO] Scanning for projects...
WAGON_VERSION: 1.0-beta-2
[INFO]
----------------------------------------------------------------------------
[INFO] Building my-app
[INFO] task-segment: [clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /export/home/cbrown/junk/my-app/target
[INFO] Deleting directory /export/home/cbrown/junk/my-app/target/classes
[INFO] Deleting
directory /export/home/cbrown/junk/my-app/target/test-classes
[INFO] Deleting directory /export/home/cbrown/junk/my-app/target/site
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file
to /export/home/cbrown/junk/my-app/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
Downloading:
http://m2repo.atsdev.sensis.com:8080/archiva/repository/internal/junit/junit/3.8.1/junit-3.8.1.jar
118K downloaded
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file
to /export/home/cbrown/junk/my-app/target/test-classes
[INFO] [surefire:test]
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/surefire/surefire-junit/2.3/surefire-junit-2.3.pom
583b downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/surefire/surefire-providers/2.3/surefire-providers-2.3.pom
1K downloaded
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/surefire/surefire-junit/2.3/surefire-junit-2.3.jar
10K downloaded
[INFO] Surefire report
directory: /export/home/cbrown/junk/my-app/target/surefire-reports
-------------------------------------------------------
T E S T S
On Fri, 2007-10-05 at 08:47 -0400, cbrown wrote:
That works, thank you.
On Thu, 2007-10-04 at 17:44 -0400, Angel Sotirov wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
cbrown wrote:
When i try to download component through archiva, it fails, and the
archiva console shows;
INFO: RepositoryServlet: Authorization Denied
[ip=172.17.1.3,isWriteRequest=false,permission=archiva-read-repository,repo=internal]
: no matching permissions
Oct 4, 2007 1:43:46 PM org.mortbay.jetty.servlet.ServletHandler$Context
log
what am I missing?
in settings.xml I have;
<settings>
<servers>
<server>
<id>releases</id>
<username>cbrown</username>
<password>...pw snipped...</password>
</server>
</servers>
<profiles>
<profile>
<id>myprofile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>internal</id>
<name>Archiva Mirror of Central</name>
<url>http://neo.atsdev.sensis.com:8080/archiva/repository/internal</url>
</repository>
</repositories>
</profile>
</profiles>
</settings>
Yeah i had the same problem with my first installation.
Resolution seem to be adding a server with the same ID as your
repository in this case:
<server>
- --> <id>internal</id>
<username>username</username>
<password>password</password>
</server>
be sure that the username and the password are properly configured in
Archiva and have all required permissions.
Hope this would help.
Angel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
iD8DBQFHBV6uhgSIDFxSFd0RAvu+AKC7Tj1hyJlvg8epnsykfQ621VHFIACbBIiD
qe9mzCH+OHovfwbnqFgshfM=
=03OC
-----END PGP SIGNATURE-----