Uploaded image for project: 'Grails'
  1. Grails
  2. GRAILS-6768

WAR command does not insert plugin jars into war on first run

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.3.3, 1.3.4
    • Fix Version/s: 1.3.5
    • Component/s: None
    • Labels:
      None
    • Environment:
      tested on windows xp

      Description

      WAR command does not insert core security plugin dependent jars into war on first execution - subsequent execution inserts the 2 jars. ON the first execution the jars are inserted into IVY cache. Once in the cache they are inserted into the war's lib dir.

        Activity

        Hide
        Peter Ledbrook added a comment -

        I updated the subject line because this is not specific to the Spring Security plugin. In fact, it doesn't seem to have much to do with the Ivy cache either. You can reproduce easily enough by taking a fresh project, adding "plugins.spring-security-core=1.0.1" to application.properties, and then running grails war. The Spring Security JARs aren't included in the WAR this first time, but they are all subsequent times - until you delete the plugin's directory, at which point the JARs go missing again.

        Show
        Peter Ledbrook added a comment - I updated the subject line because this is not specific to the Spring Security plugin. In fact, it doesn't seem to have much to do with the Ivy cache either. You can reproduce easily enough by taking a fresh project, adding "plugins.spring-security-core=1.0.1" to application.properties, and then running grails war . The Spring Security JARs aren't included in the WAR this first time, but they are all subsequent times - until you delete the plugin's directory, at which point the JARs go missing again.
        Hide
        Graeme Rocher added a comment -

        Duplicates GRAILS-6708

        Show
        Graeme Rocher added a comment - Duplicates GRAILS-6708
        Hide
        eranlo added a comment -

        Is there a workaround I can use in 1.3.4 to avoid this problem by configuring the BuildConfig ? Let's say my plugin has a jar called myjar.jar in the plugin's lib directory. Is there any way I can set the configuration to force it to include the jar on the first build?

        Show
        eranlo added a comment - Is there a workaround I can use in 1.3.4 to avoid this problem by configuring the BuildConfig ? Let's say my plugin has a jar called myjar.jar in the plugin's lib directory. Is there any way I can set the configuration to force it to include the jar on the first build?
        Hide
        Davide Cavestro added a comment -

        We are working on automated builds for our grails 1.3.7 projects, and discovered that the produced war is incomplete.
        Doing some tests from command line, using a new user (hence with no ivy nor grails cached jars) we noticed that effectively the first execution of grails war produces a broken artifact (its 53MB and misses some libraries). The second execution produces a complete artifact (its 58MB and works fine).

        This bug seems to depict a compatible scenario. Could it be reopened?
        I am going to attach the console output of my trials.

        Show
        Davide Cavestro added a comment - We are working on automated builds for our grails 1.3.7 projects, and discovered that the produced war is incomplete. Doing some tests from command line, using a new user (hence with no ivy nor grails cached jars) we noticed that effectively the first execution of grails war produces a broken artifact (its 53MB and misses some libraries). The second execution produces a complete artifact (its 58MB and works fine). This bug seems to depict a compatible scenario. Could it be reopened? I am going to attach the console output of my trials.
        Hide
        Davide Cavestro added a comment -

        I finally cloned this bug to GRAILS-7608. Sorry for having posted into two places.

        Cheers
        Davide

        Show
        Davide Cavestro added a comment - I finally cloned this bug to GRAILS-7608 . Sorry for having posted into two places. Cheers Davide

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Claude Daoust
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: