archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angel Sotirov <an...@devbg.piranko.com>
Subject Re: help on downloading through the proxy
Date Fri, 05 Oct 2007 16:48:49 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

cbrown wrote:
> 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:
> 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.
>
>
Nope what I think you want is called a local mirror, Maven's default
config is set to http://repo1.maven.org/maven2. You should override
this behavior  either  in your M2_HOME/settings.xml or inside the
project POM. There is a nice reference for the settings.xml and the
POM at maven.apache.org you should take a look at it and become
familiar it.
    What you have to do in order to override the default mirror is add:

<settings>
 ...
 <mirrors>
    <mirror>
      <mirrorOf>*</mirrorOf>
   
<url>http://devbg.piranko.com:8080/archiva/repository/world-proxy</url>
      <id>world-mirror</id>
      <name>Piranko Software Archiva Mirror</name>
    </mirror>

...
</settings>
in your setting.xml. Remember you can add as many mirrors as you want
here and don't forget to set the appropriate proxy connectors you need
in Archiva.

Cheerz,

Angel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFHBmrwhgSIDFxSFd0RAiQUAKCkq/UPAnfUP/PMh+te/vn9i3DawgCg0HnR
Csus2qYSJqIUbrAYZJ69w90=
=ywIc
-----END PGP SIGNATURE-----


Mime
View raw message