RepositoryMetadataExceptions

2007-10-19 Thread Kristof Jozsa
Hi,

I think I'm having some progress with my archiva proxy-setup using mirrorOf="*".
I started again from scratch, fetched archiva beta2, unpacked, configured all
remote repositories I'd need and set up the managed internal repo to be a proxy
of them all.

As a test, I'm trying to build archiva-beta3 from svn now via 'mvn clean
install', with a wiped local repository. (This would be the real smoke-test as
other developers will have a clean install of maven with a mirrorOf="*" settings
and no files in their local repository).

The build error looks like this:

--
Project ID: org.apache.maven.plugins:maven-clean-plugin

Reason: Error getting POM for 'org.apache.maven.plugins:maven-clean-plugin' from
the repository: Failed to resolve artifact, possibly due to a repository list
that is not appropriately equipped for this artifact's metadata.
  org.apache.maven.plugins:maven-clean-plugin:pom:2.2-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)
 for project org.apache.maven.plugins:maven-clean-plugin
-- 


and Archiva's console output shows this exceptions:


--
2007-10-19 13:06:02,345 [SocketListener0-3] WARN
org.apache.maven.archiva.repository.metadata.MetadataTools  - Unable to read
metadata:
/usr/local/java/apache-archiva-1.0-beta-2/data/repositories/internal/org/apache/maven/plugins/maven-clean-plugin/maven-metadata-codehaus.xml
org.apache.maven.archiva.repository.metadata.RepositoryMetadataException: file
does not exist:
/usr/local/java/apache-archiva-1.0-beta-2/data/repositories/internal/org/apache/maven/plugins/maven-clean-plugin/maven-metadata-codehaus.xml
-- 


Where "codehaus" is the repository name I've chosen for the configured
snapshots.repository.codehaus.org. The file does not exists indeed and I get
similar exceptions with full stacktraces for most (but not all) of my configured
remote repositories.

Any ideas what happens here?

Kristof


Re: help on downloading through the proxy

2007-10-05 Thread Kristof Jozsa
I'm using this setting (with mirrorOf="*") but I had repeatedly hit the problem
when Archiva is not able to download the same artifacts from the same configured
repositories what maven can do itself without the mirror setting (it only
happens for 1-1 jar out of 50s though).

Also, when using Archiva as a mirror appearently snapshots are checked not only
daily but on every build. This does not happen either using maven standalone.

Kristof

ps. all that happens using Archiva 1.0beta2 and maven 2.0.7.


Emmanuel Venisse wrote:
> 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:
> 
>   
> 
>   central
>   Archiva Mirror Repository
>  
> http://m2repo.atsdev.sensis.com:8080/archiva/repository/internal
>   central-mirror
> 
>   
> 
> 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:
> 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;
>>
>>   
>>
>> 
>>   
>> releases
>> cbrown
>> ...pw snipped...
>>   
>> 
>>
>>
>> myprofile
>> 
>>   true
>> 
>> 
>>   
>> internal
>> Archiva Mirror of Central
>>
>> http://neo.atsdev.sensis.com:8080/archiva/repository/internal
>>
>>   
>>
>> 
>>
>>   
>>
> 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:
> 
>   
> --> internal
> username
> password
>   
> 
> be sure that the username and the password are properly configured in
> Archiva and have all required permissions.
> 
> Hope this would help.
> 
> Angel.
> 
> 
>>
>>