Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Using Spring BlazeDS Integration nightly builds with Maven

  1. #1
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default 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 at 11:32 AM. Reason: Updated to reflect changes for 1.5.0 snapshots.
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  2. #2

    Default

    I am trying to build testdrive with Maven. At first I thought this applied to testdrive but now I think it applies to the lib.

    That said, I am getting an error when I try to build testdrive from the nightly build with maven. After I run mvn install I get the following error in the cmd window.



    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Failed to resolve artifact.

    Missing:
    ----------
    1) org.springframework.flex:spring-flex:jar:1.0.1.BUILD-SNAPSHOT

    Try downloading the file manually from the project website.

    Then, install it using the command:
    mvn install:install-file -DgroupId=org.springframework.flex -DartifactId=s
    pring-flex -Dversion=1.0.1.BUILD-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

    Alternatively, if you host your own repository you can deploy the file there:

    mvn deploy:deploy-file -DgroupId=org.springframework.flex -DartifactId=spr
    ing-flex -Dversion=1.0.1.BUILD-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Du
    rl=[url] -DrepositoryId=[id]

    Path to dependency:
    1) org.springframework.flex.samples:testdrive:war:1.0 .1.BUILD-SNAPSHOT
    2) org.springframework.flex:spring-flex:jar:1.0.1.BUILD-SNAPSHOT

    ----------
    1 required artifact is missing.

    for artifact:
    org.springframework.flex.samples:testdrive:war:1.0 .1.BUILD-SNAPSHOT

    from the specified remote repositories:
    ObjectWEB (http://maven.ow2.org/maven2/),
    central (http://repo1.maven.org/maven2),
    flex-mojos-repository (http://repository.sonatype.org/content/groups/public)


    Any help would be great. Thanks.

  3. #3

    Default

    I tried to follow your instructions for building the sbi lib with Maven and I get the following error. Any ideas?



    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'install'.
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Spring BlazeDS Integration
    [INFO] task-segment: [install:install-file] (aggregator-style)
    [INFO] ------------------------------------------------------------------------
    [INFO] [install:install-file]
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Missing group, artifact, version, or packaging information
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: < 1 second
    [INFO] Finished at: Wed Sep 16 09:05:02 EDT 2009
    [INFO] Final Memory: 3M/254M
    [INFO] ------------------------------------------------------------------------

  4. #4

    Default

    OK, so I figured out what I did wrong. My apologies as I am new to both Spring and Maven.

    In order to build the SBI jar I had to be in the folder that had "dist" in it. For my example that was "spring-flex-1.0.1.CI-283-with-dependencies\spring-flex-1.0.1.CI-283". Then I was able to run #2 above with version changes.

    To build the Testdrive projects, I added the dependency listed above to the testdrive pom.xml and then I went to "projects\spring-flex-samples\spring-flex-testdrive" and it built too.

    Thanks for your work on this guys.
    Joshua

  5. #5
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    Updated the top post with potentially simpler way to grab the nightly snapshots with Maven.
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  6. #6

    Default

    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 at 06:56 PM.

  7. #7

    Default

    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.

  8. #8

    Default

    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.

  9. #9

    Default

    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>

  10. #10

    Default

    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •