You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2006/11/02 21:57:18 UTC
svn commit: r470518 - in
/incubator/felix/trunk/tools/maven2/maven-bundle-plugin: pom.xml
src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
Author: rickhall
Date: Thu Nov 2 12:57:17 2006
New Revision: 470518
URL: http://svn.apache.org/viewvc?view=rev&rev=470518
Log:
Fixed the version handling of the plugin to only replace the '-' before
the qualifier and removed the default resources to copy.
Modified:
incubator/felix/trunk/tools/maven2/maven-bundle-plugin/pom.xml
incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
Modified: incubator/felix/trunk/tools/maven2/maven-bundle-plugin/pom.xml
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/tools/maven2/maven-bundle-plugin/pom.xml?view=diff&rev=470518&r1=470517&r2=470518
==============================================================================
--- incubator/felix/trunk/tools/maven2/maven-bundle-plugin/pom.xml (original)
+++ incubator/felix/trunk/tools/maven2/maven-bundle-plugin/pom.xml Thu Nov 2 12:57:17 2006
@@ -2,13 +2,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
<parent>
<artifactId>felix</artifactId>
<groupId>org.apache.felix</groupId>
<version>0.8.0-SNAPSHOT</version>
</parent>
--->
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.felix</groupId>
@@ -22,7 +20,7 @@
</repositories>
<packaging>maven-plugin</packaging>
- <name>Maven Plugin OSGi Bundle</name>
+ <name>Maven Bundle Plugin</name>
<description> provides a maven plugin that allows that builds the jar by
embedding packages from the classpath (wildcarded). Plus a zillion
other features. See http://www.aqute.biz/php/tools/bnd.php
@@ -33,7 +31,7 @@
<dependency>
<groupId>biz.aQute</groupId>
<artifactId>bnd</artifactId>
- <version>0.0.95</version>
+ <version>0.0.96</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Modified: incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java?view=diff&rev=470518&r1=470517&r2=470518
==============================================================================
--- incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java (original)
+++ incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java Thu Nov 2 12:57:17 2006
@@ -21,6 +21,7 @@
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
+import java.util.regex.*;
import java.util.zip.ZipException;
import org.apache.maven.artifact.Artifact;
@@ -90,7 +91,12 @@
properties.put(Analyzer.BUNDLE_SYMBOLICNAME, bsn);
properties.put(Analyzer.IMPORT_PACKAGE, "*");
properties.put(Analyzer.EXPORT_PACKAGE, bsn + ".*");
- String version = project.getVersion().replace('-', '.');
+ String version = project.getVersion();
+ Pattern P_VERSION = Pattern.compile("([0-9]+(\\.[0-9])*)-(.*)");
+ Matcher m = P_VERSION.matcher(version);
+ if (m.matches()) {
+ version = m.group(1) + "." + m.group(3);
+ }
properties.put(Analyzer.BUNDLE_VERSION, version);
header(properties, Analyzer.BUNDLE_DESCRIPTION, project
.getDescription());
@@ -99,7 +105,6 @@
header(properties, Analyzer.BUNDLE_NAME, project.getName());
header(properties, Analyzer.BUNDLE_VENDOR, project
.getOrganization());
- header(properties, Analyzer.INCLUDE_RESOURCE, "src/main/resources");
properties.putAll(project.getProperties());
properties.putAll(project.getModel().getProperties());