[jboss-cvs] JBossAS SVN: r99377 - in trunk: resteasy-int and 49 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jan 13 21:48:38 EST 2010


Author: bill.burke at jboss.com
Date: 2010-01-13 21:48:37 -0500 (Wed, 13 Jan 2010)
New Revision: 99377

Added:
   trunk/resteasy-int/
   trunk/resteasy-int/.classpath
   trunk/resteasy-int/.project
   trunk/resteasy-int/.settings/
   trunk/resteasy-int/.settings/org.eclipse.jdt.core.prefs
   trunk/resteasy-int/.settings/org.maven.ide.eclipse.prefs
   trunk/resteasy-int/jar/
   trunk/resteasy-int/jar/pom.xml
   trunk/resteasy-int/jar/src/
   trunk/resteasy-int/jar/src/main/
   trunk/resteasy-int/jar/src/main/java/
   trunk/resteasy-int/jar/src/main/java/org/
   trunk/resteasy-int/jar/src/main/java/org/jboss/
   trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/
   trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/
   trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/
   trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyIntegrationDeployer.java
   trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyScannerDeployer.java
   trunk/resteasy-int/jar/src/main/resources/
   trunk/resteasy-int/pom.xml
   trunk/resteasy-int/test/
   trunk/resteasy-int/test/application-war/
   trunk/resteasy-int/test/application-war/pom.xml
   trunk/resteasy-int/test/application-war/src/
   trunk/resteasy-int/test/application-war/src/main/
   trunk/resteasy-int/test/application-war/src/main/java/
   trunk/resteasy-int/test/application-war/src/main/java/org/
   trunk/resteasy-int/test/application-war/src/main/java/org/jboss/
   trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/
   trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/test/
   trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/test/smoke/
   trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/test/smoke/AppConfig.java
   trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/test/smoke/MyApplicationConfig.java
   trunk/resteasy-int/test/application-war/src/main/resources/
   trunk/resteasy-int/test/application-war/src/main/webapp/
   trunk/resteasy-int/test/application-war/src/main/webapp/WEB-INF/
   trunk/resteasy-int/test/application-war/src/main/webapp/WEB-INF/web.xml
   trunk/resteasy-int/test/application-war/src/main/webapp/index.jsp
   trunk/resteasy-int/test/application-war/src/test/
   trunk/resteasy-int/test/application-war/src/test/java/
   trunk/resteasy-int/test/application-war/src/test/java/org/
   trunk/resteasy-int/test/application-war/src/test/java/org/jboss/
   trunk/resteasy-int/test/application-war/src/test/java/org/jboss/resteasy/
   trunk/resteasy-int/test/application-war/src/test/java/org/jboss/resteasy/test/
   trunk/resteasy-int/test/application-war/src/test/java/org/jboss/resteasy/test/jboss/
   trunk/resteasy-int/test/application-war/src/test/java/org/jboss/resteasy/test/jboss/AppConfigTest.java
   trunk/resteasy-int/test/application-war/src/test/resources/
   trunk/resteasy-int/test/application-war/src/test/resources/jndi.properties
   trunk/resteasy-int/test/application-war/src/test/resources/log4j.xml
   trunk/resteasy-int/test/pom.xml
   trunk/resteasy-int/test/scanned-war/
   trunk/resteasy-int/test/scanned-war/pom.xml
   trunk/resteasy-int/test/scanned-war/scanned-test.iml
   trunk/resteasy-int/test/scanned-war/src/
   trunk/resteasy-int/test/scanned-war/src/main/
   trunk/resteasy-int/test/scanned-war/src/main/java/
   trunk/resteasy-int/test/scanned-war/src/main/java/org/
   trunk/resteasy-int/test/scanned-war/src/main/java/org/jboss/
   trunk/resteasy-int/test/scanned-war/src/main/java/org/jboss/resteasy/
   trunk/resteasy-int/test/scanned-war/src/main/java/org/jboss/resteasy/test/
   trunk/resteasy-int/test/scanned-war/src/main/java/org/jboss/resteasy/test/MyResource.java
   trunk/resteasy-int/test/scanned-war/src/main/webapp/
   trunk/resteasy-int/test/scanned-war/src/main/webapp/WEB-INF/
   trunk/resteasy-int/test/scanned-war/src/main/webapp/WEB-INF/web.xml
   trunk/resteasy-int/test/scanned-war/src/main/webapp/index.jsp
   trunk/resteasy-int/test/scanned-war/src/test/
   trunk/resteasy-int/test/scanned-war/src/test/java/
   trunk/resteasy-int/test/scanned-war/src/test/java/org/
   trunk/resteasy-int/test/scanned-war/src/test/java/org/jboss/
   trunk/resteasy-int/test/scanned-war/src/test/java/org/jboss/resteasy/
   trunk/resteasy-int/test/scanned-war/src/test/java/org/jboss/resteasy/test/
   trunk/resteasy-int/test/scanned-war/src/test/java/org/jboss/resteasy/test/jboss/
   trunk/resteasy-int/test/scanned-war/src/test/java/org/jboss/resteasy/test/jboss/ScanningTest.java
   trunk/resteasy-int/test/scanned-war/src/test/resources/
   trunk/resteasy-int/test/scanned-war/src/test/resources/jndi.properties
   trunk/resteasy-int/test/scanned-war/src/test/resources/log4j.xml
   trunk/resteasy-int/zip/
   trunk/resteasy-int/zip/assembly.xml
   trunk/resteasy-int/zip/pom.xml
   trunk/resteasy-int/zip/resteasy-jboss-beans.xml
