Browse files

Basic support for separating a Spring module from the AS7 subsystem

  • Loading branch information...
1 parent 9e3c949 commit 59fe5cb4d09165fe2311aa1864ebc11109ee3e6d @mbogoevici mbogoevici committed Sep 24, 2011
Showing with 881 additions and 165 deletions.
  1. +6 −0 pom.xml
  2. +97 −0 subsystem-as7/aggregator/pom.xml
  3. +66 −0 subsystem-as7/aggregator/src/main/assembly/assembly-nodeps.xml
  4. +82 −0 subsystem-as7/aggregator/src/main/assembly/assembly.xml
  5. +19 −6 .../test/deployers/test/overlappingnames/META-INF/jboss-1-spring.xml → subsystem-as7/modules/pom.xml
  6. +106 −0 subsystem-as7/modules/spring-2.5/pom.xml
  7. +44 −0 subsystem-as7/modules/spring-2.5/src/main/assembly/spring-2.5-module.xml
  8. +68 −0 subsystem-as7/modules/spring-2.5/src/main/module/module.xml
  9. +108 −0 subsystem-as7/modules/spring-3/pom.xml
  10. +23 −8 ...ETA-INF/jboss-2-spring.xml → subsystem-as7/modules/spring-3/src/main/assembly/spring-3-module.xml
  11. +71 −0 subsystem-as7/modules/spring-3/src/main/module/module.xml
  12. +10 −138 subsystem-as7/pom.xml
  13. +153 −0 subsystem-as7/subsystem-as7/pom.xml
  14. +2 −1 subsystem-as7/{ → subsystem-as7}/src/main/assembly/deployer.xml
  15. 0 ...s7/{ → subsystem-as7}/src/main/java/org/jboss/spring/deployers/as7/ApplicationContextService.java
  16. +0 −1 ...as7/{ → subsystem-as7}/src/main/java/org/jboss/spring/deployers/as7/SpringBootstrapProcessor.java
  17. +24 −4 ...s7/{ → subsystem-as7}/src/main/java/org/jboss/spring/deployers/as7/SpringDependencyProcessor.java
  18. 0 subsystem-as7/{ → subsystem-as7}/src/main/java/org/jboss/spring/deployers/as7/SpringDeployment.java
  19. 0 ...7/{ → subsystem-as7}/src/main/java/org/jboss/spring/deployers/as7/SpringDescriptionProviders.java
  20. 0 subsystem-as7/{ → subsystem-as7}/src/main/java/org/jboss/spring/deployers/as7/SpringExtension.java
  21. +0 −2 ...as7/{ → subsystem-as7}/src/main/java/org/jboss/spring/deployers/as7/SpringStructureProcessor.java
  22. 0 ...ystem-as7/{ → subsystem-as7}/src/main/java/org/jboss/spring/deployers/as7/SpringSubsystemAdd.java
  23. +2 −5 subsystem-as7/{ → subsystem-as7}/src/main/module/module.xml
  24. 0 ...tem-as7/{ → subsystem-as7}/src/main/resources/META-INF/services/org.jboss.as.controller.Extension
  25. 0 ...{ → subsystem-as7}/src/main/resources/org/jboss/spring/deployers/as7/LocalDescriptions.properties
  26. 0 subsystem-as7/{ → subsystem-as7}/src/main/resources/schema/jboss-spring.xsd
