Hi Benjamin,

first many thanks for your hints....

But now i working on a small test program (FindAvailableVersions from Aether
Demo) to check how Aether is working and how i have to use it...

I observed a little thing which i didn't understand...
If i run the example the first time i got the following exception:

Resolving metadata com.company.sales:artifact-common/maven-metadata.xml from
/home/ubuntu/ws-git/current-version/target/local-repo (enhanced)
Resolved metadata com.company.sales:artifact-common/maven-metadata.xml from
/home/ubuntu/ws-git/current-version/target/local-repo (enhanced)
Resolving metadata com.company.sales:artifact-common/maven-metadata.xml from
company-releases
(http://mavenrepo.localdomain:8081/nexus/content/groups/company-releases,
releases)
Resolving metadata com.company.sales:artifact-common/maven-metadata.xml from
central
(http://mavenrepo.localdomain:8081/nexus/content/groups/ext-releases,
releases)
Resolving metadata com.company.sales:artifact-common/maven-metadata.xml from
company-snapshots
(http://mavenrepo.localdomain:8081/nexus/content/groups/company-snapshots,
snapshots)
Resolving metadata com.company.sales:artifact-common/maven-metadata.xml from
company-plugins
(http://mavenrepo.localdomain:8081/nexus/content/groups/company-plugins,
releases)
Downloading:
http://mavenrepo.localdomain:8081/nexus/content/groups/company-releases/com.company.sales/artifact-common/maven-metadata.xml
Downloading:
http://mavenrepo.localdomain:8081/nexus/content/groups/ext-releases/com.company.sales/artifact-common/maven-metadata.xml
Downloading:
http://mavenrepo.localdomain:8081/nexus/content/groups/company-snapshots/com.company.sales/artifact-common/maven-metadata.xml
Downloading:
http://mavenrepo.localdomain:8081/nexus/content/groups/company-plugins/com.company.sales/artifact-common/maven-metadata.xml

org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate
resource in repository
        at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:139)
        at 
org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
        at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
        at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
        at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:608)
        at
org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:64)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.FileNotFoundException:
http://mavenrepo.localdomain:8081/nexus/content/groups/ext-releases/com.company.sales/artifact-common/maven-metadata.xml
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at
sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1491)
        at java.security.AccessController.doPrivileged(Native Method)
        at
sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1485)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
        at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:122)
        ... 8 more
Caused by: java.io.FileNotFoundException:
http://mavenrepo.localdomain:8081/nexus/content/groups/ext-releases/com.company.sales/artifact-common/maven-metadata.xml
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434)
        at 
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
        at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)
        ... 8 more
2 KB   
2 KB   2 KB   
              
              
Downloaded:
http://mavenrepo.localdomain:8081/nexus/content/groups/company-releases/com.company.sales/artifact-common/maven-metadata.xml
(2 KB at 1.9 KB/sec)
Downloaded:
http://mavenrepo.localdomain:8081/nexus/content/groups/company-plugins/com.company.sales/artifact-common/maven-metadata.xml
(2 KB at 2.0 KB/sec)
345 B         
        
Downloaded:
http://mavenrepo.localdomain:8081/nexus/content/groups/company-snapshots/com.company.sales/artifact-common/maven-metadata.xml
(345 B at 0.3 KB/sec)
Resolved metadata com.company.sales:artifact-common/maven-metadata.xml from
company-releases
(http://mavenrepo.localdomain:8081/nexus/content/groups/company-releases,
releases)
Resolved metadata com.company.sales:artifact-common/maven-metadata.xml from
central
(http://mavenrepo.localdomain:8081/nexus/content/groups/ext-releases,
releases)
Resolved metadata com.company.sales:artifact-common/maven-metadata.xml from
company-snapshots
(http://mavenrepo.localdomain:8081/nexus/content/groups/company-snapshots,
snapshots)
Resolved metadata com.company.sales:artifact-common/maven-metadata.xml from
company-plugins
(http://mavenrepo.localdomain:8081/nexus/content/groups/company-plugins,
releases)
Available versions [y, 0.1.3-SNAPSHOT, 0.1.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8,
1.0.9, 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.0.14, 1.0.15, 1.0.16, 1.0.17,
1.0.18, 1.0.19, 1.0.20, 1.0.21, 1.0.22, 1.0.23, 1.0.24, 1.0.25, 1.0.26,
1.0.27]
Newest Version:1.0.27

Furthermore in the interface RepositorySystem the method


 VersionRangeResult resolveVersionRange( RepositorySystemSession session,
VersionRangeRequest request )
        throws VersionRangeResolutionException;

does not define this kind of Exception so i have no chance to catch such
kind of exception...
If i run the example the second time the exception does not appear a second
time....and not on all further runnings...
If i delete the local repository and start it again i got the above
exception...

So may be someone has a good hint about that...

Many thanks in advance

Kind regards

Karl Heinz Marbiase


-----
Kind regards
Karl Heinz Marbaise
----
http://www.soebes.de
http://www.skmwiki.de
http://supose.org/wiki/supose
--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-Aether-Repositories-from-settings-xml-tp4315216p4343057.html
Sent from the Maven - Users mailing list archive at Nabble.com.

Reply via email to