Log:
resteasy integration

Added: trunk/resteasy-int/.classpath
===================================================================
--- trunk/resteasy-int/.classpath	                        (rev 0)
+++ trunk/resteasy-int/.classpath	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/resources/jbossws-jboss.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: trunk/resteasy-int/.project
===================================================================
--- trunk/resteasy-int/.project	                        (rev 0)
+++ trunk/resteasy-int/.project	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jboss-as-webservices</name>
+	<comment>JBoss Application Server (webservices module)</comment>
+	<projects>
+		<project>jboss-as-deployment</project>
+		<project>jboss-as-security</project>
+		<project>jboss-as-server</project>
+		<project>jboss-as-system</project>
+		<project>jboss-as-system-jmx</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: trunk/resteasy-int/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/resteasy-int/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ trunk/resteasy-int/.settings/org.eclipse.jdt.core.prefs	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,5 @@
+#Mon May 18 14:12:19 CEST 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: trunk/resteasy-int/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- trunk/resteasy-int/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ trunk/resteasy-int/.settings/org.maven.ide.eclipse.prefs	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,8 @@
+#Mon Aug 03 19:49:17 PDT 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1

Added: trunk/resteasy-int/jar/pom.xml
===================================================================
--- trunk/resteasy-int/jar/pom.xml	                        (rev 0)
+++ trunk/resteasy-int/jar/pom.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,144 @@
+<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">
+  
+  <parent>
+    <groupId>org.jboss.jbossas</groupId>
+    <artifactId>jboss-as-parent</artifactId>
+    <version>6.0.0-SNAPSHOT</version>
+  </parent>
+  
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.jbossas</groupId>
+  <artifactId>jboss-as-resteasy</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Application Server Resteasy</name>
+  <url>http://www.jboss.org/jbossas</url>
+  <description>JBoss Application Server (resteasy module)</description>
+  
+  <build>
+    <plugins>
+<plugin>
+  <artifactId>maven-jar-plugin</artifactId>
+  <configuration>
+    <archive>  
+      <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+    </archive> 
+  </configuration>
+</plugin>  
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>2.0.1</version>
+  <executions>
+    <execution>
+      <id>bundle-manifest</id>
+      <phase>process-classes</phase>
+      <goals>    
+        <goal>manifest</goal>
+      </goals>   
+    </execution>
+  </executions>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <!-- Dependencies -->
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.resteasy</groupId>
+      <artifactId>resteasy-jaxrs</artifactId>
+      <version>1.2.1.GA</version>
+      <exclusions>
+        <exclusion>
+          <groupId>javax.xml.bind</groupId>
+          <artifactId>jaxb-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.xml.stream</groupId>
+          <artifactId>stax-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-server</artifactId>
+      <scope>provided</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>javax.xml.bind</groupId>
+          <artifactId>jaxb-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.xml.stream</groupId>
+          <artifactId>stax-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-system</artifactId>
+      <scope>provided</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>javax.xml.bind</groupId>
+          <artifactId>jaxb-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.xml.stream</groupId>
+          <artifactId>stax-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+      <!--
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-system-jmx</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.cl</groupId>
+      <artifactId>jboss-classloading</artifactId>
+        <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+        <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-reflect</artifactId>
+        <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-dependency</artifactId>
+        <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+        <scope>provided</scope>
+    </dependency>
+      <dependency>
+        <groupId>org.jboss.metadata</groupId>
+        <artifactId>jboss-metadata-common</artifactId>
+        <scope>provided</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-vfs</artifactId>
+          <scope>provided</scope>
+      </dependency>
+    <dependency>
+      <groupId>org.jboss.security</groupId>
+      <artifactId>jboss-security-spi</artifactId>
+        <scope>provided</scope>
+    </dependency>
+    -->
+  </dependencies>
+
+</project>

