You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@onami.apache.org by si...@apache.org on 2013/02/06 16:22:04 UTC
svn commit: r1443012 - /incubator/onami/sandbox/converters/all/pom.xml
Author: simonetripodi
Date: Wed Feb 6 15:22:04 2013
New Revision: 1443012
URL: http://svn.apache.org/viewvc?rev=1443012&view=rev
Log:
create the 'all' converters module my including dependencies *source* packages in order to:
* generate the right META-INF/services/com.google.inject.Module file, which was not merged;
* generate the right OSGi metadata - the bundle-plugin, not finding anything in the compile classpath, didn't include any o.a.onami.converters.* package
The 'side effect' of that approach is that modules have to be compiled turning the 'release' profile on, in order to generate the -sources artifacts that can be included in the 'all' module
Modified:
incubator/onami/sandbox/converters/all/pom.xml
Modified: incubator/onami/sandbox/converters/all/pom.xml
URL: http://svn.apache.org/viewvc/incubator/onami/sandbox/converters/all/pom.xml?rev=1443012&r1=1443011&r2=1443012&view=diff
==============================================================================
--- incubator/onami/sandbox/converters/all/pom.xml (original)
+++ incubator/onami/sandbox/converters/all/pom.xml Wed Feb 6 15:22:04 2013
@@ -33,13 +33,7 @@
<properties>
<site.skip>true</site.skip>
- <osgi.export>
- org.apache.onami.converters.core;version=${project.version}
- org.apache.onami.converters.net;version=${project.version}
- org.apache.onami.converters.numbers;version=${project.version}
- org.apache.onami.converters.sql;version=${project.version}
- </osgi.export>
- <osgi.import>com.google.inject</osgi.import>
+ <osgi.export>org.apache.onami.converters.*;version=${project.version}</osgi.export>
</properties>
<dependencies>
@@ -47,18 +41,21 @@
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.onami.converters.net</artifactId>
<version>${project.version}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.onami.converters.numbers</artifactId>
<version>${project.version}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.apache.onami.converters.sql</artifactId>
<version>${project.version}</version>
+ <scope>provided</scope>
</dependency>
</dependencies>
@@ -76,29 +73,44 @@
</resources>
<plugins>
+ <!-- in order to create the 'all' package, 'release' profile must be active -->
<plugin>
- <groupId>org.sonatype.plugins</groupId>
- <artifactId>jarjar-maven-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>src-dependencies</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+ <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
+ <includeGroupIds>${project.groupId}</includeGroupIds>
+ <excludes>META-INF/*</excludes>
+ <outputDirectory>${project.build.directory}/sources</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
- <phase>package</phase>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
<goals>
- <goal>jarjar</goal>
+ <goal>add-source</goal>
</goals>
<configuration>
- <excludes>
- <exclude>com.google.inject:guice</exclude>
- <exclude>org.kohsuke.metainf-services:metainf-services</exclude>
- <exclude>org.apache.onami:org.apache.onami.test</exclude>
- <exclude>junit:junit</exclude>
- <exclude>org.hamcrest:hamcrest-core</exclude>
- </excludes>
- <rules>
- <keep>
- <pattern>org.apache.onami.converters.**</pattern>
- </keep>
- </rules>
+ <sources>
+ <source>${project.build.directory}/sources</source>
+ </sources>
</configuration>
</execution>
</executions>