geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1078723 - in /geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test: ./ Resolution-Optional-WAB/ Resolution-Optional-WAB/src/ Resolution-Optional-WAB/src/main/ Resolution-Optional-WAB/src/main/java/ Resolution-Optional-WAB/sr...
Date Mon, 07 Mar 2011 09:39:27 GMT
Author: xiaming
Date: Mon Mar  7 09:39:26 2011
New Revision: 1078723

URL: http://svn.apache.org/viewvc?rev=1078723&view=rev
Log:
GERONIMO-5846 Test another parameter of require-bundle: resolution:=optional

Added:
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/pom.xml
  (with props)
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/resolution/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/resolution/servlet/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/resolution/servlet/checkResolutionAttrServlet.java
  (with props)
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/WEB-INF/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/WEB-INF/web.xml
  (with props)
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/index.html
  (with props)
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/pom.xml
  (with props)
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/resolution/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/resolution/tests/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/resolution/tests/ResolutionOptionalServletTest.java
  (with props)
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/resources/
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/resources/testng.xml
  (with props)
Modified:
    geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/pom.xml

Added: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/pom.xml?rev=1078723&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/pom.xml
(added)
+++ geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/pom.xml
Mon Mar  7 09:39:26 2011
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+     http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+       <groupId>org.apache.geronimo.testsuite</groupId>
+       <artifactId>require-bundle-test</artifactId>
+       <version>3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>Resolution-Optional-WAB</artifactId>
+    <name>Geronimo TestSuite :: Aries Testsuite :: Resolution-Optional-test WAB</name>
 
+    <packaging>bundle</packaging>
+    
+    <description>
+        ${project.name}
+    </description>
+	
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_3.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+		<dependency>
+            <groupId>org.apache.geronimo.testsuite</groupId>
+            <artifactId>CalculatorBeanBundle_C</artifactId>
+			<version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+	
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+			    <configuration>
+                    <instructions>
+						<Web-ContextPath>/resolution-optional</Web-ContextPath>
+						<Require-Bundle>org.apache.geronimo.samples.requirebundle.CalculatorBeanBundle_C;bundle-version=${bundleVersion},org.NONExistBundle;bundle-version="1.0.0";resolution:=optional</Require-Bundle>

