Announcement Announcement Module
Collapse
No announcement yet.
Using Spring BlazeDS Integration nightly builds with Maven Page Title Module
Move Remove Collapse
This is a sticky topic.
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Spring BlazeDS Integration nightly builds with Maven

    For those of you who are using Maven for your project builds and depending on maven-central-compatible pom's (i.e., not the OSGi-ready dependencies in the SpringSource Enterprise Bundle Repository), I thought it would be worth documenting the process of pulling a nightly snapshot build of Spring BlazeDS Integration into your project in case you don't mind living on the edge a little (i.e., fair warning that things might break) and are in need of the latest fixes in between releases.

    All development is now happening in SVN trunk for what will eventually be version 1.5.0. At this point we have no intention of any further 1.0.x releases unless a critical bug arises.

    Currently, the only snapshots we are publishing are the core Maven artifacts for 1.5.0. We have not yet incorporated publishing of a full .zip distribution with docs, source, etc. (as we did with 1.0.x) into our nightly build process. We will likely begin publishing a full nightly distro right before we release the first 1.5.0 Milestone.

    As a consequence of our migration to Maven as the single build system for the project, as well as the fact that there will eventually be additional artifacts included (beyond just the core jar) in 1.5.0, the main dependency's artifact id has changed to spring-flex-core.

    To grab the current nightly snapshots with Maven, you must first have the maven.springframework.org snapshot repository configured either in your settings.xml (preferred) or directly in your project's pom. The correct format of the repository entry is:

    Code:
    <repository>
        <id>spring-snapshot</id>
        <name>Spring Portfolio Snapshot Repository</name>
        <url>http://maven.springframework.org/snapshot</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
    Once you have the correct repository settings, you would express a dependency on spring-flex-core as follows:
    Code:
    <dependency>
        <groupId>org.springframework.flex</groupId>
        <artifactId>spring-flex-core</artifactId>
        <version>1.5.0.BUILD-SNAPSHOT</version>
    </dependency>
    *** One problem you will likely encounter is that 1.5.0 depends on BlazeDS 4, which is not currently published in any known public Maven repository. You will need to install the BlazeDS 4 Maven artifacts into your local repository in order to build successfully against the 1.5.0 nightly snapshots. For example, you can use 'mvn install:install-file' to install to your local repository, or 'mvn deploy:deploy-file' to install to your own hosted repo. You can grab the necessary pom's from our SVN repository here:

    https://src.springframework.org/svn/...ds-4.0.0.14931
    Last edited by jeremyg484; May 17th, 2010, 12:32 PM. Reason: Updated to reflect changes for 1.5.0 snapshots.

  • agodinhost
    replied
    Hi, I'm using the pom.xml in the modules trunk but seems that the opt-tomcat7 (and 6, I think) is missing a <scope> tag. The current pom.xml brings all tomcat7 dependencies and we don't need that.

    So, my patch:

    Index: pom.xml
    ================================================== =================
    --- pom.xml (revision 23208)
    +++ pom.xml (working copy)
    @@ -34,6 +34,7 @@
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-catalina</artifactId>
    <version>7.0.8</version>
    + <scope>provided</scope>
    </dependency>
    </dependencies>
    <properties>

    I hope it helps.

    Leave a comment:


  • Slidewayz
    replied
    Originally posted by Heen
    I am also having sample problem, may be i need to see the help section in detail.
    This is what I used to get started: http://refcardz.dzone.com/refcardz/flex-4-and-spring-3

    I found it 'better' than the example since I built it up step-by-step with an explanation of what each piece is doing.

    Leave a comment:


  • ConorMull
    replied
    Hi,

    I was just wondering if there is any date yet for an official release of 1.5? I have been trying in vain to configure the data service feature of flash builder 4. I keep receiving the RDS 404 message with regard to ide.cfm. I am hoping all this will be a lot easier to integrate with Maven once the release happens?...

    Leave a comment:


  • jcarter
    replied
    Much improved. Thanks.

    Leave a comment:


  • jeremyg484
    replied
    I believe the correct URL for the snapshot repo these days is:

    http://maven.springframework.org/snapshot

    Note that as we still host everything in S3, it's not directly browsable. If you want to browser the contents, you can use:

    https://s3browse.springsource.com/br...framework.org/

    Also note that as a result of our moving to using Maven as the single build system for the project, and the fact that there will eventually be additional artifacts in the distro in the final 1.5, the main dependency you want to grab is now spring-flex-core:

    Code:
    <dependency>
        <groupId>org.springframework.flex</groupId>
        <artifactId>spring-flex-core</artifactId>
        <version>1.5.0.BUILD-SNAPSHOT</version>
    </dependency>
    I will update the original post to reflect the current state.

    Leave a comment:


  • jcarter
    replied
    Snapshots broken?

    The POMs are available at <http://s3.amazonaws.com/maven.springframework.org/snapshot/org/springframework/flex/spring-flex/1.5.0.BUILD-SNAPSHOT/spring-flex-1.5.0.BUILD-20100516.010007-81.pom> but the corresponding JAR appears to be missing.

    Leave a comment:


  • pledge
    replied
    Have the contents of http://s3.amazonaws.com/maven.spring...k.org/snapshot being deleted? It seems to no longer work.

    Edit: Ignore, faulty Nexus settings.
    Last edited by pledge; Mar 10th, 2010, 08:23 AM. Reason: Fixed

    Leave a comment:


  • pledge
    replied
    Is that the full error? I had something similar which was being caused by a missing dependency on spring-aop, which hadn't been pulled through as a transitive dependency by Maven.

    Leave a comment:


  • couzteau
    replied
    Thank you pledge. I can compile now. But when I launch my app in tc server an execption flies in Context initialization, stacktrace below:

    My BlazeDs Messager broker is defined like this:
    <flex:message-broker/>

    I don't define bean _messageBrokerDefaultHandlerMapping mself.

    Any ideas anyone?

    Thank you
    Jacques

    Stacktrace:
    Code:
    2010-03-08 17:11:05,504 ERROR [org.springframework.web.servlet.DispatcherServlet] - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBrokerDefaultHandlerMapping': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBroker': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanInitializationException: MessageBroker initialization failed; nested exception is java.lang.NullPointerException
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
    	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
    	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
    	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
    	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
    	at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
    	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
    	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
    	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:848)
    	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:724)
    	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
    	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1211)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:741)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:587)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:290)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)

    Leave a comment:


  • pledge
    replied
    You don't need to use the exact version. I just took the latest nightly build from your link and installed that.

    Extract the ZIP, then the WAR.
    Run these whilst inside the lib directory (change the number if a new one came out):

    Code:
    mvn install:install-file -Dpackaging=jar -DgroupId=com.adobe.blazeds -Dversion=4.0.0.14593 -DartifactId=blazeds-common -Dfile=flex-messaging-common.jar
    mvn install:install-file -Dpackaging=jar -DgroupId=com.adobe.blazeds -Dversion=4.0.0.14593 -DartifactId=blazeds-core -Dfile=flex-messaging-core.jar
    mvn install:install-file -Dpackaging=jar -DgroupId=com.adobe.blazeds -Dversion=4.0.0.14593 -DartifactId=blazeds-proxy -Dfile=flex-messaging-proxy.jar
    mvn install:install-file -Dpackaging=jar -DgroupId=com.adobe.blazeds -Dversion=4.0.0.14593 -DartifactId=blazeds-remoting -Dfile=flex-messaging-remoting.jar
    mvn install:install-file -Dpackaging=jar -DgroupId=com.adobe.blazeds -Dversion=4.0.0.14593 -DartifactId=blazeds-rds-server -Dfile=flex-rds-server.jar
    Then in your own project's POM add these to override the ones being pulled in by Spring
    Code:
    <dependencies>
    <dependency>
      <groupId>com.adobe.blazeds</groupId>
      <artifactId>blazeds-core</artifactId>
      <version>${blazeds.version}</version>
    </dependency>
    <dependency>
      <groupId>com.adobe.blazeds</groupId>
      <artifactId>blazeds-common</artifactId>
      <version>${blazeds.version}</version>
    </dependency>
    <dependency>
      <groupId>com.adobe.blazeds</groupId>
      <artifactId>blazeds-proxy</artifactId>
      <version>${blazeds.version}</version>
    </dependency>
    <dependency>
      <groupId>com.adobe.blazeds</groupId>
      <artifactId>blazeds-remoting</artifactId>
      <version>${blazeds.version}</version>
    </dependency>
    <dependency>
      <groupId>com.adobe.blazeds</groupId>
      <artifactId>blazeds-rds-server</artifactId>
      <version>${blazeds.version}</version>
    </dependency>
    </dependencies>
    Code:
    <properties>
      <blazeds.version>4.0.0.14593</blazeds.version>
    </properties>

    Leave a comment:


  • couzteau
    replied
    WHere did you get the jar from. I would be ok to install it, but I cannot find it anywhere. If you have it, pls send me a link.

    Leave a comment:


  • pledge
    replied
    Having the same problem here. You can install them to your local repo but would be nice to know which remote repo to add in to get them.

    Leave a comment:


  • couzteau
    replied
    My maven build is missing the BlazeDS-core jar that the nightly build depends on:
    com.adobe.blazeds:blazeds-core:jar:4.0.0.10153


    Using this dependency:
    Code:
    		<dependency>
    			<groupId>org.springframework.flex</groupId>
    			<artifactId>spring-flex</artifactId>
    			<version>1.5.0.BUILD-SNAPSHOT</version>
    		</dependency>
    The blazeds builds posted below do not contain the jar:
    http://opensource.adobe.com/wiki/dis...+blazeds+trunk

    Where can I get it?

    Thank you

    Jacques
    Last edited by couzteau; Feb 18th, 2010, 07:56 PM.

    Leave a comment:


  • jeremyg484
    replied
    Updated the top post with potentially simpler way to grab the nightly snapshots with Maven.

    Leave a comment:

Working...
X