Fix bundles

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@765784 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Musachy Barroso
2009-04-16 22:01:56 +00:00
parent 71ceffdd95
commit 3b4961066b
5 changed files with 43 additions and 88 deletions
+16 -46
View File
@@ -2,36 +2,30 @@
<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>
<groupId>org.apache.struts.osgi</groupId>
<artifactId>struts2-admin-bundle</artifactId>
<version>1.0.0-SNAPSHOT</version>
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.1.7-SNAPSHOT</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-admin-bundle</artifactId>
<packaging>bundle</packaging>
<name>Struts 2 OSGi Admin Bundle</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/admin/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/admin/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/bundles/admin/</url>
</scm>
<dependencies>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>3.8.1</version>
</dependency>
<version>${pom.version}</version>
</dependency>
</dependencies>
<properties>
<jdkLevel>1.5</jdkLevel>
</properties>
<build>
<plugins>
<plugin>
@@ -49,30 +43,6 @@
</instructions>
</configuration>
</plugin>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
+23 -28
View File
@@ -2,19 +2,24 @@
<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>
<groupId>org.apache.struts.osgi</groupId>
<artifactId>struts2-demo-bundle</artifactId>
<version>1.0.0-SNAPSHOT</version>
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.1.7-SNAPSHOT</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-demo-bundle</artifactId>
<packaging>bundle</packaging>
<name>Struts 2 OSGi Demo Bundle</name>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/demo/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/bundles/demo/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/bundles/demo/</url>
</scm>
<dependencies>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.1.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
@@ -32,24 +37,25 @@
<artifactId>commons-digester</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>2.1.7-SNAPSHOT</version>
<version>${pom.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>2.1.7-SNAPSHOT</version>
<version>${pom.version}</version>
</dependency>
</dependencies>
<build>
@@ -69,16 +75,5 @@
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
@@ -25,7 +25,6 @@ import org.osgi.framework.Bundle;
import org.apache.struts2.osgi.interceptor.BundleContextAware;
import org.apache.struts2.osgi.interceptor.ServiceAware;
import org.apache.struts2.convention.annotation.ResultPath;
import org.springframework.context.ApplicationContext;
import java.util.List;
@@ -35,22 +34,13 @@ import com.opensymphony.xwork2.ActionSupport;
* This action shows how to interact with the OSGi container, using the OSGi interceptor
*/
@ResultPath("/content")
public class BundlesAction extends ActionSupport implements BundleContextAware, ServiceAware<ApplicationContext> {
public class BundlesAction extends ActionSupport implements BundleContextAware {
private BundleContext bundleContext;
private List<ApplicationContext> services;
public void setServices(List<ApplicationContext> services) {
this.services = services;
}
public void setBundleContext(BundleContext bundleContext) {
this.bundleContext = bundleContext;
}
public int getApplicationContextsCount() {
return services.size();
}
public Bundle[] getBundles() {
return bundleContext.getBundles();
}
@@ -6,7 +6,6 @@ import org.apache.struts2.convention.annotation.ResultPath;
import org.apache.struts2.osgi.interceptor.BundleContextAware;
import org.apache.struts2.osgi.interceptor.ServiceAware;
import org.osgi.framework.BundleContext;
import org.springframework.context.ApplicationContext;
import java.util.List;
+3 -2
View File
@@ -29,7 +29,7 @@
<version>2.1.7-SNAPSHOT</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-bundles</artifactId>
<artifactId>struts2-osgi-bundles</artifactId>
<packaging>pom</packaging>
<name>Struts OSGi Bundles</name>
@@ -40,7 +40,8 @@
</scm>
<modules>
<module>admin</module>
<module>demo</module>
</modules>
<dependencies>