Announcement Announcement Module
Collapse
No announcement yet.
Grails scm builds Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grails scm builds

    Hello,

    I am trying to integrate the build process of my grails app with ant. I was reading http://grails.org/doc/latest/guide/commandLine.html where it mentions I can use the "grails integrate-with --ant" switch that creates a build.xml and some ivy files automatically. It created the files, however when I launch "ant war" it fails complaining about dependencies for ivy. Currently, only one dependency is failing org.springframework.uaa.client:1.0.2.RELEASE.jar. The console output shoes that it tried at the 4 default mirrors mentioned in the ivy files, but none of them have it. That baffles me.

    Is anyone else running into this issue ? Any suggestions ? Anyone have a fix ?

    Thanks

  • #2
    This problem can be solved by throwing out the grails "integrate-with" method and using the ant macrodef found here:

    http://stackoverflow.com/questions/3...nt-envrionment

    I use a macrodef for this:

    <property environment='env'/>

    <property name='grails.home' value='${env.GRAILS_HOME}' />

    <condition property='grails' value='grails.bat'>
    <os family='windows'/>
    </condition>
    <property name='grails' value='grails' />

    <macrodef name='grails'>
    <attribute name='action' />
    <attribute name='environment' default='dev' />
    <element name='preargs' optional='true' />
    <element name='args' optional='true' />
    <sequential>
    <exec executable='${grails}' failonerror='true'>
    <preargs />
    <arg value='@{environment}'/>
    <arg value='@{action}'/>
    <args />
    </exec>
    </sequential>
    </macrodef>

    You can execute simple commands:

    <grails action='clean' />

    or more complex ones like your war task:

    <grails action='war' environment='${env}'>
    <args>
    <arg value="${war.filename}" />
    </args>
    </grails>

    Comment

    Working...
    X