View
6 pom.xml
@@ -363,6 +363,12 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
+ <artifactId>spring-context-support</artifactId>
+ <version>${version.spring}</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${version.spring}</version>
<optional>true</optional>
View
97 subsystem-as7/aggregator/pom.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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.
+ -->
+
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>snowdrop-subsystem-as7-parent</artifactId>
+ <groupId>org.jboss.snowdrop</groupId>
+ <version>2.0.0.Alpha2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>snowdrop-subsystem-as7-distribution</artifactId>
+ <name>Snowdrop AS7 Subsystem - Distribution Aggregator</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.snowdrop</groupId>
+ <artifactId>spring-2.5</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.snowdrop</groupId>
+ <artifactId>spring-3</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.snowdrop</groupId>
+ <artifactId>snowdrop-subsystem-as7</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-module</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>subsystem-as7-distribution</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assembly/assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ <execution>
+ <id>make-module-no-deps</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>subsystem-as7-nodeps</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assembly/assembly-nodeps.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+
+</project>
View
66 subsystem-as7/aggregator/src/main/assembly/assembly-nodeps.xml
@@ -0,0 +1,66 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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.
+ -->
+
+<assembly>
+ <id>deployer-module</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <baseDirectory>/</baseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/../modules/spring-2.5/src/main/module</directory>
+ <outputDirectory>org/springframework/spring/2.5</outputDirectory>
+ <includes>
+ <include>module.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../modules/spring-3/src/main/module</directory>
+ <outputDirectory>org/springframework/spring/main</outputDirectory>
+ <includes>
+ <include>module.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../subsystem-as7/src/main/module</directory>
+ <outputDirectory>org/jboss/snowdrop/main</outputDirectory>
+ <includes>
+ <include>module.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../subsystem-as7/target/dependency/lib</directory>
+ <outputDirectory>org/jboss/snowdrop/main</outputDirectory>
+ <includes>
+ <include>snowdrop-*.jar</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../subsystem-as7/target</directory>
+ <outputDirectory>org/jboss/snowdrop/main</outputDirectory>
+ <includes>
+ <include>${project.artifactId}.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
View
82 subsystem-as7/aggregator/src/main/assembly/assembly.xml
@@ -0,0 +1,82 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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.
+ -->
+
+<assembly>
+ <id>deployer-module</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <baseDirectory>/</baseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/../modules/spring-2.5/src/main/module</directory>
+ <outputDirectory>org/springframework/spring/2.5</outputDirectory>
+ <includes>
+ <include>module.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../modules/spring-2.5/target/dependency/lib</directory>
+ <outputDirectory>org/springframework/spring/2.5</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../modules/spring-3/src/main/module</directory>
+ <outputDirectory>org/springframework/spring/main</outputDirectory>
+ <includes>
+ <include>module.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../modules/spring-3/target/dependency/lib</directory>
+ <outputDirectory>org/springframework/spring/main</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../subsystem-as7/src/main/module</directory>
+ <outputDirectory>org/jboss/snowdrop/main</outputDirectory>
+ <includes>
+ <include>module.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../subsystem-as7/target/dependency/lib</directory>
+ <outputDirectory>org/jboss/snowdrop/main</outputDirectory>
+ <includes>
+ <include>snowdrop-vfs*.jar</include>
+ <include>snowdrop-deployers.jar</include>
+ <include>snowdrop-deployers-jandex.jar</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/../subsystem-as7/target</directory>
+ <outputDirectory>org/jboss/snowdrop/main</outputDirectory>
+ <includes>
+ <include>snowdrop-subsystem-as7.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
View
25 ...rlappingnames/META-INF/jboss-1-spring.xml → subsystem-as7/modules/pom.xml
@@ -21,10 +21,23 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>snowdrop-subsystem-as7-parent</artifactId>
+ <groupId>org.jboss.snowdrop</groupId>
+ <version>2.0.0.Alpha2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
- <description>BeanFactory=(TestContext)</description>
- <bean id="simpleBean" class="org.jboss.test.deployers.test.SimpleBean"/>
-</beans>
+ <artifactId>modules</artifactId>
+ <packaging>pom</packaging>
+ <name>Snowdrop AS7 Subsystem - Spring Modules</name>
+ <modules>
+ <module>spring-2.5</module>
+ <module>spring-3</module>
+ </modules>
+
+
+</project>
View
106 subsystem-as7/modules/spring-2.5/pom.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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.
+ -->
+
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>modules</artifactId>
+ <groupId>org.jboss.snowdrop</groupId>
+ <version>2.0.0.Alpha2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>spring-2.5</artifactId>
+
+ <name>Snowdrop AS7 Subsystem - Spring 2.5 Module</name>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context-support</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <stripVersion>true</stripVersion>
+ <includeGroupIds>org.springframework,org.jboss.snowdrop</includeGroupIds>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+
+ <executions>
+ <execution>
+ <id>make-module</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>spring-2.5-module</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assembly/spring-2.5-module.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ </build>
+</project>
View
44 subsystem-as7/modules/spring-2.5/src/main/assembly/spring-2.5-module.xml
@@ -0,0 +1,44 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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.
+ -->
+<assembly>
+ <id>deployer-module</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <baseDirectory>org/springframework/spring/2.5</baseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/src/main/module</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>module.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/target/dependency/lib</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
View
68 subsystem-as7/modules/spring-2.5/src/main/module/module.xml
@@ -0,0 +1,68 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.springframework.spring" slot="2.5">
+ <resources>
+ <resource-root path="spring-aop.jar"/>
+ <resource-root path="spring-beans.jar"/>
+ <resource-root path="spring-core.jar"/>
+ <resource-root path="spring-context.jar"/>
+ <resource-root path="spring-context-support.jar"/>
+ </resources>
+ <dependencies>
+ <module name="ch.qos.cal10n"/>
+ <module name="com.google.guava"/>
+ <module name="javax.api"/>
+ <module name="javax.annotation.api"/>
+ <module name="javax.el.api"/>
+ <module name="javax.enterprise.api"/>
+ <module name="javax.ejb.api"/>
+ <module name="javax.faces.api"/>
+ <module name="javax.interceptor.api"/>
+ <module name="javax.persistence.api"/>
+ <module name="javax.servlet.api"/>
+ <module name="javax.servlet.jsp.api"/>
+ <module name="javax.transaction.api"/>
+ <module name="org.javassist"/>
+ <module name="org.jboss.jandex"/>
+ <module name="org.jboss.staxmapper"/>
+ <module name="org.jboss.as.controller"/>
+ <module name="org.jboss.as.ee"/>
+ <module name="org.jboss.as.ejb3"/>
+
+ <module name="org.apache.commons.logging"/>
+ <module name="org.jboss.as.jpa"/>
+ <module name="org.jboss.as.naming"/>
+ <module name="org.jboss.as.server"/>
+ <module name="org.jboss.as.transactions"/>
+ <module name="org.jboss.as.web"/>
+ <module name="org.jboss.interceptor"/>
+ <module name="org.jboss.interceptor.spi"/>
+ <module name="org.jboss.logging"/>
+ <module name="org.jboss.metadata"/>
+ <module name="org.jboss.modules"/>
+ <module name="org.jboss.msc"/>
+ <module name="org.jboss.vfs"/>
+ <module name="org.slf4j"/>
+ <module name="org.slf4j.ext"/>
+ </dependencies>
+</module>
View
108 subsystem-as7/modules/spring-3/pom.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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.
+ -->
+
+<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/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>modules</artifactId>
+ <groupId>org.jboss.snowdrop</groupId>
+ <version>2.0.0.Alpha2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>spring-3</artifactId>
+ <name>Snowdrop AS7 Subsystem - Spring 3 Module</name>
+
+ <properties>
+ <version.spring>3.0.5.RELEASE</version.spring>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context-support</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <stripVersion>true</stripVersion>
+ <includeGroupIds>org.springframework,org.jboss.snowdrop</includeGroupIds>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+
+ <executions>
+ <execution>
+ <id>make-module</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>spring-2.5-module</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assembly/spring-3-module.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ </build>
+</project>
View
31 ...rlappingnames/META-INF/jboss-2-spring.xml → ...g-3/src/main/assembly/spring-3-module.xml
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2011, Red Hat Middleware LLC, and individual contributors
@@ -21,10 +20,26 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <description>BeanFactory=(TestContext)</description>
- <bean id="simpleBean" class="org.jboss.test.deployers.test.SimpleBean"/>
-</beans>
+<assembly>
+ <id>deployer-module</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <baseDirectory>org/springframework/spring/2.5</baseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/src/main/module</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>module.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/target/dependency/lib</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
View
71 subsystem-as7/modules/spring-3/src/main/module/module.xml
@@ -0,0 +1,71 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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.
+ -->
+
+<module xmlns="urn:jboss:module:1.0" name="org.springframework.spring">
+ <resources>
+ <resource-root path="spring-asm.jar"/>
+ <resource-root path="spring-aop.jar"/>
+ <resource-root path="spring-beans.jar"/>
+ <resource-root path="spring-core.jar"/>
+ <resource-root path="spring-context.jar"/>
+ <resource-root path="spring-context-support.jar"/>
+ <resource-root path="spring-expression.jar"/>
+ </resources>
+ <dependencies>
+ <module name="ch.qos.cal10n"/>
+ <module name="com.google.guava"/>
+ <module name="javax.api"/>
+ <module name="javax.annotation.api"/>
+ <module name="javax.el.api"/>
+ <module name="javax.enterprise.api"/>
+ <module name="javax.ejb.api"/>
+ <module name="javax.faces.api"/>
+ <module name="javax.interceptor.api"/>
+ <module name="javax.persistence.api"/>
+ <module name="javax.servlet.api"/>
+ <module name="javax.servlet.jsp.api"/>
+ <module name="javax.transaction.api"/>
+ <module name="org.javassist"/>
+ <module name="org.jboss.jandex"/>
+ <module name="org.jboss.staxmapper"/>
+ <module name="org.jboss.as.controller"/>
+ <module name="org.jboss.as.ee"/>
+ <module name="org.jboss.as.ejb3"/>
+
+ <module name="org.apache.commons.logging"/>
+ <module name="org.jboss.as.jpa"/>
+ <module name="org.jboss.as.naming"/>
+ <module name="org.jboss.as.server"/>
+ <module name="org.jboss.as.transactions"/>
+ <module name="org.jboss.as.web"/>
+ <module name="org.jboss.interceptor"/>
+ <module name="org.jboss.interceptor.spi"/>
+ <module name="org.jboss.logging"/>
+ <module name="org.jboss.metadata"/>
+ <module name="org.jboss.modules"/>
+ <module name="org.jboss.msc"/>
+ <module name="org.jboss.vfs"/>
+ <module name="org.slf4j"/>
+ <module name="org.slf4j.ext"/>
+
+ </dependencies>
+</module>
View
148 subsystem-as7/pom.xml
@@ -4,143 +4,15 @@
<artifactId>snowdrop-parent</artifactId>
<groupId>org.jboss.snowdrop</groupId>
<version>2.0.0.Alpha2-SNAPSHOT</version>
- <relativePath>..</relativePath>
</parent>
- <artifactId>snowdrop-subsystem-as7</artifactId>
- <name>Snowdrop AS7 Subsystem</name>
- <description>Spring subsystem for JBoss AS7</description>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-controller</artifactId>
- <version>${version.org.jboss.as7}</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-server</artifactId>
- <version>${version.org.jboss.as7}</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-naming</artifactId>
- <version>${version.org.jboss.as7}</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.snowdrop</groupId>
- <artifactId>snowdrop-vfs</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.snowdrop</groupId>
- <artifactId>snowdrop-deployers</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>process-resources</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
- <overWriteSnapshots>true</overWriteSnapshots>
- <stripVersion>true</stripVersion>
- <includeGroupIds>org.springframework,org.jboss.snowdrop</includeGroupIds>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>false</inherited>
- <executions>
- <execution>
- <id>build-dist</id>
- <goals>
- <goal>run</goal>
- </goals>
- <phase>package</phase>
- <configuration>
-
- <tasks>
- <taskdef name="jandex" classname="org.jboss.jandex.JandexAntTask" />
-
-
- <echo message="Scanning" />
- <jandex run="true" newJar="true">
- <fileset dir="${project.build.directory}/dependency/lib" />
- </jandex>
-
- </tasks>
-
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jandex</artifactId>
- <version>${version.org.jboss.jandex}</version>
- </dependency>
- </dependencies>
- </plugin>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
-
- <executions>
- <execution>
- <id>make-module</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <finalName>jboss-spring-deployer-as7</finalName>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>${basedir}/src/main/assembly/deployer.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <artifactId>snowdrop-subsystem-as7-parent</artifactId>
+ <name>Snowdrop AS7 Subsystem - Parent</name>
+ <description>Spring subsystem for JBoss AS7 - Parent module</description>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>subsystem-as7</module>
+ <module>modules</module>
+ <module>aggregator</module>
+ </modules>
</project>
View
153 subsystem-as7/subsystem-as7/pom.xml
@@ -0,0 +1,153 @@
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>snowdrop-subsystem-as7-parent</artifactId>
+ <groupId>org.jboss.snowdrop</groupId>
+ <version>2.0.0.Alpha2-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>snowdrop-subsystem-as7</artifactId>
+ <name>Snowdrop AS7 Subsystem</name>
+ <description>Spring subsystem for JBoss AS7</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-controller</artifactId>
+ <version>${version.org.jboss.as7}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <version>${version.org.jboss.as7}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-naming</artifactId>
+ <version>${version.org.jboss.as7}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.snowdrop</groupId>
+ <artifactId>snowdrop-vfs</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.snowdrop</groupId>
+ <artifactId>snowdrop-deployers-core</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.snowdrop</groupId>
+ <artifactId>snowdrop-deployers</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <stripVersion>true</stripVersion>
+ <includeGroupIds>org.springframework,org.jboss.snowdrop</includeGroupIds>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>build-dist</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+
+ <tasks>
+ <taskdef name="jandex" classname="org.jboss.jandex.JandexAntTask"/>
+ <jandex run="true" newJar="true">
+ <fileset dir="${project.build.directory}/dependency/lib"/>
+ </jandex>
+
+ </tasks>
+
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jandex</artifactId>
+ <version>${version.org.jboss.jandex}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+
+ <executions>
+ <execution>
+ <id>make-module</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>jboss-spring-deployer-as7</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assembly/deployer.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
3 subsystem-as7/src/main/assembly/deployer.xml → ...system-as7/src/main/assembly/deployer.xml
@@ -37,7 +37,8 @@
<directory>${basedir}/target/dependency/lib</directory>
<outputDirectory>/</outputDirectory>
<includes>
- <include>*.jar</include>
+ <include>snowdrop-vfs*.jar</include>
+ <include>snowdrop-deployers*.jar</include>
</includes>
</fileSet>
<fileSet>
View
0 ...loyers/as7/ApplicationContextService.java → ...loyers/as7/ApplicationContextService.java
File renamed without changes.
View
1 ...ployers/as7/SpringBootstrapProcessor.java → ...ployers/as7/SpringBootstrapProcessor.java
@@ -37,7 +37,6 @@
import org.springframework.context.ApplicationContext;
/**
- *
* @author Marius Bogoevici
*/
public class SpringBootstrapProcessor implements DeploymentUnitProcessor {
View
28 ...loyers/as7/SpringDependencyProcessor.java → ...loyers/as7/SpringDependencyProcessor.java
@@ -38,7 +38,8 @@
*/
public class SpringDependencyProcessor implements DeploymentUnitProcessor {
- private static final ModuleIdentifier MODULE_IDENTIFIER = ModuleIdentifier.create("org.jboss.snowdrop");
+ private static final ModuleIdentifier MODULE_IDENTIFIER_SNOWDROP = ModuleIdentifier.create("org.jboss.snowdrop");
+ private static final ModuleIdentifier MODULE_IDENTIFIER_SPRING = ModuleIdentifier.create("org.springframework.spring");
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
@@ -47,12 +48,31 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
if (locations == null || locations.getContextDefinitionLocations().isEmpty()) {
return;
}
- final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
- ModuleDependency moduleDependency = new ModuleDependency(Module.getBootModuleLoader(), MODULE_IDENTIFIER, false, false, true);
+
+ ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
+
+ addDependency(MODULE_IDENTIFIER_SNOWDROP, moduleSpecification);
+
+// boolean hasSpringDependency = false;
+// for (ModuleDependency moduleDependency : moduleSpecification.getAllDependencies()) {
+// if (moduleDependency.getIdentifier().equals(MODULE_IDENTIFIER_SPRING)) {
+// hasSpringDependency = true;
+// break;
+// }
+// }
+// if (!hasSpringDependency) {
+//
+// }
+ addDependency(MODULE_IDENTIFIER_SPRING, moduleSpecification);
+
+ deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_ANNOTATION_INDEXES, MODULE_IDENTIFIER_SNOWDROP);
+ }
+
+ private void addDependency(ModuleIdentifier moduleIdentifier, ModuleSpecification moduleSpecification) {
+ ModuleDependency moduleDependency = new ModuleDependency(Module.getBootModuleLoader(), moduleIdentifier, false, false, true);
moduleDependency.addExportFilter(PathFilters.getMetaInfFilter(), true);
moduleDependency.addImportFilter(PathFilters.getMetaInfFilter(), true);
moduleSpecification.addUserDependency(moduleDependency);
- deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_ANNOTATION_INDEXES, MODULE_IDENTIFIER);
}
@Override
View
0 ...pring/deployers/as7/SpringDeployment.java → ...pring/deployers/as7/SpringDeployment.java
File renamed without changes.
View
0 ...oyers/as7/SpringDescriptionProviders.java → ...oyers/as7/SpringDescriptionProviders.java
File renamed without changes.
View
0 ...spring/deployers/as7/SpringExtension.java → ...spring/deployers/as7/SpringExtension.java
File renamed without changes.
View
2 ...ployers/as7/SpringStructureProcessor.java → ...ployers/as7/SpringStructureProcessor.java
@@ -31,9 +31,7 @@
import org.jboss.logging.Logger;
import org.jboss.vfs.VirtualFile;
-import java.util.ArrayList;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
/**
View
0 ...ing/deployers/as7/SpringSubsystemAdd.java → ...ing/deployers/as7/SpringSubsystemAdd.java
File renamed without changes.
View
7 subsystem-as7/src/main/module/module.xml → .../subsystem-as7/src/main/module/module.xml
@@ -22,11 +22,6 @@
<module xmlns="urn:jboss:module:1.0" name="org.jboss.snowdrop">
<resources>
<resource-root path="snowdrop-subsystem-as7.jar"/>
- <resource-root path="spring-aop.jar"/>
- <resource-root path="spring-beans.jar"/>
- <resource-root path="spring-core.jar"/>
- <resource-root path="spring-context.jar"/>
- <resource-root path="spring-context-support.jar"/>
<resource-root path="snowdrop-vfs.jar"/>
<resource-root path="snowdrop-deployers.jar"/>
<resource-root path="snowdrop-deployers-jandex.jar"/>
@@ -67,5 +62,7 @@
<module name="org.jboss.vfs"/>
<module name="org.slf4j"/>
<module name="org.slf4j.ext"/>
+
+ <module name="org.springframework.spring" export="true" services="true"/>
</dependencies>
</module>
View
0 ...ervices/org.jboss.as.controller.Extension → ...ervices/org.jboss.as.controller.Extension
File renamed without changes.
View
0 ...eployers/as7/LocalDescriptions.properties → ...eployers/as7/LocalDescriptions.properties
File renamed without changes.
View
0 ...rc/main/resources/schema/jboss-spring.xsd → ...rc/main/resources/schema/jboss-spring.xsd
File renamed without changes.

0 comments on commit 59fe5cb

Please sign in to comment.