Added: trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyIntegrationDeployer.java
===================================================================
--- trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyIntegrationDeployer.java	                        (rev 0)
+++ trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyIntegrationDeployer.java	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,135 @@
+package org.jboss.resteasy.integration.deployers;
+
+import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.logging.Logger;
+import org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher;
+import org.jboss.resteasy.plugins.server.servlet.ResteasyContextParameters;
+import org.jboss.resteasy.spi.ResteasyDeployment;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class ResteasyIntegrationDeployer extends AbstractRealDeployer
+{
+   private static final Logger LOGGER = Logger.getLogger(ResteasyIntegrationDeployer.class);
+
+   public ResteasyIntegrationDeployer()
+   {
+      super();
+
+      this.addInput(JBossWebMetaData.class);
+      this.addInput(ResteasyDeployment.class);
+      this.addOutput(JBossWebMetaData.class);
+   }
+
+   protected void populateWebMetadata()
+   {
+
+   }
+
+   protected void setInitParam(ServletMetaData servlet, String name, String value)
+   {
+      ParamValueMetaData param = new ParamValueMetaData();
+      param.setParamName(name);
+      param.setParamValue(value);
+      List<ParamValueMetaData> params = servlet.getInitParam();
+      if (params == null)
+      {
+         params = new ArrayList<ParamValueMetaData>();
+         servlet.setInitParam(params);
+      }
+      params.add(param);
+
+   }
+
+   protected void internalDeploy(DeploymentUnit du) throws DeploymentException
+   {
+      JBossWebMetaData webdata = du.getAttachment(JBossWebMetaData.class);
+      if (webdata == null)
+      {
+         return;
+      }
+
+      if (du.getAttachment(ResteasyScannerDeployer.JAXRS_APPLICATION_CLASS_DEPLOYMENT) != null)
+      {
+         // do not do this deployer if there is an application class a previous deployer will handle it
+         return;
+      }
+
+      ResteasyDeployment resteasy = du.getAttachment(ResteasyDeployment.class);
+      if (resteasy == null)
+      {
+         return;
+      }
+
+      LOGGER.info("Found ResteasyDeployment...");
+
+      JBossServletMetaData servlet = new JBossServletMetaData();
+      servlet.setServletClass(HttpServletDispatcher.class.getName());
+      servlet.setName("Resteasy");
+
+      if (!resteasy.getResourceClasses().isEmpty())
+      {
+         StringBuffer buf = null;
+         for (String resource : resteasy.getResourceClasses())
+         {
+            if (buf == null)
+            {
+               buf = new StringBuffer();
+               buf.append(resource);
+            }
+            else
+            {
+               buf.append(",").append(resource);
+            }
+         }
+         String resources = buf.toString();
+         LOGGER.info("Added these resources to init param: " + resources);
+         setInitParam(servlet, ResteasyContextParameters.RESTEASY_RESOURCES, resources);
+      }
+      if (!resteasy.getProviderClasses().isEmpty())
+      {
+         StringBuffer buf = null;
+         for (String provider : resteasy.getProviderClasses())
+         {
+            if (buf == null)
+            {
+               buf = new StringBuffer();
+               buf.append(provider);
+            }
+            else
+            {
+               buf.append(",").append(provider);
+            }
+         }
+         setInitParam(servlet, ResteasyContextParameters.RESTEASY_PROVIDERS, buf.toString());
+      }
+      ServletMappingMetaData mapping = new ServletMappingMetaData();
+      mapping.setServletName("Resteasy");
+      List<String> patterns = new ArrayList<String>();
+      patterns.add("/*");
+      mapping.setUrlPatterns(patterns);
+
+      webdata.getServlets().add(servlet);
+      List<ServletMappingMetaData> mappings = webdata.getServletMappings();
+      if (mappings == null)
+      {
+         mappings = new ArrayList<ServletMappingMetaData>();
+         webdata.setServletMappings(mappings);
+      }
+      mappings.add(mapping);
+   }
+
+}
\ No newline at end of file

