upgraded parent pom
authorHerve Boutemy <hboutemy@apache.org>
Thu, 30 Oct 2014 06:40:10 +0000 (06:40 +0000)
committerHerve Boutemy <hboutemy@apache.org>
Thu, 30 Oct 2014 06:40:10 +0000 (06:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1635405 13f79535-47bb-0310-9956-ffa450edef68

pom.xml
src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java

diff --git a/pom.xml b/pom.xml
index ce2e59b..1d7d790 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.shared</groupId>
     <artifactId>maven-shared-components</artifactId>
-    <version>20</version>
+    <version>21</version>
     <relativePath>../maven-shared-components/pom.xml</relativePath>
   </parent>
 
index 9bc9949..08f40f7 100644 (file)
@@ -56,6 +56,14 @@ public class DefaultMaven2OsgiConverter
     /** pattern that matches strings that contain only numbers */
     private static final Pattern ONLY_NUMBERS = Pattern.compile( "[0-9]+" );
 
+    private static final Pattern DATED_SNAPSHOT =
+        Pattern.compile( "([0-9])(\\.([0-9]))?(\\.([0-9]))?\\-([0-9]{8}\\.[0-9]{6}\\-[0-9]*)" );
+
+    private static final Pattern DOTS_IN_QUALIFIER =
+        Pattern.compile( "([0-9])(\\.[0-9])?\\.([0-9A-Za-z_-]+)\\.([0-9A-Za-z_-]+)" );
+
+    private static final Pattern NEED_TO_FILL_ZEROS = Pattern.compile( "([0-9])(\\.([0-9]))?(\\.([0-9A-Za-z_-]+))?" );
+
     private static final String FILE_SEPARATOR = System.getProperty( "file.separator" );
 
     private String getBundleSymbolicName( String groupId, String artifactId )
@@ -251,7 +259,6 @@ public class DefaultMaven2OsgiConverter
         osgiVersion = version;
 
         /* check for dated snapshot versions with only major or major and minor */
-        Pattern DATED_SNAPSHOT = Pattern.compile( "([0-9])(\\.([0-9]))?(\\.([0-9]))?\\-([0-9]{8}\\.[0-9]{6}\\-[0-9]*)" );
         m = DATED_SNAPSHOT.matcher( osgiVersion );
         if ( m.matches() )
         {
@@ -272,7 +279,6 @@ public class DefaultMaven2OsgiConverter
         }
 
         /* remove dots in the middle of the qualifier */
-        Pattern DOTS_IN_QUALIFIER = Pattern.compile( "([0-9])(\\.[0-9])?\\.([0-9A-Za-z_-]+)\\.([0-9A-Za-z_-]+)" );
         m = DOTS_IN_QUALIFIER.matcher( osgiVersion );
         if ( m.matches() )
         {
@@ -298,8 +304,6 @@ public class DefaultMaven2OsgiConverter
          * 1          -> 1.0.0
          * 1.1        -> 1.1.0
          */
-        //Pattern NEED_TO_FILL_ZEROS = Pattern.compile( "([0-9])(\\.([0-9]))?\\.([0-9A-Za-z_-]+)" );
-        Pattern NEED_TO_FILL_ZEROS = Pattern.compile( "([0-9])(\\.([0-9]))?(\\.([0-9A-Za-z_-]+))?" );
         m = NEED_TO_FILL_ZEROS.matcher( osgiVersion );
         if ( m.matches() )
         {