Grails

ReleasePlugin.groovy error when publishing plugin in local repository

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.2 final
  • Fix Version/s: 1.2.1
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP, Grails 1.2-final, SVN 1.4.6-1.6, protocol: all
  • Patch Submitted:
    Yes

Description

When local repository on SVN is created for grails plugins then during first release of plugin ERROR is generated (plugins repository is not initiated yet - metadata is not created):

There are two issues:
1. test/test folder is required (line 424)
2. Creating first release of plugin grails release-plugin "-repository=someRepository" then Exception is thrown. It happens when we create new repository and .plugin-metadata/pligin-list.xml does not exists.
Same happens when ~/.grails/1.2/plugin-list-[repositoryName].xml does not exists.

Solutions:
1. line 424
is:
fileset(dir:"${grailsSettings.testSourceDir}/test")
should be :
fileset(dir:"${grailsSettings.testSourceDir}")

2. line 235 - is:

fetchRemoteFile("${pluginSVN}/.plugin-meta/plugins-list.xml", pluginsListFile)

should be:

try{
fetchRemoteFile("${pluginSVN}/.plugin-meta/plugins-list.xml", pluginsListFile)
}(Exception e){
    println "Error reading remote plugin list [${e.message}], building locally..."
    updatePluginsListManually()
}

BTW, I believe that _PluginDependencies and (especially) ReleasePlugin scripts should be reviewed and refactored.

Issue Links

Activity

Hide
Yuji Yamano added a comment - - edited

To make error messages more friendly, could apply the attached patch too?

Inline patch doesn't seem to work, so I removed it.
See _PluginDependencies.groovy.patch.

Show
Yuji Yamano added a comment - - edited To make error messages more friendly, could apply the attached patch too? Inline patch doesn't seem to work, so I removed it. See _PluginDependencies.groovy.patch.
Hide
Yuji Yamano added a comment -

This is the patch to make error messages more friendly.

Show
Yuji Yamano added a comment - This is the patch to make error messages more friendly.
Hide
Jeff Brown added a comment -

The part of this issue that relates to the test directory problem has already been fixed with GRAILS-5614.

Show
Jeff Brown added a comment - The part of this issue that relates to the test directory problem has already been fixed with GRAILS-5614.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: