diff options
author | Olivier Lamy <olamy@apache.org> | 2011-11-24 23:04:57 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-11-24 23:04:57 +0000 |
commit | 07a70248ebc9bb3d2f06f4dd256fe1b03bb3bd8d (patch) | |
tree | bec6fb372cf14a125df11325500f0900c031f3b9 | |
parent | 435ca5f9c21a887e1078ec85483d150aef63d9cf (diff) | |
download | archiva-07a70248ebc9bb3d2f06f4dd256fe1b03bb3bd8d.tar.gz archiva-07a70248ebc9bb3d2f06f4dd256fe1b03bb3bd8d.zip |
[MRM-1562] Update to Archiva as OSGi compliant application
Archiva REST and Archiva RSS as OSGi bundle.
Submitted by Jean-Baptiste Onofre.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1206014 13f79535-47bb-0310-9956-ffa450edef68
5 files changed, 79 insertions, 0 deletions
diff --git a/archiva-modules/archiva-karaf/archiva-features/pom.xml b/archiva-modules/archiva-karaf/archiva-features/pom.xml index 42804b796..d018ccfa5 100644 --- a/archiva-modules/archiva-karaf/archiva-features/pom.xml +++ b/archiva-modules/archiva-karaf/archiva-features/pom.xml @@ -58,6 +58,7 @@ <plexus-interpolation.version>1.14</plexus-interpolation.version> <plexus-velocity.version>1.1.8</plexus-velocity.version> <quartz.bundle.version>2.1.0_1-SNAPSHOT</quartz.bundle.version> + <rome.bundle.version>1.0_2</rome.bundle.version> <servicemix.specs.version>1.9.0</servicemix.specs.version> <sisu-inject-bean.version>2.3.0</sisu-inject-bean.version> <sisu-guava.version>0.9.9</sisu-guava.version> diff --git a/archiva-modules/archiva-karaf/archiva-features/src/main/resources/features.xml b/archiva-modules/archiva-karaf/archiva-features/src/main/resources/features.xml index 8f8b8447e..438475aa9 100644 --- a/archiva-modules/archiva-karaf/archiva-features/src/main/resources/features.xml +++ b/archiva-modules/archiva-karaf/archiva-features/src/main/resources/features.xml @@ -15,6 +15,8 @@ --> <features name="archiva-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.0.0"> + <repository>mvn:org.apache.cxf.karaf/apache-cxf/${cxfVersion}/xml/features</repository> + <feature name="archiva-common" description="Archiva Common module" version="${project.version}" resolver="(obr)"> <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-lang/${commons-lang.bundle.version}</bundle> <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-inject/${javax-inject.bundle.version}</bundle> @@ -308,6 +310,23 @@ <bundle>mvn:org.apache.archiva/archiva-security-common/${project.version}</bundle> </feature> + <feature name="archiva-rest-api" description="Archiva REST API module" version="${project.version}" resolver="(obr)"> + <feature version="[2.4,3)">cxf</feature> + <feature version="${project.version}">archiva-common</feature> + <feature version="${project.version}">archiva-repository-admin-api</feature> + <bundle>mvn:org.apache.archiva/archiva-rest-api/${project.version}</bundle> + </feature> + <feature name="archiva-rest-services" description="Archiva REST Services module" version="${project.version}" resolver="(obr)"> + <feature version="${project.version}">archiva-rest-api</feature> + <bundle>mvn:org.apache.archiva/archiva-rest-services/${project.version}</bundle> + </feature> + + <feature name="archiva-rss" description="Archiva RSS module" version="${project.version}" resolver="(obr)"> + <feature version="${project.version}">archiva-common</feature> + <feature version="${project.version}">archiva-metadata</feature> + <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.rome/${rome.bundle.version}</bundle> + <bundle>mvn:org.apache.archiva/archiva-rss/${project.version}</bundle> + </feature> </features>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml index 0684a4892..d45698283 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml @@ -25,6 +25,7 @@ <version>1.4-M2-SNAPSHOT</version> </parent> <artifactId>archiva-rest-api</artifactId> + <packaging>bundle</packaging> <name>Archiva Web :: REST support :: Api</name> <dependencies> @@ -78,6 +79,26 @@ <build> <plugins> <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <configuration> + <instructions> + <Bundle-SymbolicName>org.apache.archiva.rest.api</Bundle-SymbolicName> + <Bundle-Version>${project.version}</Bundle-Version> + <Export-Package> + org.apache.archiva.rest.api.model;version=${project.version};-split-package:=merge-first, + org.apache.archiva.rest.api.services;version=${project.version};-split-package:=merge-first + </Export-Package> + <Import-Package> + javax.ws.rs, + javax.xml.bind.annotation, + org.apache.archiva.admin.model.beans;version=${project.version}, + org.codehaus.plexus.redback.authorization + </Import-Package> + </instructions> + </configuration> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml index aeeb2fd32..584a53426 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml @@ -26,6 +26,7 @@ </parent> <artifactId>archiva-rest-services</artifactId> <version>1.4-M2-SNAPSHOT</version> + <packaging>bundle</packaging> <name>Archiva Web :: REST support :: Services</name> <properties> @@ -273,6 +274,17 @@ </pluginManagement> <plugins> <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <configuration> + <instructions> + <Bundle-SymbolicName>org.apache.archiva.rest.services</Bundle-SymbolicName> + <Bundle-Version>${project.version}</Bundle-Version> + <Require-Bundle>org.apache.cxf.bundle,org.springframework.beans,org.apache.archiva.rest.api</Require-Bundle> + </instructions> + </configuration> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> diff --git a/archiva-modules/archiva-web/archiva-rss/pom.xml b/archiva-modules/archiva-web/archiva-rss/pom.xml index 3df19830a..2e07ca523 100644 --- a/archiva-modules/archiva-web/archiva-rss/pom.xml +++ b/archiva-modules/archiva-web/archiva-rss/pom.xml @@ -26,6 +26,7 @@ </parent> <modelVersion>4.0.0</modelVersion> <artifactId>archiva-rss</artifactId> + <packaging>bundle</packaging> <name>Archiva Web :: RSS</name> <dependencies> <dependency> @@ -66,4 +67,29 @@ <scope>test</scope> </dependency> </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <configuration> + <instructions> + <Bundle-SymbolicName>org.apache.archiva.rss</Bundle-SymbolicName> + <Bundle-Version>${project.version}</Bundle-Version> + <Export-Package> + org.apache.archiva.rss*;version=${project.version};-split-package:=merge-first + </Export-Package> + <Import-Package> + javax.inject, + org.apache.archiva.metadata.model;version=${project.version}, + org.apache.archiva.metadata.repository;version=${project.version}, + com.sun.syndication*;version="[0.9,2)", + org.springframework*;version="[3,4)", + org.slf4j;resolution:=optional + </Import-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> </project> |