You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/03/24 15:47:03 UTC

[1/2] flex-blazeds git commit: - Added an initial implementation of a BlazeDS Spring-Boot Starter

Repository: flex-blazeds
Updated Branches:
  refs/heads/develop fdbf19e48 -> cf0d1eb59


- Added an initial implementation of a BlazeDS Spring-Boot Starter


Project: http://git-wip-us.apache.org/repos/asf/flex-blazeds/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-blazeds/commit/5340320f
Tree: http://git-wip-us.apache.org/repos/asf/flex-blazeds/tree/5340320f
Diff: http://git-wip-us.apache.org/repos/asf/flex-blazeds/diff/5340320f

Branch: refs/heads/develop
Commit: 5340320f7425270ce615ec29874b33cce5b9ac2d
Parents: fdbf19e
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Mar 24 15:45:57 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Mar 24 15:45:57 2016 +0100

----------------------------------------------------------------------
 blazeds-spring-boot-starter/pom.xml             | 101 +++++++++++++++++++
 .../spring/BlazeDsAutoConfiguration.java        |  70 +++++++++++++
 2 files changed, 171 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5340320f/blazeds-spring-boot-starter/pom.xml
----------------------------------------------------------------------
diff --git a/blazeds-spring-boot-starter/pom.xml b/blazeds-spring-boot-starter/pom.xml
new file mode 100644
index 0000000..5f60c56
--- /dev/null
+++ b/blazeds-spring-boot-starter/pom.xml
@@ -0,0 +1,101 @@
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>blazeds</artifactId>
+        <version>4.7.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>blazeds-spring-boot-starter</artifactId>
+
+    <dependencies>
+        <!-- Spring-Boot dependencies -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-autoconfigure</artifactId>
+            <version>1.3.3.RELEASE</version>
+        </dependency>
+
+        <!-- Add a reference to Apache Flex BlazeDS -->
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-core</artifactId>
+            <version>4.7.3-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-common</artifactId>
+            <version>4.7.3-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-proxy</artifactId>
+            <version>4.7.3-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-remoting</artifactId>
+            <version>4.7.3-SNAPSHOT</version>
+        </dependency>
+
+        <!--
+            We'll use Spring Flex-Integration for actually
+            running BlazeDS in Spring.
+        -->
+        <dependency>
+            <groupId>org.springframework.flex</groupId>
+            <artifactId>spring-flex-core</artifactId>
+            <version>1.5.2.RELEASE</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.adobe.blazeds</groupId>
+                    <artifactId>blazeds-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.adobe.blazeds</groupId>
+                    <artifactId>blazeds-common</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.adobe.blazeds</groupId>
+                    <artifactId>blazeds-proxy</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.adobe.blazeds</groupId>
+                    <artifactId>blazeds-remoting</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!--
+            As we rely on the Web layer being configured,
+            we can also take care of providing it. This way
+            all you need is a dependency to blazeds-spring-boot-starter
+            and you have all you need.
+        -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <version>1.3.3.RELEASE</version>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/5340320f/blazeds-spring-boot-starter/src/main/java/org/apache/flex/blazeds/spring/BlazeDsAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/blazeds-spring-boot-starter/src/main/java/org/apache/flex/blazeds/spring/BlazeDsAutoConfiguration.java b/blazeds-spring-boot-starter/src/main/java/org/apache/flex/blazeds/spring/BlazeDsAutoConfiguration.java
new file mode 100644
index 0000000..d516828
--- /dev/null
+++ b/blazeds-spring-boot-starter/src/main/java/org/apache/flex/blazeds/spring/BlazeDsAutoConfiguration.java
@@ -0,0 +1,70 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.blazeds.spring;
+
+import flex.messaging.MessageBroker;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnResource;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.flex.core.MessageBrokerFactoryBean;
+
+import javax.servlet.ServletContext;
+
+/**
+ * Created by christoferdutz on 21.03.16.
+ */
+@ConditionalOnWebApplication
+@ConditionalOnResource(resources = BlazeDsAutoConfiguration.SERVICES_CONFIG_PATH)
+public class BlazeDsAutoConfiguration {
+
+    public static final String SERVICES_CONFIG_PATH = "classpath:/META-INF/flex/services-config.xml";
+
+    @Autowired
+    private ServletContext context;
+
+    @Autowired
+    private ResourceLoader resourceLoader;
+
+    @Bean
+    public MessageBroker messageBroker() throws Exception {
+        // We'll use the Spring-Flex-Integration factories.
+        MessageBrokerFactoryBean factoryBean = new MessageBrokerFactoryBean();
+
+        // TODO: Do all the special configuration magic here ...
+        //factoryBean.setConfigProcessors(null);
+        //factoryBean.setConfigurationManager(null);
+
+        // Setup the Spring stuff.
+        factoryBean.setResourceLoader(resourceLoader);
+        factoryBean.setServletContext(context);
+
+        // The most important option: Where the services-config.xml is located.
+        factoryBean.setServicesConfigPath(SERVICES_CONFIG_PATH);
+
+        // This actually internally creates and configures the message broker.
+        factoryBean.afterPropertiesSet();
+
+        // Return the instance.
+        return factoryBean.getObject();
+    }
+
+}


[2/2] flex-blazeds git commit: FLEX-34980 - NoSuchMethodError on Java 7 - Added the animal sniffer maven plugin to ensure API compatibility with JDK 1.6

Posted by cd...@apache.org.
FLEX-34980 - NoSuchMethodError on Java 7
- Added the animal sniffer maven plugin to ensure API compatibility with JDK 1.6


Project: http://git-wip-us.apache.org/repos/asf/flex-blazeds/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-blazeds/commit/cf0d1eb5
Tree: http://git-wip-us.apache.org/repos/asf/flex-blazeds/tree/cf0d1eb5
Diff: http://git-wip-us.apache.org/repos/asf/flex-blazeds/diff/cf0d1eb5

Branch: refs/heads/develop
Commit: cf0d1eb59c2505feb0d6039f85090fc07253d5ff
Parents: 5340320
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Mar 24 15:46:54 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Mar 24 15:46:54 2016 +0100

----------------------------------------------------------------------
 pom.xml | 44 ++++++++++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/cf0d1eb5/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9058753..1e874a2 100755
--- a/pom.xml
+++ b/pom.xml
@@ -65,6 +65,7 @@
 		<module>remoting</module>
 		<module>opt</module>
 		<module>testsuite</module>
+		<module>blazeds-spring-boot-starter</module>
 	</modules>
 
 	<build>
@@ -89,26 +90,6 @@
 				</configuration>
 			</plugin>
 
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.5.1</version>
-                <executions>
-                    <execution>
-                        <id>assemble-sources-releases</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <descriptors>
-                        <descriptor>src/assembly/assemble-zip.xml</descriptor>
-                        <descriptor>src/assembly/assemble-gz.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-
             <!-- Turned off till the JavaDoc tags are all correctly set -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -117,6 +98,29 @@
                     <skip>true</skip>
                 </configuration>
             </plugin>
+
+			<!-- Plugin to detect problems with JDK incompatabilities -->
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>animal-sniffer-maven-plugin</artifactId>
+				<version>1.15</version>
+				<executions>
+					<execution>
+						<id>check-jdk-1.6</id>
+						<phase>test</phase>
+						<goals>
+							<goal>check</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<signature>
+						<groupId>org.codehaus.mojo.signature</groupId>
+						<artifactId>java16</artifactId>
+						<version>1.1</version>
+					</signature>
+				</configuration>
+			</plugin>
 		</plugins>
 	</build>