Skip to content

Commit

Permalink
HSEARCH-1556 Introducing maven-bundle-plugin and configure it for the…
Browse files Browse the repository at this point in the history
… deployable artifacts

Conflicts:
	serialization/avro/pom.xml
  • Loading branch information
hferentschik committed Apr 25, 2014
1 parent 75a127d commit 0f60dbf
Show file tree
Hide file tree
Showing 8 changed files with 352 additions and 5 deletions.
41 changes: 41 additions & 0 deletions backends/jgroups/pom.xml
Expand Up @@ -114,6 +114,47 @@
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Import-Package>
org.hibernate.search.*;version="[${project.version},${project.version}]",
org.jgroups.*;version="[${jgroupsVersion},3.6.0)"
</Import-Package>
<Export-Package>
</Export-Package>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
41 changes: 41 additions & 0 deletions backends/jms/pom.xml
Expand Up @@ -116,6 +116,47 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Import-Package>
org.hibernate.search.*;version="[${project.version},${project.version}]",
javax.jms.*;version="1.1.0"
</Import-Package>
<Export-Package>
</Export-Package>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
97 changes: 93 additions & 4 deletions engine/pom.xml
Expand Up @@ -22,7 +22,9 @@
~ 51 Franklin Street, Fifth Floor
~ Boston, MA 02110-1301 USA
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand All @@ -35,7 +37,7 @@
<artifactId>hibernate-search-engine</artifactId>

<name>Hibernate Search Engine</name>
<description>the core of the Object/Lucene mapper, query engine and index management</description>
<description>Core of the Object/Lucene mapper, query engine and index management</description>

<dependencies>
<dependency>
Expand Down Expand Up @@ -132,8 +134,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
Expand Down Expand Up @@ -169,6 +171,93 @@
</bytecodeInjections>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Import-Package>
org.hibernate.annotations.common.*;version="[4,5)",
org.apache.lucene.*;version="[${luceneVersion},4.8.0)",
org.jboss.logging.*;version="[3.1,4.0.0)",
org.apache.tika.*;version="[${tikaVersion}, 1.5)";resolution:=optional,
javax.transaction.*;version="0";resolution:=optional
</Import-Package>
<Export-Package>
org.hibernate.search.analyzer;version="${project.version}",
org.hibernate.search.annotations;version="${project.version}",
org.hibernate.search.backend;version="${project.version}",
org.hibernate.search.backend.spi;version="${project.version}",
org.hibernate.search.backend.impl.batch;version="${project.version}",
org.hibernate.search.batchindexing;version="${project.version}",
org.hibernate.search.bridge;version="${project.version}",
org.hibernate.search.bridge.builtin;version="${project.version}",
org.hibernate.search.bridge.spi;version="${project.version}",
org.hibernate.search.bridge.util.impl;version="${project.version}",
org.hibernate.search.cfg;version="${project.version}",
org.hibernate.search.cfg.spi;version="${project.version}",
org.hibernate.search.engine;version="${project.version}",
org.hibernate.search.engine.spi;version="${project.version}",
org.hibernate.search.engine.service.classloading.spi;version="${project.version}",
org.hibernate.search.engine.service.classloading.impl;version="${project.version}",
org.hibernate.search.engine.service.spi;version="${project.version}",
org.hibernate.search.errors;version="${project.version}",
org.hibernate.search.exception;version="${project.version}",
org.hibernate.search.filter;version="${project.version}",
org.hibernate.search.indexes;version="${project.version}",
org.hibernate.search.indexes.interceptor;version="${project.version}",
org.hibernate.search.indexes.serialization.spi;version="${project.version}",
org.hibernate.search.indexes.spi;version="${project.version}",
org.hibernate.search.jmx;version="${project.version}",
org.hibernate.search.metadata;version="${project.version}",
org.hibernate.search.query;version="${project.version}",
org.hibernate.search.query.collector;version="${project.version}",
org.hibernate.search.query.dsl;version="${project.version}",
org.hibernate.search.query.engine;version="${project.version}",
org.hibernate.search.query.engine.spi;version="${project.version}",
org.hibernate.search.query.facet;version="${project.version}",
org.hibernate.search.query.fieldcache;version="${project.version}",
org.hibernate.search.spatial;version="${project.version}",
org.hibernate.search.spatial.impl;version="${project.version}",
org.hibernate.search.spi;version="${project.version}",
org.hibernate.search.stat;version="${project.version}",
org.hibernate.search.stat.spi;version="${project.version}",
org.hibernate.search.store;version="${project.version}",
org.hibernate.search.store.optimization;version="${project.version}",
org.hibernate.search.util;version="${project.version}",
org.hibernate.search.util.impl;version="${project.version}",
org.hibernate.search.util.logging.impl;version="${project.version}"
</Export-Package>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
Expand Down
42 changes: 42 additions & 0 deletions infinispan/pom.xml
Expand Up @@ -146,6 +146,48 @@
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Import-Package>
org.hibernate.search.*;version="[${project.version},${project.version}]",
org.infinispan.lucene.*;version="[${infinispanVersion},7.1.0)"
</Import-Package>
<Export-Package>
org.hibernate.search.infinispan;version="${project.version}"
</Export-Package>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
54 changes: 53 additions & 1 deletion orm/pom.xml
Expand Up @@ -22,7 +22,9 @@
~ 51 Franklin Street, Fifth Floor
~ Boston, MA 02110-1301 USA
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -159,6 +161,56 @@
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Import-Package>
org.hibernate.annotations.common.*;version="[4,5)",
org.hibernate.search.*;version="[${project.version},${project.version}]",
<!-- the following search engine imports are explicitly listed, since they are not automatically generated by the plugin. BUG!?-->
org.hibernate.search.spatial.impl;version="[${project.version},${project.version}]",
org.hibernate.search.util.impl;version="[${project.version},${project.version}]",
org.apache.lucene.*;version="[${luceneVersion},4.8.0)",
org.hibernate.*;version="[4.3.4,4.4.0)",
javax.transaction;version="[1.1,2)",
javax.persistence.*;version="[2.0.0,3.0.0)";resolution:=optional
</Import-Package>
<Export-Package>
org.hibernate.search;version="${project.version}",
org.hibernate.search.jpa;version="${project.version}"
</Export-Package>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Expand Up @@ -947,6 +947,11 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
</plugin>
<plugin>
<!-- This plugin's configuration is used in m2e only. -->
<groupId>org.eclipse.m2e</groupId>
Expand Down
39 changes: 39 additions & 0 deletions serialization/avro/pom.xml
Expand Up @@ -94,6 +94,45 @@
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Import-Package>
org.hibernate.search.*;version="[${project.version},${project.version}]",
org.apache.avro.*;version="[${avroVersion},1.8.0)"
</Import-Package>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 0f60dbf

Please sign in to comment.