Permalink
Browse files

INTTEMPLATES-8 - Create Spring Integration Adapter Template

  • Loading branch information...
1 parent e013f67 commit 1e000f0b69ea0c93ea52f3214d95572418385b53 Gunnar Hillert committed Jun 7, 2012
Showing with 3,112 additions and 761 deletions.
  1. +17 −0 si-maven-archetypes/archetype-standalone-simple/.project
  2. +29 −20 si-sts-templates/README.md
  3. +13 −7 si-sts-templates/builds/descriptor.xml
  4. BIN si-sts-templates/builds/org.springframework.integration.sts.templates_1.0.0.M2.jar
  5. BIN si-sts-templates/builds/org.springframework.integration.sts.templates_1.0.0.M3.jar
  6. BIN si-sts-templates/builds/si-template-adapter-1.0.0.M3.zip
  7. BIN si-sts-templates/builds/si-template-standalone-1.0.0.M3.zip
  8. BIN si-sts-templates/builds/si-template-standalone-simple-1.0.0.M3.zip
  9. BIN si-sts-templates/builds/si-template-war-1.0.0.M3.zip
  10. +189 −31 si-sts-templates/pom.xml
  11. +0 −5 si-sts-templates/si-template-plugin/META-INF/MANIFEST.MF
  12. +0 −2 si-sts-templates/si-template-plugin/OSGI-INF/l10n/bundle.properties
  13. +0 −3 si-sts-templates/si-template-plugin/build.properties
  14. +0 −13 si-sts-templates/si-template-plugin/plugin.xml
  15. +0 −61 si-sts-templates/si-template-plugin/pom.xml
  16. +0 −16 si-sts-templates/si-template-plugin/src/main/assembly/descriptor-dir.xml
  17. +0 −27 si-sts-templates/si-template-plugin/src/main/assembly/plugin-jar.xml
  18. +0 −22 si-sts-templates/si-template-plugin/src/main/resources/descriptor.xml
  19. +0 −61 si-sts-templates/si-template-standalone-simple/pom.xml
  20. +0 −28 si-sts-templates/si-template-standalone-simple/src/main/assembly/src.xml
  21. +0 −30 si-sts-templates/si-template-standalone-simple/src/main/assembly/zip.xml
  22. +0 −12 si-sts-templates/si-template-standalone-simple/template/template.xml
  23. +0 −53 si-sts-templates/si-template-standalone-simple/template/wizard.json
  24. +0 −61 si-sts-templates/si-template-standalone/pom.xml
  25. +0 −28 si-sts-templates/si-template-standalone/src/main/assembly/src.xml
  26. +0 −30 si-sts-templates/si-template-standalone/src/main/assembly/zip.xml
  27. +0 −12 si-sts-templates/si-template-standalone/template/template.xml
  28. +0 −53 si-sts-templates/si-template-standalone/template/wizard.json
  29. +0 −62 si-sts-templates/si-template-war/pom.xml
  30. +0 −27 si-sts-templates/si-template-war/src/main/assembly/src.xml
  31. +0 −30 si-sts-templates/si-template-war/src/main/assembly/zip.xml
  32. +0 −13 si-sts-templates/si-template-war/template/template.xml
  33. +0 −53 si-sts-templates/si-template-war/template/wizard.json
  34. +34 −0 si-sts-templates/src/main/assembly/adapter.xml
  35. +17 −0 si-sts-templates/src/main/assembly/descriptor.xml
  36. +36 −0 si-sts-templates/src/main/assembly/standalone-simple.xml
  37. +36 −0 si-sts-templates/src/main/assembly/standalone.xml
  38. +35 −0 si-sts-templates/src/main/assembly/war.xml
  39. +74 −0 si-sts-templates/src/main/resources/descriptor.xml
  40. +13 −0 si-template-projects/adapter/.classpath
  41. +20 −0 si-template-projects/adapter/.project
  42. +69 −0 si-template-projects/adapter/README.md
  43. +307 −0 si-template-projects/adapter/build.gradle
  44. +1 −0 si-template-projects/adapter/gradle.properties
  45. BIN si-template-projects/adapter/gradle/wrapper/gradle-wrapper.jar
  46. +6 −0 si-template-projects/adapter/gradle/wrapper/gradle-wrapper.properties
  47. +164 −0 si-template-projects/adapter/gradlew
  48. +90 −0 si-template-projects/adapter/gradlew.bat
  49. +61 −0 si-template-projects/adapter/publish-maven.gradle
  50. +22 −0 si-template-projects/adapter/src/api/overview.html
  51. +15 −0 si-template-projects/adapter/src/dist/changelog.txt
  52. +201 −0 si-template-projects/adapter/src/dist/license.txt
  53. +21 −0 si-template-projects/adapter/src/dist/notice.txt
  54. +13 −0 si-template-projects/adapter/src/dist/readme.txt
  55. +36 −0 si-template-projects/adapter/src/main/java/stsorg/stsspring/stsint/SIAdapterUpperPrefixHeaders.java
  56. +58 −0 ...main/java/stsorg/stsspring/stsint/config/xml/SIAdapterUpperPrefixInboundChannelAdapterParser.java
  57. +37 −0 ...dapter/src/main/java/stsorg/stsspring/stsint/config/xml/SIAdapterUpperPrefixNamespaceHandler.java
  58. +69 −0 ...ain/java/stsorg/stsspring/stsint/config/xml/SIAdapterUpperPrefixOutboundChannelAdapterParser.java
  59. +73 −0 ...r/src/main/java/stsorg/stsspring/stsint/config/xml/SIAdapterUpperPrefixOutboundGatewayParser.java
  60. +62 −0 ...cts/adapter/src/main/java/stsorg/stsspring/stsint/config/xml/SIAdapterUpperPrefixParserUtils.java
  61. +4 −0 si-template-projects/adapter/src/main/java/stsorg/stsspring/stsint/config/xml/package-info.java
  62. +98 −0 ...ate-projects/adapter/src/main/java/stsorg/stsspring/stsint/core/SIAdapterUpperPrefixExecutor.java
  63. +4 −0 si-template-projects/adapter/src/main/java/stsorg/stsspring/stsint/core/package-info.java
  64. +77 −0 ...pter/src/main/java/stsorg/stsspring/stsint/inbound/SIAdapterUpperPrefixPollingChannelAdapter.java
  65. +4 −0 si-template-projects/adapter/src/main/java/stsorg/stsspring/stsint/inbound/package-info.java
  66. +83 −0 ...s/adapter/src/main/java/stsorg/stsspring/stsint/outbound/SIAdapterUpperPrefixOutboundGateway.java
  67. +4 −0 si-template-projects/adapter/src/main/java/stsorg/stsspring/stsint/outbound/package-info.java
  68. +4 −0 si-template-projects/adapter/src/main/java/stsorg/stsspring/stsint/package-info.java
  69. +33 −0 ...ate-projects/adapter/src/main/java/stsorg/stsspring/stsint/support/SIAdapterUpperPrefixUtils.java
  70. +4 −0 si-template-projects/adapter/src/main/java/stsorg/stsspring/stsint/support/package-info.java
  71. +1 −0 si-template-projects/adapter/src/main/resources/META-INF/spring.handlers
  72. +2 −0 si-template-projects/adapter/src/main/resources/META-INF/spring.schemas
  73. +4 −0 si-template-projects/adapter/src/main/resources/META-INF/spring.tooling
  74. +192 −0 ...main/resources/stsorg/stsspring/stsint/config/xml/spring-integration-siAdapterLowerPrefix-2.2.xsd
  75. BIN ...src/main/resources/stsorg/stsspring/stsint/config/xml/spring-integration-siAdapterLowerPrefix.gif
  76. +73 −0 si-template-projects/adapter/src/reference/docbook/SIAdapterLowerPrefix.xml
  77. +8 −0 si-template-projects/adapter/src/reference/docbook/history.xml
  78. BIN si-template-projects/adapter/src/reference/docbook/images/logo.png
  79. +68 −0 si-template-projects/adapter/src/reference/docbook/index.xml
  80. +17 −0 si-template-projects/adapter/src/reference/docbook/resources.xml
  81. +11 −0 si-template-projects/adapter/src/reference/docbook/whats-new.xml
  82. +79 −0 ...ingframework/integration/jpa/config/xml/SIAdapterUpperPrefixInboundChannelAdapterParserTests.java
  83. +20 −0 ...ringframework/integration/jpa/config/xml/SIAdapterUpperPrefixInboundChannelAdapterParserTests.xml
  84. +79 −0 ...org/springframework/integration/jpa/config/xml/SIAdapterUpperPrefixMessageHandlerParserTests.java
  85. +20 −0 .../org/springframework/integration/jpa/config/xml/SIAdapterUpperPrefixMessageHandlerParserTests.xml
  86. +86 −0 ...rg/springframework/integration/jpa/config/xml/SIAdapterUpperPrefixOutboundGatewayParserTests.java
  87. +22 −0 ...org/springframework/integration/jpa/config/xml/SIAdapterUpperPrefixOutboundGatewayParserTests.xml
  88. +8 −0 si-template-projects/adapter/src/test/resources/log4j.properties
  89. +15 −0 si-template-projects/adapter/template.xml
  90. +75 −0 si-template-projects/adapter/wizard.json
  91. +15 −0 si-template-projects/si-template-standalone-project/template.xml
  92. +49 −0 si-template-projects/si-template-standalone-project/wizard.json
  93. +15 −0 si-template-projects/si-template-standalone-simple-project/template.xml
  94. +50 −0 si-template-projects/si-template-standalone-simple-project/wizard.json
  95. +5 −0 si-template-projects/si-template-war-project/.project
  96. +1 −1 si-template-projects/si-template-war-project/.settings/org.eclipse.core.resources.prefs
  97. +15 −0 si-template-projects/si-template-war-project/template.xml
  98. +49 −0 si-template-projects/si-template-war-project/wizard.json
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>si-archetype-standalone-simple</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
View
@@ -1,40 +1,45 @@
-Spring Integration STS Plugin and Templates
-===========================================
+Spring Integration STS Templates
+================================
-This project provides an plugin and various projects for SpringSource Tool Suite™.
+This project provides various project templates for SpringSource Tool Suite™ (STS).
+
+# Requirements
+
+Starting with Spring Integration STS Template 1.0.0.M4, we rely on the template support provided by STS **3.0.0.M3** and later. The simplifications allowed us to significantly simplify the development and build process for the templates.
# How to build the project
In order to build the entire project run:
$ mvn clean package
-This will result in *3 artifacts* being created under **target/out**:
+This will result in *5 artifacts* being created under **target/out**:
* descriptor.xml
-* org.springframework.integration.sts.templates_1.0.0.M3.jar
-* si-template-1.0.0.M3.zip
+* si-template-adapter-1.0.0.M4.zip
+* si-template-standalone-1.0.0.M4.zip
+* si-template-standalone-simple-1.0.0.M4.zip
+* si-template-war-1.0.0.M4.zip
+
+In order to deploy to STS for **development** you have **2 options**:
-In order to deploy to STS you have 2 options:
+## Use the Self-Hosted Templates feature in STS
-1. drop the Eclipse plugin **org.springframework.integration.sts.templates_1.0.0.M3.jar**
- to your Eclipse STS **dropins/plugins folder**. Restart Eclipse STS.
+This approach is **Best for Development**.
-2. Option 2 is good for developing/changing the Eclipse STS template.
+1. In STS - Go to **Preferences...** --> **Spring** --> **Template Projects**
+2. Mark the checkbox **Show self-hosted templates in New Template Wizard**
+3. Import the individual template projects into STS, they will be immediately available as templates
-Take the **si-template-1.0.0.M3.zip** jar file and unpack it in your Eclipse workspace in a directory called
-**.metadata/.sts/content/${pom.artifactId}-${pom.version}**. Then add or edit the
-template descriptor in **.metadata/.plugins/com.springsource.sts.content.core/content.xml**
-so it has this form:
+## Tell STS to use the descriptor.xml file (Best for hosting your )
- <descriptor id="${pom.artifactId}" kind="template" local="true"
- name="${pom.name}" size="0" version="${pom.version}">
- <description>...</description>
- </descriptor>
+This approach is **Best for Deploying** your own temapltes.
-Make sure there are no conflicting templates with the same name and a different version.
+1. In STS - Go to **Preferences...** --> **Spring** --> **Template Projects**
+2. Press the **Add** Button
+3. Enter the URL that points to the **descriptor.xml** (Currently only HTTP addresses are supported, local file support will be available soon - see: [STS-2666](https://issuetracker.springsource.com/browse/STS-2666))
-## Important
+## Important 1
A few files in the template project require absolute URLs. By default the pom is setup to use:
@@ -45,3 +50,7 @@ base.location property such as:
$ mvn package -Dbase.location=http://www.mysite.com/si-templates
+## Important 2
+
+Templates are locally cached under *your_workspace/.metadata/.sts/content/*. At times during development you may need to delete the templates there for various reasons...
+
@@ -2,21 +2,27 @@
<descriptors>
<descriptor id="org.springframework.integration.sts.template.standalone.simple"
name="Spring Integration Project (Standalone) - Simple" kind="template"
- version="1.0.0.M2" local="false" size="8390"
- url="https://raw.github.com/SpringSource/spring-integration-templates/master/si-sts-templates/builds/si-template-standalone-simple-1.0.0.M2.zip">
+ version="1.0.0.M3" local="false" size="8390" category="Integration"
+ url="https://raw.github.com/ghillert/spring-integration-templates/INTTEMPLATES-8/si-sts-templates/builds/si-template-standalone-simple-1.0.0.M3.zip">
<description>Creates a Spring Integration project that runs as a standalone Java application using core components only.</description>
</descriptor>
<descriptor id="org.springframework.integration.sts.template.standalone"
name="Spring Integration Project (Standalone) - File" kind="template"
- version="1.0.0.M2" local="false" size="10258"
- url="https://raw.github.com/SpringSource/spring-integration-templates/master/si-sts-templates/builds/si-template-standalone-1.0.0.M2.zip">
+ version="1.0.0.M3" local="false" size="10258" category="Integration"
+ url="https://raw.github.com/ghillert/spring-integration-templates/INTTEMPLATES-8/si-sts-templates/builds/si-template-standalone-1.0.0.M3.zip">
<description>Creates a Spring Integration project that runs as a standalone Java application using file polling and file output.</description>
</descriptor>
<descriptor id="org.springframework.integration.sts.template.war"
- name="Spring Integration Project (War)" kind="template" version="1.0.0.M2"
- local="false" size="56242"
- url="https://raw.github.com/SpringSource/spring-integration-templates/master/si-sts-templates/builds/si-template-war-1.0.0.M2.zip">
+ name="Spring Integration Project (War)" kind="template" version="1.0.0.M3"
+ local="false" size="56242" category="Integration"
+ url="https://raw.github.com/ghillert/spring-integration-templates/INTTEMPLATES-8/si-sts-templates/builds/si-template-war-1.0.0.M3.zip">
<description>Creates a Spring Integration project that runs within a servlet container.
Uses the Spring Integration Twitter adapter.</description>
</descriptor>
+ <descriptor id="org.springframework.integration.sts.template.adapter"
+ name="Spring Integration Adapter Template Project" kind="template" version="1.0.0.M3"
+ local="false" size="56242" category="Integration"
+ url="https://raw.github.com/ghillert/spring-integration-templates/INTTEMPLATES-8/si-sts-templates/builds/si-template-adapter-1.0.0.M3.zip">
+ <description>Creates a Spring Integration Adapter Template.</description>
+ </descriptor>
</descriptors>
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -1,39 +1,197 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.springframework.integration.sts.templates</groupId>
- <artifactId>si-template-parent</artifactId>
- <version>1.0.0.M3</version>
- <packaging>pom</packaging>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.springframework.integration.sts.templates</groupId>
+ <artifactId>si-sts-templates</artifactId>
+ <version>1.0.0.M3</version>
+ <packaging>pom</packaging>
- <modules>
- <module>si-template-standalone-simple</module>
- <module>si-template-standalone</module>
- <module>si-template-war</module>
- <module>si-template-plugin</module>
- </modules>
+ <name>${project.artifactId}</name>
- <name>${project.artifactId}</name>
+ <description>This is the parent project for the Spring Integration STS Templates project.</description>
- <description>This is the parent project for the Spring Integration STS Templates project.</description>
+ <inceptionYear>2011</inceptionYear>
+ <developers>
+ <developer>
+ <id>ghillert</id>
+ <name>Gunnar Hillert</name>
+ <email>ghillert at vmware dot com</email>
+ <url>http://blog.hillert.com</url>
+ <roles>
+ <role>Admin</role>
+ </roles>
+ <timezone>-5</timezone>
+ </developer>
+ </developers>
- <inceptionYear>2011</inceptionYear>
- <developers>
- <developer>
- <id>ghillert</id>
- <name>Gunnar Hillert</name>
- <email>ghillert at vmware dot com</email>
- <url>http://blog.hillert.com</url>
- <roles>
- <role>Admin</role>
- </roles>
- <timezone>-5</timezone>
- </developer>
- </developers>
+ <properties>
+ <base.location>file://${project.basedir}/target/out</base.location>
+ <template.version>${project.version}</template.version>
+ <template.category>Integration</template.category>
- <properties>
- <base.location>file://${project.parent.basedir}/target/out</base.location>
- <template.version>${project.version}</template.version>
- </properties>
+ <template.standalone.size>12200</template.standalone.size>
+ <template.standalone-simple.size>9900</template.standalone-simple.size>
+ <template.war.size>61000</template.war.size>
+ <template.adapter.size>117000</template.adapter.size>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>descriptor</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ <executions>
+ <execution>
+ <id>make-template-descriptor-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <finalName>out</finalName>
+ <outputDirectory>target</outputDirectory>
+ <descriptors>
+ <descriptor>src/main/assembly/descriptor.xml</descriptor>
+ </descriptors>
+ <attach>true</attach>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>standalone</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ <executions>
+ <execution>
+ <id>make-standalone-template</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/standalone.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ <finalName>si-template-standalone-${template.version}</finalName>
+ <outputDirectory>target/out</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>standalone-simple</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ <executions>
+ <execution>
+ <id>make-standalone-simple-template</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/standalone-simple.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ <finalName>si-template-standalone-simple-${template.version}</finalName>
+ <outputDirectory>target/out</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>war</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ <executions>
+ <execution>
+ <id>make-war-template</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/war.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ <finalName>si-template-war-${template.version}</finalName>
+ <outputDirectory>target/out</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>adapter</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ <executions>
+ <execution>
+ <id>make-adapter-template</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/adapter.xml</descriptor>
+ </descriptors>
+ <appendAssemblyId>false</appendAssemblyId>
+ <finalName>si-template-adapter-${template.version}</finalName>
+ <outputDirectory>target/out</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
@@ -1,5 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Spring Integration STS Plugin
-Bundle-SymbolicName: org.springframework.integration.sts.templates;singleton:=true
-Bundle-Version: 1.0.0.M3
@@ -1,2 +0,0 @@
-content.descriptor.urls = http://dist.springsource.com/release/STS/help/descriptors.xml\n\
-${base.location}/descriptor.xml
@@ -1,3 +0,0 @@
-bin.includes = META-INF/,\
- plugin.xml,\
- OSGI-INF/
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- point="com.springsource.sts.core.resources">
- <url
- id="content.descriptors"
- value="%content.descriptor.urls">
- </url>
- </extension>
-
-</plugin>
Oops, something went wrong.

0 comments on commit 1e000f0

Please sign in to comment.