Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0 final
    • Fix Version/s: 2.3-RC1
    • Component/s: Build System
    • Labels:
      None

      Description

      The scripts generated by "grails integrate-with --ant" are out of date and no longer work. To fix them requires:

      1) Updating the Ivy version in build.xml

      2) Updating ivysettings.xml to pull from the grails-core repository.

      Reference this discussion thread: http://grails.1312388.n4.nabble.com/dependency-problems-with-build-xml-from-quot-integrate-with-ant-quot-on-2-0-0-M2-td3890621.html

      Thanks!

      1. ant-run.log
        14 kB
        Oliver Burkhalter

        Activity

        Hide
        Andrew Todd added a comment -

        I've encountered some issues on certain systems involving native2ascii, which is packaged (for the Sun JDK) in tools.jar. Adding this line to the grails.classpath configuration in build.xml seems to have solved the problem:

        <filelist dir="$

        {java.home}

        /../lib/" files="tools.jar" />

        so it may be appropriate to include in the generate script.

        Reference http://grails.1312388.n4.nabble.com/STS-Run-app-giving-native2ascii-error-after-installing-plugin-td3945765.html

        Show
        Andrew Todd added a comment - I've encountered some issues on certain systems involving native2ascii, which is packaged (for the Sun JDK) in tools.jar. Adding this line to the grails.classpath configuration in build.xml seems to have solved the problem: <filelist dir="$ {java.home} /../lib/" files="tools.jar" /> so it may be appropriate to include in the generate script. Reference http://grails.1312388.n4.nabble.com/STS-Run-app-giving-native2ascii-error-after-installing-plugin-td3945765.html
        Hide
        Oliver Burkhalter added a comment - - edited

        If I try to run ant run I receive following error:

        Error Server failed to start: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]]
        

        See also attached ant-run.log file.

        Tested with:
        Win7, Grails 2.0.1, Ivy 2.2.0 + updated ivysettings.xml, Ant 1.8.2

        Show
        Oliver Burkhalter added a comment - - edited If I try to run ant run I receive following error: Error Server failed to start: org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]] See also attached ant-run.log file. Tested with: Win7, Grails 2.0.1, Ivy 2.2.0 + updated ivysettings.xml, Ant 1.8.2
        Hide
        Andrew Todd added a comment -

        To build with Grails 2.0.3, I found that I also needed to add

        <dependency org="org.codehaus.groovy" name="groovy-all" rev="1.8.6" conf="build" />

        to ivy.xml.

        Show
        Andrew Todd added a comment - To build with Grails 2.0.3, I found that I also needed to add <dependency org="org.codehaus.groovy" name="groovy-all" rev="1.8.6" conf="build" /> to ivy.xml.
        Hide
        Yves Zoundi added a comment -

        With Grails 2.2.0 and above the error message below is displayed after an InvocationTargetException is thrown (Run any available ant goal).

        BUILD FAILED
        /Users/yves/ant-fail/build.xml:92: The following error occurred while executing this line:
        /Users/yves/ant-fail/build.xml:97: The following error occurred while executing this line:
        /Users/yves/ant-fail/build.xml:48: Unable to start Grails: java.lang.reflect.InvocationTargetException

        This happens with Ant 1.8.2 which may be unsupported. If I recall correctly, the Ant integration is supposed to work with Ant 1.7.x only.

        After running ant in verbose mode, I can see that it's complaining about a missing ivy report related class, but it doesn't end there.
        Again the problems may not be exactly the same accordingly to the Apache Ant version used.

        However, I believe that the issue can be solved for all modern Ant versions (1.7.+), by adding the following to ivy.xml:

        <dependency org="org.apache.ivy" name="ivy" rev="2.3.0"/>
        <dependency org="org.codehaus.gant" name="gant_groovy1.8" rev="1.9.9" conf="build"/>
        <dependency org="jline" name="jline" rev="1.0" conf="build"/>
        <dependency org="org.fusesource.jansi" name="jansi" rev="1.10" conf="build"/>

        Show
        Yves Zoundi added a comment - With Grails 2.2.0 and above the error message below is displayed after an InvocationTargetException is thrown (Run any available ant goal). BUILD FAILED /Users/yves/ant-fail/build.xml:92: The following error occurred while executing this line: /Users/yves/ant-fail/build.xml:97: The following error occurred while executing this line: /Users/yves/ant-fail/build.xml:48: Unable to start Grails: java.lang.reflect.InvocationTargetException This happens with Ant 1.8.2 which may be unsupported. If I recall correctly, the Ant integration is supposed to work with Ant 1.7.x only. After running ant in verbose mode, I can see that it's complaining about a missing ivy report related class, but it doesn't end there. Again the problems may not be exactly the same accordingly to the Apache Ant version used. However, I believe that the issue can be solved for all modern Ant versions (1.7.+), by adding the following to ivy.xml: <dependency org="org.apache.ivy" name="ivy" rev="2.3.0"/> <dependency org="org.codehaus.gant" name="gant_groovy1.8" rev="1.9.9" conf="build"/> <dependency org="jline" name="jline" rev="1.0" conf="build"/> <dependency org="org.fusesource.jansi" name="jansi" rev="1.10" conf="build"/>

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Andrew Todd
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Last Reviewed:

              Development