Permalink
Browse files

Remove WebAppSupport

  • Loading branch information...
1 parent 1ebb78d commit 3c1ce04f897cffec581880724b55c080df68166f @tdiesler tdiesler committed Jul 13, 2012
@@ -51,7 +51,7 @@
<setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
@@ -120,7 +120,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
@@ -204,7 +204,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="168"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
@@ -221,7 +221,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
@@ -253,7 +253,7 @@
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
View
14 pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jbosgi-parent</artifactId>
- <version>1.0.22</version>
+ <version>1.0.23</version>
</parent>
<name>JBossOSGi</name>
@@ -59,19 +59,19 @@
<version.jboss.osgi.deployment>1.1.1.Final</version.jboss.osgi.deployment>
<version.jboss.osgi.equinox>3.5.2.SP1</version.jboss.osgi.equinox>
<version.jboss.osgi.felix>3.0.4</version.jboss.osgi.felix>
- <version.jboss.osgi.framework>2.0.0.CR2</version.jboss.osgi.framework>
+ <version.jboss.osgi.framework>2.0.0.CR6-SNAPSHOT</version.jboss.osgi.framework>
<version.jboss.osgi.jmx>1.1.0.Final</version.jboss.osgi.jmx>
<version.jboss.osgi.logging>1.0.0</version.jboss.osgi.logging>
- <version.jboss.osgi.metadata>2.1.1.CR3</version.jboss.osgi.metadata>
- <version.jboss.osgi.repository>2.0.0.CR1</version.jboss.osgi.repository>
- <version.jboss.osgi.resolver>3.0.0.CR3</version.jboss.osgi.resolver>
- <version.jboss.osgi.spi>3.1.1.CR4</version.jboss.osgi.spi>
+ <version.jboss.osgi.metadata>2.1.1.CR7</version.jboss.osgi.metadata>
+ <version.jboss.osgi.repository>2.0.0.CR3</version.jboss.osgi.repository>
+ <version.jboss.osgi.resolver>3.0.0.CR8-SNAPSHOT</version.jboss.osgi.resolver>
+ <version.jboss.osgi.spi>3.1.1.CR6-SNAPSHOT</version.jboss.osgi.spi>
<version.jboss.osgi.testing>1.0.4</version.jboss.osgi.testing>
<version.jboss.osgi.vfs>1.1.2.CR1</version.jboss.osgi.vfs>
<version.jboss.osgi.xerces>3.1.0.Final</version.jboss.osgi.xerces>
<version.jboss.spec.annotations11.api>1.0.1.Final</version.jboss.spec.annotations11.api>
<version.jboss.spec.ejb3.api>1.0.1.Final</version.jboss.spec.ejb3.api>
- <version.jboss.spec.servlet30.api>1.0.2.Final-SNAPSHOT</version.jboss.spec.servlet30.api>
+ <version.jboss.spec.servlet30.api>1.0.2.Final</version.jboss.spec.servlet30.api>
<version.jboss.spec.transaction11.api>1.0.1.Final</version.jboss.spec.transaction11.api>
<version.junit>4.10</version.junit>
<version.ops4j.paxlogging>1.6.4</version.ops4j.paxlogging>
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi;
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-
-/**
- * @author thomas.diesler@jboss.com
- * @since 26-Jan-2012
- */
-public final class WebAppSupport extends RepositorySupport {
-
- public static final String OPS4J_PAXWEB_EXTENDER = "org.ops4j.pax.web:pax-web-extender-war";
-
- public static void provideWebappSupport(BundleContext syscontext, Bundle bundle) throws BundleException {
- HttpServiceSupport.provideHttpService(syscontext, bundle);
- if (getPackageAdmin(syscontext).getBundles("org.ops4j.pax.web.pax-web-extender-war", null) == null) {
- installSupportBundle(syscontext, getCoordinates(bundle, OPS4J_PAXWEB_EXTENDER)).start();
- }
- }
-}
@@ -39,10 +39,8 @@
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.Asset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.test.osgi.HttpServiceSupport;
import org.jboss.test.osgi.HttpSupport;
import org.jboss.test.osgi.RepositorySupport;
-import org.jboss.test.osgi.WebAppSupport;
import org.jboss.test.osgi.example.jbossas.webapp.bundle.EndpointServlet;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -72,7 +70,7 @@
@Deployment
public static WebArchive createdeployment() {
final WebArchive archive = ShrinkWrap.create(WebArchive.class, "example-webapp");
- archive.addClasses(EndpointServlet.class, RepositorySupport.class, HttpServiceSupport.class, HttpSupport.class, WebAppSupport.class);
+ archive.addClasses(EndpointServlet.class, RepositorySupport.class, HttpSupport.class);
archive.addAsWebResource("webapp/message.txt", "message.txt");
archive.addAsWebInfResource("webapp/web.xml", "web.xml");
archive.addAsManifestResource(RepositorySupport.BUNDLE_VERSIONS_FILE);
@@ -94,28 +92,20 @@ public InputStream openStream() {
@Test
public void testServletAccess() throws Exception {
-
- // Provide WebApp support
- WebAppSupport.provideWebappSupport(context, bundle);
-
- // Start the test bundle
bundle.start();
-
String line = getHttpResponse("/example-webapp/servlet?test=plain", 5000);
assertEquals("Hello from Servlet", line);
}
@Test
public void testServletInitProps() throws Exception {
- WebAppSupport.provideWebappSupport(context, bundle);
bundle.start();
String line = getHttpResponse("/example-webapp/servlet?test=initProp", 5000);
assertEquals("initProp=SomeValue", line);
}
@Test
public void testResourceAccess() throws Exception {
- WebAppSupport.provideWebappSupport(context, bundle);
bundle.start();
String line = getHttpResponse("/example-webapp/message.txt", 5000);
assertEquals("Hello from Resource", line);
@@ -76,13 +76,7 @@ public void testBundleInjection() throws Exception {
assertEquals("example-bundle", bundle.getSymbolicName());
assertEquals(Version.emptyVersion, bundle.getVersion());
- // Assert that the bundle is in state RESOLVED
- // Note when the test bundle contains the test case it
- // must be resolved already when this test method is called
- assertEquals(Bundle.RESOLVED, bundle.getState());
-
- // Start the bundle
- bundle.start();
+ // Assert that the bundle is in state ACTIVE
assertEquals(Bundle.ACTIVE, bundle.getState());
// Get the service reference

0 comments on commit 3c1ce04

Please sign in to comment.