upgraded parent pom
git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1635405 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index ce2e59b..1d7d790 100644
--- 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>
diff --git a/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java b/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java
index 9bc9949..08f40f7 100644
--- a/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java
+++ b/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java
@@ -56,6 +56,14 @@
/** 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 @@
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 @@
}
/* 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 @@
* 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() )
{