[maven-release-plugin] copy for tag mercury-1.0.0-alpha-3
git-svn-id: https://svn.apache.org/repos/asf/maven/mercury/tags/mercury-1.0.0-alpha-3@737251 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/mercury-it/pom.xml b/mercury-it/pom.xml
index 372177b..fb01c92 100644
--- a/mercury-it/pom.xml
+++ b/mercury-it/pom.xml
@@ -33,7 +33,7 @@
<properties>
<maven.version>3.0-SNAPSHOT</maven.version>
- <spice.model.builder.version>1.1</spice.model.builder.version>
+ <spice.model.builder.version>1.2</spice.model.builder.version>
<nexus.version>1.0.1</nexus.version>
<nexus.client.version>1.1-M1</nexus.client.version>
diff --git a/mercury-plexus/src/main/java/org/apache/maven/mercury/plexus/DefaultPlexusMercury.java b/mercury-plexus/src/main/java/org/apache/maven/mercury/plexus/DefaultPlexusMercury.java
index 6f1761d..9a7be23 100644
--- a/mercury-plexus/src/main/java/org/apache/maven/mercury/plexus/DefaultPlexusMercury.java
+++ b/mercury-plexus/src/main/java/org/apache/maven/mercury/plexus/DefaultPlexusMercury.java
@@ -226,8 +226,11 @@
if( ar == null || !ar.hasResults() )
return null;
- if( ar.hasExceptions() )
- throw new RepositoryException( ar.getExceptions().toString() );
+ if( ar.hasExceptions() && LOG.isWarnEnabled() )
+ LOG.info( ar.getExceptions().toString() );
+
+ if( !ar.hasResults() )
+ return null;
Map<ArtifactBasicMetadata, List<Artifact>> am = ar.getResults();
@@ -296,18 +299,6 @@
try
{
DependencyBuilder depBuilder = DependencyBuilderFactory.create( DependencyBuilderFactory.JAVA_DEPENDENCY_MODEL, repos );
-
-// ArtifactBasicMetadata a = artifacts.getMetadataList().get( 0 );
-//
-// if( inclusions != null && ! inclusions.isEmpty() )
-// a.setInclusions( inclusions.getMetadataList() );
-//
-// if( exclusions != null && ! exclusions.isEmpty() )
-// a.setExclusions( exclusions.getMetadataList() );
-//
-// MetadataTreeNode root = depBuilder.buildTree( a, scope );
-//
-// List<ArtifactMetadata> res = depBuilder.resolveConflicts( root );
List<ArtifactMetadata> res = depBuilder.resolveConflicts( scope, artifacts, inclusions, exclusions );
@@ -341,8 +332,8 @@
if( res == null )
return null;
- if( res.hasExceptions() )
- throw new RepositoryException( res.getExceptions().toString() );
+ if( res.hasExceptions() && LOG.isWarnEnabled() )
+ LOG.warn( res.getExceptions().toString() );
return res.getResult( query );
}
diff --git a/mercury-repo/mercury-repo-local-m2/src/test/java/org/apache/maven/mercury/repository/local/m2/ArtifactLocationtest.java b/mercury-repo/mercury-repo-local-m2/src/test/java/org/apache/maven/mercury/repository/local/m2/ArtifactLocationtest.java
new file mode 100644
index 0000000..85895fb
--- /dev/null
+++ b/mercury-repo/mercury-repo-local-m2/src/test/java/org/apache/maven/mercury/repository/local/m2/ArtifactLocationtest.java
@@ -0,0 +1,67 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package org.apache.maven.mercury.repository.local.m2;
+
+import org.apache.maven.mercury.artifact.ArtifactBasicMetadata;
+
+import junit.framework.TestCase;
+
+/**
+ *
+ *
+ * @author Oleg Gusakov
+ * @version $Id$
+ *
+ */
+public class ArtifactLocationtest
+ extends TestCase
+{
+
+ protected void setUp()
+ throws Exception
+ {
+ }
+
+ public void testChopTS()
+ throws Exception
+ {
+ ArtifactLocation loc = new ArtifactLocation( "test", new ArtifactBasicMetadata("a:a:3.0-alpha-1-20080920.015600-7") );
+
+ String chop = loc.getVersionWithoutTS();
+
+ assertEquals( "3.0-alpha-1", chop );
+
+
+ loc = new ArtifactLocation( "test", new ArtifactBasicMetadata("a:a:3.0-20080920.015600-7") );
+
+ chop = loc.getVersionWithoutTS();
+
+ assertEquals( "3.0", chop );
+
+
+ loc = new ArtifactLocation( "test", new ArtifactBasicMetadata("a:a:3.0-20080920.0156007") );
+
+ chop = loc.getVersionWithoutTS();
+
+ assertEquals( "3.0-20080920.0156007", chop );
+ }
+
+
+}
diff --git a/pom.xml b/pom.xml
index 5bdeae6..0eb4091 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,11 +79,11 @@
<commons.digester.version>1.8</commons.digester.version>
<commons.cli.version>1.1</commons.cli.version>
- <jetty.version>6.1.15.pre0</jetty.version>
- <jetty.client.version>6.1.15.pre0</jetty.client.version>
+ <jetty.version>6.1.15.rc2</jetty.version>
+ <jetty.client.version>6.1.15.rc2</jetty.client.version>
<jetty.servlet.api.version>6.1.14</jetty.servlet.api.version>
- <jetty.util5.version>6.1.15.pre0</jetty.util5.version>
- <jetty.servlet.tester.version>6.1.15.pre0</jetty.servlet.tester.version>
+ <jetty.util5.version>6.1.15.rc2</jetty.util5.version>
+ <jetty.servlet.tester.version>6.1.15.rc2</jetty.servlet.tester.version>
<junit.version>3.8.1</junit.version>