+						<Bundle-SymbolicName>org.apache.geronimo.samples.requirebundle.ResolutionOptionalWAB</Bundle-SymbolicName>
+				    </instructions>
+			    </configuration>
+            </plugin>
+        </plugins>
+    </build>
+	
+</project>

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/resolution/servlet/checkResolutionAttrServlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/resolution/servlet/checkResolutionAttrServlet.java?rev=1078723&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/resolution/servlet/checkResolutionAttrServlet.java
(added)
+++ geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/resolution/servlet/checkResolutionAttrServlet.java
Mon Mar  7 09:39:26 2011
@@ -0,0 +1,68 @@
+/*
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/
+
+package org.apache.geronimo.samples.requirebundle.resolution.servlet;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.text.DecimalFormat;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.geronimo.samples.requirebundle.bean.reexport.ExportBean;
+
+
+public class checkResolutionAttrServlet extends HttpServlet {
+    protected void processRequest(HttpServletRequest req, HttpServletResponse response) throws
ServletException, IOException {
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        try {
+		    ExportBean eb = new ExportBean();
+			String re = eb.hello_reexport();
+        	out.println("<html><body>");
+            out.println("<h1>This sample presents features:require-bundle-resolution:=optional</h1>");
+			out.println("<p>"+re+"</p>");
+			out.println("<p>Succeed to resolve Attr \"resolution=optional\"</p>");
+            out.println("</body></html>");
+        } catch ( Exception e ) {
+            e.printStackTrace();
+            throw new ServletException(e);
+        } finally {
+            out.close();
+        }
+    }
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+        processRequest(request, response);
+    } 
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+        processRequest(request, response);
+    }
+
+    @Override
+    public String getServletInfo() {
+        return "checkResolutionAttrServlet in require-bundle-test";
+    }
+
+}
+

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/resolution/servlet/checkResolutionAttrServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/resolution/servlet/checkResolutionAttrServlet.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/java/org/apache/geronimo/samples/requirebundle/resolution/servlet/checkResolutionAttrServlet.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/WEB-INF/web.xml?rev=1078723&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/WEB-INF/web.xml
(added)
+++ geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/WEB-INF/web.xml
Mon Mar  7 09:39:26 2011
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+     http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+    xmlns="http://java.sun.com/xml/ns/javaee" 
+    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
+    <display-name>Resolution-Optional-WAB</display-name>
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+		<welcome-file>index.htm</welcome-file>
+		<welcome-file>index.jsp</welcome-file>
+		<welcome-file>default.html</welcome-file>
+		<welcome-file>default.htm</welcome-file>
+		<welcome-file>default.jsp</welcome-file>
+    </welcome-file-list>
+    <servlet>
+		<display-name>checkResolutionAttrServlet</display-name>
+        <servlet-name>checkResolutionAttrServlet</servlet-name>
+        <servlet-class>org.apache.geronimo.samples.requirebundle.resolution.servlet.checkResolutionAttrServlet</servlet-class>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>checkResolutionAttrServlet</servlet-name>
+        <url-pattern>/checkResolution</url-pattern>
+	</servlet-mapping>
+		
+</web-app>

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/index.html
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/index.html?rev=1078723&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/index.html
(added)
+++ geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/index.html
Mon Mar  7 09:39:26 2011
@@ -0,0 +1,19 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<ul>
+<li><a href="checkResolution">Click here to check Resolution Attribute.</a>
+</ul>

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/index.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/index.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-WAB/src/main/resources/index.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/pom.xml?rev=1078723&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/pom.xml
(added)
+++ geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/pom.xml
Mon Mar  7 09:39:26 2011
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+     http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<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>
+        <groupId>org.apache.geronimo.testsuite</groupId>
+        <artifactId>require-bundle-test</artifactId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>Resolution-Optional-eba</artifactId>
+    <name>Geronimo TestSuite :: Aries Testsuite :: Require-Bundle-Resolution Attr EBA</name>
+    <packaging>eba</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.testsuite</groupId>
+            <artifactId>CalculatorBeanBundle_C</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.testsuite</groupId>
+            <artifactId>Resolution-Optional-WAB</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <resources>
+            <resource>
+                <directory>${project.basedir}/src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.aries</groupId>
+                <artifactId>eba-maven-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                <!-- eba-maven-plugin v0.3 supports these instructions keys only -->
                   
+                    <!--<instructions>                        				    
+	    				<Application-SymbolicName>CalculatorEBA1.app</Application-SymbolicName>
+	    				<Application-Version>1.0.0</Application-Version>
+	    				<Application-ExportService>xxx</Application-ExportService>
+	    				<Application-ImportService>xxx</Application-ImportService>
+	    			</instructions>-->
+	    			<instructions>                        				    	    				
+	    				<Application-Version>1.0.0</Application-Version>
+	    			</instructions>
+	    			<!-- Generate APPLICATION.MF automatically via eba-maven-plugin 
+	    			     Or use <applicationManifestFile> configuration to specify one -->
+	    			<generateManifest>true</generateManifest>
+					<!--<applicationManifestFile>${project.build.outputDirectory}/META-INF/APPLICATION.MF</applicationManifestFile>-->
				
+                </configuration>
+           </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>it</id>
+            <activation>
+                <property>
+                    <name>it</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <configuration>
+                            <systemPropertyVariables>
+                                <webAppName>resolution-optional</webAppName>
+                            </systemPropertyVariables>
+                        </configuration>
+                    </plugin>
+
+                    <plugin>
+                        <groupId>org.apache.geronimo.buildsupport</groupId>
+                        <artifactId>geronimo-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>deploy-eba</id>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>deploy-module</goal>
+                                </goals>
+                                <configuration>
+                                    <moduleArchive>${project.build.directory}/${project.artifactId}-${project.version}.eba</moduleArchive>
+                                </configuration>
+                            </execution>
+
+                            <execution>
+                                <id>undeploy-eba</id>
+                                <phase>post-integration-test</phase>
+                                <goals>
+                                    <goal>undeploy-module</goal>
+                                </goals>
+                                <configuration>
+                                    <moduleId>application/${project.groupId}.${project.artifactId}/1.0.0/eba</moduleId>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+    
+</project>

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/resolution/tests/ResolutionOptionalServletTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/resolution/tests/ResolutionOptionalServletTest.java?rev=1078723&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/resolution/tests/ResolutionOptionalServletTest.java
(added)
+++ geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/resolution/tests/ResolutionOptionalServletTest.java
Mon Mar  7 09:39:26 2011
@@ -0,0 +1,62 @@
+/*
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/
+
+package org.apache.geronimo.testsuite.requirebundle.resolution.tests;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.HttpMethodBase;
+import org.apache.commons.httpclient.methods.PostMethod;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+
+public class ResolutionOptionalServletTest{
+
+	
+	/**
+	 * Test 1
+	 * Test 
+	 * Require-Bundle: Resolution=optional in OSGi core spec.
+	 * @throws Exception
+	 */
+	@Test
+	public void RequireBundleTest()throws Exception
+	{
+		String contextroot = System.getProperty("webAppName");
+		String root = "http://localhost:8080/"+contextroot;
+		int status = 0;
+		HttpClient nclient = new HttpClient();
+		String url = root+"/checkResolution";
+		HttpMethodBase httpMethod;
+		httpMethod = new PostMethod(url);
+		status = nclient.executeMethod(httpMethod);	
+		Assert.assertEquals(status, 200);
+		String response = null;
+		if(status==200)
+		{
+			response = new String(httpMethod.getResponseBodyAsString().getBytes("8859_1"));
+		}
+		Assert.assertTrue(response.contains("Hello! Reexport in Require-bundle attribute is effective
since this INFO displays."));
+		Assert.assertTrue(response.contains("Succeed to resolve Attr \"resolution=optional\""));

+		httpMethod.releaseConnection();
+	}
+
+}
+

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/resolution/tests/ResolutionOptionalServletTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/resolution/tests/ResolutionOptionalServletTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/java/org/apache/geronimo/testsuite/requirebundle/resolution/tests/ResolutionOptionalServletTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/resources/testng.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/resources/testng.xml?rev=1078723&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/resources/testng.xml
(added)
+++ geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/resources/testng.xml
Mon Mar  7 09:39:26 2011
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+     http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+
+<suite name="Suite1" verbose="5">
+    <test name="aries-testsuite.require-bundle-test">
+        <packages>
+            <package name="org.apache.geronimo.testsuite.requirebundle.resolution.tests"/>
+        </packages>
+    </test>
+</suite>

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/resources/testng.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/resources/testng.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/Resolution-Optional-eba/src/test/resources/testng.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/pom.xml?rev=1078723&r1=1078722&r2=1078723&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/pom.xml (original)
+++ geronimo/server/trunk/testsuite/aries-testsuite/require-bundle-test/pom.xml Mon Mar  7
09:39:26 2011
@@ -43,6 +43,8 @@
         <module>CalculatorBeanBundle_B</module>
         <module>CalculatorServletBundle_A</module>
 		<module>RequireBundle-eba</module>
+		<module>Resolution-Optional-WAB</module>
+		<module>Resolution-Optional-eba</module>
     </modules>
 	
 </project>



Mime
View raw message