1 Reply Latest reply on Jul 14, 2010 12:36 PM by David Lloyd

    Using Git submodules for the AS7 build

    Thomas Diesler Master

      The build was broken due to local builds of dependent SNAPSHOTS. The project currently uses these SNAPSHOTS

               <version.jboss.logging>3.0.0.Beta3-SNAPSHOT</version.jboss.logging>
               <version.jboss.modules>1.0.0.Beta1-SNAPSHOT</version.jboss.modules>
               <version.jboss.msc>1.0.0.CR1-SNAPSHOT</version.jboss.msc>
               <version.jboss.remoting>3.1.0.Beta3-SNAPSHOT</version.jboss.remoting>
               <version.jboss.staxmapper>1.0.0.Beta1-SNAPSHOT</version.jboss.staxmapper>

      In a distributed dev model (i.e. with Git) there is no notion of "latest SNAPSHOT" unless you only allow a single person to publish SNAPSHOTS (i.e. jbossas)

      Instead what you probably want to do is to use 'git submodule' to pull in specific commits of dependent projects and aggregate them into the build.

      Like this

        1049  git submodule add git://github.com/jbossas/jboss-modules.git reactor/jboss-modules
        1050  git submodule add git://github.com/jbossas/jboss-msc.git reactor/jboss-msc
        1052  git submodule add git://github.com/jbossas/staxmapper.git reactor/staxmapper

      In the reactor you build these submodules.

      In that way the AS7 build is always self contained and sub-project updates are explicit and associated with a particular commit.
      The resulting build would look like this:

      [INFO] Reactor Build Order:
      [INFO]
      [INFO] JBoss Application Server: Parent
      [INFO] StAX Mapper
      [INFO] JBoss Modules
      [INFO] JBoss Modular Service Container
      [INFO] JBoss Application Server: Reactor
      [INFO] JBoss Application Server: Domain Core
      [INFO] JBoss Application Server: Server Manager
      [INFO] JBoss Application Server: Server
      [INFO] JBoss Application Server: Domain Controller
      [INFO] JBoss Application Server: Process Manager
      [INFO] JBoss Application Server: Remoting
      [INFO] JBoss Application Server: Build
      [INFO] JBoss Application Server: Aggregator

      To build do the following:

      > git pull origin master
      > git submodule init (only once or when the number of submodules changes)
      > git submodule update (whenever ther is a submodule update)
      > mvn clean install


      cheers
      -thomas