Added: trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyScannerDeployer.java
===================================================================
--- trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyScannerDeployer.java	                        (rev 0)
+++ trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyScannerDeployer.java	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,172 @@
+package org.jboss.resteasy.integration.deployers;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.mcann.AnnotationRepository;
+import org.jboss.mcann.Element;
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher;
+import org.jboss.resteasy.plugins.server.servlet.ResteasyContextParameters;
+import org.jboss.resteasy.spi.ResteasyDeployment;
+
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Application;
+import javax.ws.rs.ext.Provider;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class ResteasyScannerDeployer extends AbstractRealDeployer
+{
+   private static final Logger LOGGER = Logger.getLogger(ResteasyScannerDeployer.class);
+   public static final String JAXRS_APPLICATION_CLASS_DEPLOYMENT = ResteasyScannerDeployer.class.getName() + "-JAXRS_APPLICATION_CLASS_DEPLOYMENT";
+
+   public ResteasyScannerDeployer()
+   {
+      super();
+
+      this.addInput(JBossWebMetaData.class);
+      this.addOutput(JBossWebMetaData.class);
+      this.addOutput(JAXRS_APPLICATION_CLASS_DEPLOYMENT);
+      this.addOutput(ResteasyDeployment.class);
+   }
+
+   protected void internalDeploy(DeploymentUnit du) throws DeploymentException
+   {
+      JBossWebMetaData webdata = du.getAttachment(JBossWebMetaData.class);
+      if (webdata == null)
+      {
+         return;
+      }
+      boolean applicationClassDeployed = deployApplicationClass(du, webdata);
+
+      // If an Application class is present, we assume the user wants to totally control deployment
+      if (applicationClassDeployed) return;
+
+      scan(du, webdata);
+
+   }
+
+   protected boolean deployApplicationClass(DeploymentUnit du, JBossWebMetaData webdata) throws DeploymentException
+   {
+      ClassLoader loader = du.getClassLoader();
+      for (ServletMetaData servlet : webdata.getServlets())
+      {
+         String servletClass = servlet.getServletClass();
+         if (servletClass == null) continue;
+         Class clazz = null;
+         try
+         {
+            clazz = loader.loadClass(servletClass);
+         }
+         catch (ClassNotFoundException e)
+         {
+            throw new DeploymentException(e);
+         }
+         if (Application.class.isAssignableFrom(clazz))
+         {
+            du.addAttachment(JAXRS_APPLICATION_CLASS_DEPLOYMENT, servletClass);
+            servlet.setServletClass(HttpServletDispatcher.class.getName());
+            ParamValueMetaData param = new ParamValueMetaData();
+            param.setParamName("javax.ws.rs.Application");
+            param.setParamValue(servletClass);
+            List<ParamValueMetaData> params = servlet.getInitParam();
+            if (params == null)
+            {
+               params = new ArrayList<ParamValueMetaData>();
+               servlet.setInitParam(params);
+            }
+            params.add(param);
+            return true;
+         }
+      }
+      return false;
+
+   }
+
+   protected void scan(DeploymentUnit du, JBossWebMetaData webdata)
+           throws DeploymentException
+   {
+      boolean scanAll = true;
+      boolean scanProviders = true;
+      boolean scanResources = true;
+
+      // check resteasy configuration flags
+
+      List<ParamValueMetaData> contextParams = webdata.getContextParams();
+      if (contextParams != null)
+      {
+         for (ParamValueMetaData param : contextParams)
+         {
+            if (param.getParamName().equals(ResteasyContextParameters.RESTEASY_SCAN))
+            {
+               scanAll = Boolean.valueOf(param.getParamValue());
+            }
+            else if (param.getParamName().equals(ResteasyContextParameters.RESTEASY_SCAN_PROVIDERS))
+            {
+               scanProviders = Boolean.valueOf(param.getParamValue());
+            }
+            else if (param.getParamName().equals(ResteasyContextParameters.RESTEASY_SCAN_RESOURCES))
+            {
+               scanResources = Boolean.valueOf(param.getParamValue());
+            }
+         }
+      }
+
+      if (scanAll == false) return;
+
+      AnnotationRepository env = du.getAttachment(AnnotationRepository.class);
+
+      if (env == null)
+      {
+         LOGGER.info("Expecting AnnotationRepository class for scanning WAR for JAX-RS classes");
+         return;
+      }
+
+      Set<Element<Path, Class<?>>> resources = null;
+      Set<Element<Provider, Class<?>>> providers = null;
+      if (scanResources)
+      {
+         resources = env.classIsAnnotatedWith(Path.class);
+      }
+      if (scanProviders)
+      {
+         providers = env.classIsAnnotatedWith(Provider.class);
+      }
+
+      if ((resources == null || resources.isEmpty()) && (providers == null || providers.isEmpty())) return;
+
+      ResteasyDeployment resteasy = du.getAttachment(ResteasyDeployment.class);
+      if (resteasy == null)
+      {
+         resteasy = new ResteasyDeployment();
+         du.addAttachment(ResteasyDeployment.class, resteasy);
+      }
+
+      if (resources != null)
+      {
+         for (Element e : resources)
+         {
+            log.info("Found scanned resource class: " + e.getOwnerClassName());
+            resteasy.getResourceClasses().add(e.getOwnerClassName());
+         }
+      }
+      if (providers != null)
+      {
+         for (Element e : providers)
+         {
+            log.info("Found scanned provider class: " + e.getOwnerClassName());
+            resteasy.getProviderClasses().add(e.getOwnerClassName());
+         }
+      }
+   }
+
+}

Added: trunk/resteasy-int/pom.xml
===================================================================
--- trunk/resteasy-int/pom.xml	                        (rev 0)
+++ trunk/resteasy-int/pom.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,19 @@
+<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">
+    <parent>
+        <groupId>org.jboss.jbossas</groupId>
+        <artifactId>jboss-as-parent</artifactId>
+        <version>6.0.0-SNAPSHOT</version>
+    </parent>
+    <name>Resteasy JBoss AS Integration</name>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.jboss.resteasy</groupId>
+    <artifactId>resteasy-int-pom</artifactId>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>jar</module>
+        <module>zip</module>
+    </modules>
+</project>

Added: trunk/resteasy-int/test/application-war/pom.xml
===================================================================
--- trunk/resteasy-int/test/application-war/pom.xml	                        (rev 0)
+++ trunk/resteasy-int/test/application-war/pom.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,96 @@
+<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">
+    <parent>
+        <groupId>org.jboss.jbossas</groupId>
+        <artifactId>jboss-as-parent</artifactId>
+        <version>6.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.jboss.jbossas.resteasy.test</groupId>
+    <artifactId>application-config-test</artifactId>
+    <packaging>war</packaging>
+    <name>Basic Integration Test</name>
+    <url>http://maven.apache.org</url>
+    <dependencies>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxrs</artifactId>
+            <version>1.2.1.GA</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.ejb</groupId>
+            <artifactId>ejb-api</artifactId>
+            <version>3.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.1</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <finalName>application-config-test</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jboss-maven-plugin</artifactId>
+                <version>1.3.1</version>
+                <configuration>
+                    <jbossHome>${jboss.home}</jbossHome>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>jboss-deploy</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>deploy</goal>
+                        </goals>
+                        <configuration>
+                            <fileName>${basedir}/target/application-config-test.war</fileName>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>jboss-undeploy</id>
+                        <phase>post-integration-test</phase>
+                        <goals>
+                            <goal>undeploy</goal>
+                        </goals>
+                        <configuration>
+                            <fileName>${basedir}/target/application-config-test.war</fileName>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>surefire-it</id>
+                        <phase>integration-test</phase>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                        <configuration>
+                            <skip>false</skip>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/test/smoke/AppConfig.java
===================================================================
--- trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/test/smoke/AppConfig.java	                        (rev 0)
+++ trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/test/smoke/AppConfig.java	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,58 @@
+package org.jboss.resteasy.test.smoke;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class AppConfig
+{
+   @Path("/my")
+   public static class MyResource
+   {
+      @GET
+      @Produces("text/quoted")
+      public String get()
+      {
+         return "hello";
+      }
+   }
+
+   @Provider
+   @Produces("text/quoted")
+   public static class QuotedTextWriter implements MessageBodyWriter<String>
+   {
+      public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
+      {
+         return type.equals(String.class);
+      }
+
+      public long getSize(String s, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
+      {
+         return -1;
+      }
+
+      public void writeTo(String s, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException
+      {
+         s = "\"" + s + "\"";
+         entityStream.write(s.getBytes());
+      }
+   }
+
+}
\ No newline at end of file

Added: trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/test/smoke/MyApplicationConfig.java
===================================================================
--- trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/test/smoke/MyApplicationConfig.java	                        (rev 0)
+++ trunk/resteasy-int/test/application-war/src/main/java/org/jboss/resteasy/test/smoke/MyApplicationConfig.java	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,46 @@
+package org.jboss.resteasy.test.smoke;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Application;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class MyApplicationConfig extends Application
+{
+   private Set<Class<?>> classes = new HashSet<Class<?>>();
+   private Set<Object> singletons = new HashSet<Object>();
+
+   public MyApplicationConfig()
+   {
+      classes.add(AppConfig.MyResource.class);
+      singletons.add(new AppConfig.QuotedTextWriter());
+   }
+
+   public Set<Class<?>> getClasses()
+   {
+      return classes;
+   }
+
+   @Override
+   public Set<Object> getSingletons()
+   {
+      return singletons;
+   }
+
+}

Added: trunk/resteasy-int/test/application-war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/resteasy-int/test/application-war/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ trunk/resteasy-int/test/application-war/src/main/webapp/WEB-INF/web.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,15 @@
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+    <display-name>Archetype Created Web Application</display-name>
+
+    <servlet>
+        <servlet-name>Resteasy</servlet-name>
+        <servlet-class>org.jboss.resteasy.test.smoke.MyApplicationConfig</servlet-class>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>Resteasy</servlet-name>
+        <url-pattern>/*</url-pattern>
+    </servlet-mapping>
+</web-app>

Added: trunk/resteasy-int/test/application-war/src/main/webapp/index.jsp
===================================================================
--- trunk/resteasy-int/test/application-war/src/main/webapp/index.jsp	                        (rev 0)
+++ trunk/resteasy-int/test/application-war/src/main/webapp/index.jsp	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

Added: trunk/resteasy-int/test/application-war/src/test/java/org/jboss/resteasy/test/jboss/AppConfigTest.java
===================================================================
--- trunk/resteasy-int/test/application-war/src/test/java/org/jboss/resteasy/test/jboss/AppConfigTest.java	                        (rev 0)
+++ trunk/resteasy-int/test/application-war/src/test/java/org/jboss/resteasy/test/jboss/AppConfigTest.java	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,59 @@
+package org.jboss.resteasy.test.jboss;
+
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Test;
+import org.jboss.resteasy.util.HttpResponseCodes;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.GetMethod;
+
+import javax.ws.rs.Path;
+import javax.ws.rs.GET;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.Provider;
+import javax.ws.rs.ext.MessageBodyWriter;
+import java.lang.reflect.Type;
+import java.lang.annotation.Annotation;
+import java.io.OutputStream;
+import java.io.IOException;
+import java.util.Set;
+import java.util.Map;
+import java.util.HashSet;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class AppConfigTest
+{
+   private void _test(HttpClient client, String uri, String body)
+   {
+      {
+         GetMethod method = new GetMethod(uri);
+         try
+         {
+            method.addRequestHeader("Accept", "text/quoted");
+            int status = client.executeMethod(method);
+            Assert.assertEquals(status, HttpResponseCodes.SC_OK);
+            Assert.assertEquals(body, method.getResponseBodyAsString());
+         }
+         catch (IOException e)
+         {
+            throw new RuntimeException(e);
+         }
+      }
+
+   }
+
+
+   @Test
+   public void testIt()
+   {
+      HttpClient client = new HttpClient();
+      _test(client, "http://localhost:8080/application-config-test/my", "\"hello\"");
+   }
+}

Added: trunk/resteasy-int/test/application-war/src/test/resources/jndi.properties
===================================================================
--- trunk/resteasy-int/test/application-war/src/test/resources/jndi.properties	                        (rev 0)
+++ trunk/resteasy-int/test/application-war/src/test/resources/jndi.properties	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://localhost:1099
\ No newline at end of file

Added: trunk/resteasy-int/test/application-war/src/test/resources/log4j.xml
===================================================================
--- trunk/resteasy-int/test/application-war/src/test/resources/log4j.xml	                        (rev 0)
+++ trunk/resteasy-int/test/application-war/src/test/resources/log4j.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 64736 2007-08-21 15:49:48Z anil.saldhana at jboss.com $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A time/date based rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+      <param name="File" value="${build.testlog}/test.log"/>
+      <param name="Append" value="true"/>
+
+      <!-- Rollover at midnight each day -->
+      <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+      <!-- Rollover at the top of each hour
+      <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+      -->
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+         <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+        <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+         -->
+      </layout>
+   </appender>
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <param name="Threshold" value="DEBUG"/>
+      <param name="Target" value="System.out"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+   </root>
+
+</log4j:configuration>

Added: trunk/resteasy-int/test/pom.xml
===================================================================
--- trunk/resteasy-int/test/pom.xml	                        (rev 0)
+++ trunk/resteasy-int/test/pom.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,19 @@
+<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">
+    <parent>
+        <groupId>org.jboss.jbossas</groupId>
+        <artifactId>jboss-as-parent</artifactId>
+        <version>6.0.0-SNAPSHOT</version>
+    </parent>
+    <name>Resteasy JBoss AS Integration Testing</name>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.jboss.resteasy</groupId>
+    <artifactId>resteasy-int-testing-pom</artifactId>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>application-war</module>
+        <module>scanned-war</module>
+    </modules>
+</project>

Added: trunk/resteasy-int/test/scanned-war/pom.xml
===================================================================
--- trunk/resteasy-int/test/scanned-war/pom.xml	                        (rev 0)
+++ trunk/resteasy-int/test/scanned-war/pom.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,90 @@
+<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">
+    <parent>
+        <groupId>org.jboss.jbossas</groupId>
+        <artifactId>jboss-as-parent</artifactId>
+        <version>6.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.jboss.jbossas.resteasy.test</groupId>
+    <artifactId>scanned-test</artifactId>
+    <packaging>war</packaging>
+    <name>Basic Integration Test</name>
+    <url>http://maven.apache.org</url>
+    <dependencies>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxrs</artifactId>
+            <version>1.2.1.GA</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.1</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <finalName>scanned-test</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jboss-maven-plugin</artifactId>
+                <version>1.3.1</version>
+                <configuration>
+                    <jbossHome>${jboss.home}</jbossHome>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>jboss-deploy</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>deploy</goal>
+                        </goals>
+                        <configuration>
+                            <fileName>${basedir}/target/scanned-test.war</fileName>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>jboss-undeploy</id>
+                        <phase>post-integration-test</phase>
+                        <goals>
+                            <goal>undeploy</goal>
+                        </goals>
+                        <configuration>
+                            <fileName>${basedir}/target/scanned-test.war</fileName>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>surefire-it</id>
+                        <phase>integration-test</phase>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                        <configuration>
+                            <skip>false</skip>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: trunk/resteasy-int/test/scanned-war/scanned-test.iml
===================================================================
--- trunk/resteasy-int/test/scanned-war/scanned-test.iml	                        (rev 0)
+++ trunk/resteasy-int/test/scanned-war/scanned-test.iml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: junit:junit:4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.test:jboss-test:1.1.4.GA" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ant:ant:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ant:ant-launcher:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ant:ant-junit:1.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging-spi:2.2.0.CR1" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging-log4j:2.2.0.CR1" level="project" />
+    <orderEntry type="library" name="Maven: log4j:log4j:1.2.14" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss:jboss-common-core:2.2.17.GA" level="project" />
+    <orderEntry type="library" name="Maven: jboss.profiler.jvmti:jboss-profiler-jvmti:1.0.0.CR5" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.jbossas:jboss-server-manager:1.0.2.GA" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.naming:jnp-client:5.0.4.GA" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.security:jbosssx-client:2.1.0.20091223" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.security:jboss-security-spi:2.1.0.20091223" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.resteasy:resteasy-jaxrs:1.2.1.GA" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.resteasy:jaxrs-api:1.2.1.GA" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.5.6" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.5.8" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.5.6" level="project" />
+    <orderEntry type="library" name="Maven: org.scannotation:scannotation:1.0.2" level="project" />
+    <orderEntry type="library" name="Maven: javassist:javassist:3.11.0.GA" level="project" />
+    <orderEntry type="library" name="Maven: javax.annotation:jsr250-api:1.0" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.0.1" level="project" />
+    <orderEntry type="library" name="Maven: net.jcip:jcip-annotations:1.0" level="project" />
+  </component>
+</module>
+

Added: trunk/resteasy-int/test/scanned-war/src/main/java/org/jboss/resteasy/test/MyResource.java
===================================================================
--- trunk/resteasy-int/test/scanned-war/src/main/java/org/jboss/resteasy/test/MyResource.java	                        (rev 0)
+++ trunk/resteasy-int/test/scanned-war/src/main/java/org/jboss/resteasy/test/MyResource.java	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,20 @@
+package org.jboss.resteasy.test;
+
+import javax.ws.rs.Path;
+import javax.ws.rs.GET;
+import javax.ws.rs.Produces;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+ at Path("/scan")
+public class MyResource
+{
+   @GET
+   @Produces("text/plain")
+   public String get()
+   {
+      return "hello world";
+   }
+}

Added: trunk/resteasy-int/test/scanned-war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/resteasy-int/test/scanned-war/src/main/webapp/WEB-INF/web.xml	                        (rev 0)
+++ trunk/resteasy-int/test/scanned-war/src/main/webapp/WEB-INF/web.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,4 @@
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+</web-app>

Added: trunk/resteasy-int/test/scanned-war/src/main/webapp/index.jsp
===================================================================
--- trunk/resteasy-int/test/scanned-war/src/main/webapp/index.jsp	                        (rev 0)
+++ trunk/resteasy-int/test/scanned-war/src/main/webapp/index.jsp	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

Added: trunk/resteasy-int/test/scanned-war/src/test/java/org/jboss/resteasy/test/jboss/ScanningTest.java
===================================================================
--- trunk/resteasy-int/test/scanned-war/src/test/java/org/jboss/resteasy/test/jboss/ScanningTest.java	                        (rev 0)
+++ trunk/resteasy-int/test/scanned-war/src/test/java/org/jboss/resteasy/test/jboss/ScanningTest.java	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,23 @@
+package org.jboss.resteasy.test.jboss;
+
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+import org.junit.Test;
+import org.junit.Assert;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class ScanningTest
+{
+   @Test
+   public void testIt() throws Exception
+   {
+      ClientRequest request = new ClientRequest("http://localhost:8080/scanned-test/scan");
+      ClientResponse<String> response = request.get(String.class);
+      Assert.assertEquals(200, response.getStatus());
+      Assert.assertEquals("hello world", response.getEntity());
+
+   }
+}

Added: trunk/resteasy-int/test/scanned-war/src/test/resources/jndi.properties
===================================================================
--- trunk/resteasy-int/test/scanned-war/src/test/resources/jndi.properties	                        (rev 0)
+++ trunk/resteasy-int/test/scanned-war/src/test/resources/jndi.properties	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://localhost:1099
\ No newline at end of file

Added: trunk/resteasy-int/test/scanned-war/src/test/resources/log4j.xml
===================================================================
--- trunk/resteasy-int/test/scanned-war/src/test/resources/log4j.xml	                        (rev 0)
+++ trunk/resteasy-int/test/scanned-war/src/test/resources/log4j.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 64736 2007-08-21 15:49:48Z anil.saldhana at jboss.com $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A time/date based rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+      <param name="File" value="${build.testlog}/test.log"/>
+      <param name="Append" value="true"/>
+
+      <!-- Rollover at midnight each day -->
+      <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+      <!-- Rollover at the top of each hour
+      <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+      -->
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+         <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+        <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+         -->
+      </layout>
+   </appender>
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <param name="Threshold" value="DEBUG"/>
+      <param name="Target" value="System.out"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+   </root>
+
+</log4j:configuration>

Added: trunk/resteasy-int/zip/assembly.xml
===================================================================
--- trunk/resteasy-int/zip/assembly.xml	                        (rev 0)
+++ trunk/resteasy-int/zip/assembly.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,28 @@
+<assembly>
+    <id>all</id>
+
+    <formats>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <fileSets>
+        <fileSet>
+            <directory></directory>
+            <includes>
+                <include>resteasy-jboss-beans.xml</include>
+            </includes>
+            <outputDirectory>resteasy.deployer/META-INF</outputDirectory>
+        </fileSet>
+    </fileSets>
+    <dependencySets>
+        <dependencySet>
+            <unpack>false</unpack>
+            <useTransitiveFiltering>true</useTransitiveFiltering>
+            <includes>
+                <include>org.jboss.jbossas:jboss-as-resteasy</include>
+            </includes>
+            <outputDirectory>resteasy.deployer</outputDirectory>
+        </dependencySet>
+    </dependencySets>
+</assembly>

Added: trunk/resteasy-int/zip/pom.xml
===================================================================
--- trunk/resteasy-int/zip/pom.xml	                        (rev 0)
+++ trunk/resteasy-int/zip/pom.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,87 @@
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.jboss.jbossas</groupId>
+        <artifactId>jboss-as-parent</artifactId>
+        <version>6.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>resteasy-int-dist</artifactId>
+    <packaging>pom</packaging>
+    <name>RESTEasy JBoss AS Integration Distribution</name>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.jboss.jbossas</groupId>
+            <artifactId>jboss-as-resteasy</artifactId>
+            <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-simple</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>jcl-over-slf4j</artifactId>
+                </exclusion>
+
+                <!--
+                   Needed for javax.annotation.security.* which is part of javaee 6 XXX
+                   should this dependency be <scope>provided</scope> and only used if
+                   detected runtime?
+                -->
+                <exclusion>
+                    <groupId>javax.annotation</groupId>
+                    <artifactId>jsr250-api</artifactId>
+                </exclusion>
+
+            </exclusions>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.2-beta-2</version>
+                <executions>
+                    <execution>
+                        <id>assemble</id>
+                        <phase>install</phase>
+                        <goals>
+                            <goal>attached</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>assembly.xml</descriptor>
+                            </descriptors>
+                            <outputDirectory>
+                                target/distribution
+                            </outputDirectory>
+                            <workDirectory>
+                                target/assembly/work
+                            </workDirectory>
+                            <finalName>
+                                resteasy-int-${project.version}
+                            </finalName>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-install-plugin</artifactId>
+                <configuration>
+                    <createChecksum>true</createChecksum>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: trunk/resteasy-int/zip/resteasy-jboss-beans.xml
===================================================================
--- trunk/resteasy-int/zip/resteasy-jboss-beans.xml	                        (rev 0)
+++ trunk/resteasy-int/zip/resteasy-jboss-beans.xml	2010-01-14 02:48:37 UTC (rev 99377)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+    <bean name="ResteasyScannerDeployer" class="org.jboss.resteasy.integration.deployers.ResteasyScannerDeployer"/>
+    <bean name="ResteasyIntegrationDeployer" class="org.jboss.resteasy.integration.deployers.ResteasyIntegrationDeployer"/>
+</deployment>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list