|
On Grails 1.3.7 we build an application using several application specific plugins.
We are facing the following problem using the Maven-Publisher-Plugin. The *GrailsPlugin.groovy descriptor defines a dependsOn to another Plugin using a non standard groupId:
class CmsGrailsPlugin { def version = "0.9.2"
def groupId = "com.myGroup" // the other plugins this plugin depends on
def dependsOn = ['com.myGroup:myOtherPlugin':'0.9.5'] ...
} This seems to be required by the maven-Publisher-Plugin to generate a valid POM like:
.... <dependency> <groupId>com.myGroup</groupId>
<artifactId>my-other-plugin</artifactId> <version>0.9.5</version>
<type>zip</type> </dependency>
.... But when running Grails maven-install (or any other Grails command) it failed with: Environment set to production Error: The following plugins failed to load due to missing dependencies: [geniosCms]
- Plugin: cms - Dependencies: ! com.myGroup:myOtherPlugin (Required: 0.9.5, Found: Not Installed) [INVALID]
Anyone using custom groupIds in Plugins that depends on other Plugins successfully ?
|
|
> The 'com.myGroup:' specifies the groupId of the related plugin.
> This seems to be required by the maven-Publisher-Plugin to generate a valid > POM like: > .... > <dependency> > <groupId>com.myGroup</groupId> > <artifactId>my-other-plugin</artifactId> > <version>0.9.5</version> > <type>zip</type> > </dependency> > .... > > But when running Grails maven-install (or any other Grails command) it > failed with: > Environment set to production > Error: The following plugins failed to load due to missing dependencies: > [geniosCms] > - Plugin: cms > - Dependencies: > ! com.myGroup:myOtherPlugin (Required: 0.9.5, Found: Not Installed) > [INVALID] I recommend replacing 'dependsOn' with a dependency declared in BuildConfig.groovy and published with the Release plugin (which is the new name for Maven Publisher). You might also be interested in my replies to Goran's recent emails about the Release plugin. Peter -- Peter Ledbrook Grails Advocate SpringSource - A Division of VMware --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Thanks for pointing me to the release-plugin.
It's better, but for our project we still had two issues: 1.) The POM file includes definitions from the dependsOn section (inluding invalid version specification) Solution: I patches the Plugin just reading the information from the BuildConfig and ignoring the dependsOn for the POM generation 2.) A custom groupId make the dependency resolution of Grails 1.3.7 still unstable. Solution: I gave up and work now with the standard groupId: org.grails.plugins I hope so much that with Grails 2.0 Plugin management will be much more stable and straight forward! Cheers, Mos --- http://www.mosbase.com/ On Mon, Jul 11, 2011 at 6:15 PM, Peter Ledbrook <[hidden email]> wrote:
|
|
Administrator
|
Sorry what is the problem with the information from dependsOn going in the POM?
Can you elaborate on what issue that caused? Thanks On Wed, Jul 13, 2011 at 10:43 PM, Mos <[hidden email]> wrote: > Thanks for pointing me to the release-plugin. > > It's better, but for our project we still had two issues: > > 1.) The POM file includes definitions from the dependsOn section (inluding > invalid version specification) > Solution: I patches the Plugin just reading the information from the > BuildConfig and ignoring the dependsOn for the POM generation > > 2.) A custom groupId make the dependency resolution of Grails 1.3.7 still > unstable. > Solution: I gave up and work now with the standard groupId: > org.grails.plugins > > I hope so much that with Grails 2.0 Plugin management will be much more > stable and straight forward! > > > Cheers, > Mos > --- > http://www.mosbase.com/ > > > On Mon, Jul 11, 2011 at 6:15 PM, Peter Ledbrook <[hidden email]> > wrote: >> >> > The 'com.myGroup:' specifies the groupId of the related plugin. >> > This seems to be required by the maven-Publisher-Plugin to generate a >> > valid >> > POM like: >> > .... >> > <dependency> >> > <groupId>com.myGroup</groupId> >> > <artifactId>my-other-plugin</artifactId> >> > <version>0.9.5</version> >> > <type>zip</type> >> > </dependency> >> > .... >> > >> > But when running Grails maven-install (or any other Grails command) it >> > failed with: >> > Environment set to production >> > Error: The following plugins failed to load due to missing dependencies: >> > [geniosCms] >> > - Plugin: cms >> > - Dependencies: >> > ! com.myGroup:myOtherPlugin (Required: 0.9.5, Found: Not >> > Installed) >> > [INVALID] >> >> I recommend replacing 'dependsOn' with a dependency declared in >> BuildConfig.groovy and published with the Release plugin (which is the >> new name for Maven Publisher). You might also be interested in my >> replies to Goran's recent emails about the Release plugin. >> >> Peter >> >> -- >> Peter Ledbrook >> Grails Advocate >> SpringSource - A Division of VMware >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > -- Graeme Rocher Grails Project Lead SpringSource - A Division of VMware http://www.springsource.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Graeme,
> Sorry what is the problem with the information from dependsOn going in the POM? As described in other threads and some JIRAs the version specifications like def dependsOn = ['myNewsletter':'0.1 > *'] goes straight into the POM definition (including a ] when I remember right). "0.1>*]" seems not to be valid for POMs and breaks the Grails dependency resolution. For me it works to remove the lines 276 to 307 in https://github.com/grails-plugins/grails-release/blob/master/scripts/_GrailsMaven.groovy#L276 Because the BuildConfig files are holding my dependency definitions the dependsOn section doesn't need to be parsed. Cheers, Mos --- http://www.mosbase.com/ On Wed, Jul 13, 2011 at 11:23 PM, Graeme Rocher <[hidden email]> wrote: Sorry what is the problem with the information from dependsOn going in the POM? |
|
Administrator
|
On Thu, Jul 14, 2011 at 10:04 AM, Mos <[hidden email]> wrote:
> Hi Graeme, > >> Sorry what is the problem with the information from dependsOn going in the >> POM? > > As described in other threads and some JIRAs the version specifications > like > def dependsOn = ['myNewsletter':'0.1 > *'] > goes straight into the POM definition (including a ] when I remember right). > "0.1>*]" seems not to be valid for POMs and breaks the Grails dependency > resolution. > > For me it works to remove the lines 276 to 307 in > https://github.com/grails-plugins/grails-release/blob/master/scripts/_GrailsMaven.groovy#L276 Maybe you're using an older version of the release plugin? Because the current code contains handling to transform invalid version syntax (like "0.1 > *") to valid version syntax (like "[0.1,)" Cheers > > Because the BuildConfig files are holding my dependency definitions the > dependsOn section > doesn't need to be parsed. > > Cheers, > Mos > --- > http://www.mosbase.com/ > > > On Wed, Jul 13, 2011 at 11:23 PM, Graeme Rocher <[hidden email]> wrote: >> >> Sorry what is the problem with the information from dependsOn going in the >> POM? >> >> Can you elaborate on what issue that caused? >> >> Thanks >> >> On Wed, Jul 13, 2011 at 10:43 PM, Mos <[hidden email]> wrote: >> > Thanks for pointing me to the release-plugin. >> > >> > It's better, but for our project we still had two issues: >> > >> > 1.) The POM file includes definitions from the dependsOn section >> > (inluding >> > invalid version specification) >> > Solution: I patches the Plugin just reading the information from >> > the >> > BuildConfig and ignoring the dependsOn for the POM generation >> > >> > 2.) A custom groupId make the dependency resolution of Grails 1.3.7 >> > still >> > unstable. >> > Solution: I gave up and work now with the standard groupId: >> > org.grails.plugins >> > >> > I hope so much that with Grails 2.0 Plugin management will be much more >> > stable and straight forward! >> > >> > >> > Cheers, >> > Mos >> > --- >> > http://www.mosbase.com/ >> > >> > >> > On Mon, Jul 11, 2011 at 6:15 PM, Peter Ledbrook <[hidden email]> >> > wrote: >> >> >> >> > The 'com.myGroup:' specifies the groupId of the related plugin. >> >> > This seems to be required by the maven-Publisher-Plugin to generate a >> >> > valid >> >> > POM like: >> >> > .... >> >> > <dependency> >> >> > <groupId>com.myGroup</groupId> >> >> > <artifactId>my-other-plugin</artifactId> >> >> > <version>0.9.5</version> >> >> > <type>zip</type> >> >> > </dependency> >> >> > .... >> >> > >> >> > But when running Grails maven-install (or any other Grails command) >> >> > it >> >> > failed with: >> >> > Environment set to production >> >> > Error: The following plugins failed to load due to missing >> >> > dependencies: >> >> > [geniosCms] >> >> > - Plugin: cms >> >> > - Dependencies: >> >> > ! com.myGroup:myOtherPlugin (Required: 0.9.5, Found: Not >> >> > Installed) >> >> > [INVALID] >> >> >> >> I recommend replacing 'dependsOn' with a dependency declared in >> >> BuildConfig.groovy and published with the Release plugin (which is the >> >> new name for Maven Publisher). You might also be interested in my >> >> replies to Goran's recent emails about the Release plugin. >> >> >> >> Peter >> >> >> >> -- >> >> Peter Ledbrook >> >> Grails Advocate >> >> SpringSource - A Division of VMware >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe from this list, please visit: >> >> >> >> http://xircles.codehaus.org/manage_email >> >> >> >> >> > >> > >> >> >> >> -- >> Graeme Rocher >> Grails Project Lead >> SpringSource - A Division of VMware >> http://www.springsource.com >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > -- Graeme Rocher Grails Project Lead SpringSource - A Division of VMware http://www.springsource.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Graeme is correct, version 1.0.0.M3 of the release plugin writes correct
version info in the POM. But then arise next problem, Ivy can't read version ranges, so plugin resolution fails. dependOn with fixed versions (1.2.3) works though. /Göran Graeme Rocher wrote 2011-07-14 16:27: > On Thu, Jul 14, 2011 at 10:04 AM, Mos<[hidden email]> wrote: >> Hi Graeme, >> >>> Sorry what is the problem with the information from dependsOn going in the >>> POM? >> As described in other threads and some JIRAs the version specifications >> like >> def dependsOn = ['myNewsletter':'0.1> *'] >> goes straight into the POM definition (including a ] when I remember right). >> "0.1>*]" seems not to be valid for POMs and breaks the Grails dependency >> resolution. >> >> For me it works to remove the lines 276 to 307 in >> https://github.com/grails-plugins/grails-release/blob/master/scripts/_GrailsMaven.groovy#L276 > Maybe you're using an older version of the release plugin? > > Because the current code contains handling to transform invalid > version syntax (like "0.1> *") to valid version syntax (like "[0.1,)" > > Cheers > >> Because the BuildConfig files are holding my dependency definitions the >> dependsOn section >> doesn't need to be parsed. >> >> Cheers, >> Mos >> --- >> http://www.mosbase.com/ >> >> >> On Wed, Jul 13, 2011 at 11:23 PM, Graeme Rocher<[hidden email]> wrote: >>> Sorry what is the problem with the information from dependsOn going in the >>> POM? >>> >>> Can you elaborate on what issue that caused? >>> >>> Thanks >>> >>> On Wed, Jul 13, 2011 at 10:43 PM, Mos<[hidden email]> wrote: >>>> Thanks for pointing me to the release-plugin. >>>> >>>> It's better, but for our project we still had two issues: >>>> >>>> 1.) The POM file includes definitions from the dependsOn section >>>> (inluding >>>> invalid version specification) >>>> Solution: I patches the Plugin just reading the information from >>>> the >>>> BuildConfig and ignoring the dependsOn for the POM generation >>>> >>>> 2.) A custom groupId make the dependency resolution of Grails 1.3.7 >>>> still >>>> unstable. >>>> Solution: I gave up and work now with the standard groupId: >>>> org.grails.plugins >>>> >>>> I hope so much that with Grails 2.0 Plugin management will be much more >>>> stable and straight forward! >>>> >>>> >>>> Cheers, >>>> Mos >>>> --- >>>> http://www.mosbase.com/ >>>> >>>> >>>> On Mon, Jul 11, 2011 at 6:15 PM, Peter Ledbrook<[hidden email]> >>>> wrote: >>>>>> The 'com.myGroup:' specifies the groupId of the related plugin. >>>>>> This seems to be required by the maven-Publisher-Plugin to generate a >>>>>> valid >>>>>> POM like: >>>>>> .... >>>>>> <dependency> >>>>>> <groupId>com.myGroup</groupId> >>>>>> <artifactId>my-other-plugin</artifactId> >>>>>> <version>0.9.5</version> >>>>>> <type>zip</type> >>>>>> </dependency> >>>>>> .... >>>>>> >>>>>> But when running Grails maven-install (or any other Grails command) >>>>>> it >>>>>> failed with: >>>>>> Environment set to production >>>>>> Error: The following plugins failed to load due to missing >>>>>> dependencies: >>>>>> [geniosCms] >>>>>> - Plugin: cms >>>>>> - Dependencies: >>>>>> ! com.myGroup:myOtherPlugin (Required: 0.9.5, Found: Not >>>>>> Installed) >>>>>> [INVALID] >>>>> I recommend replacing 'dependsOn' with a dependency declared in >>>>> BuildConfig.groovy and published with the Release plugin (which is the >>>>> new name for Maven Publisher). You might also be interested in my >>>>> replies to Goran's recent emails about the Release plugin. >>>>> >>>>> Peter >>>>> >>>>> -- >>>>> Peter Ledbrook >>>>> Grails Advocate >>>>> SpringSource - A Division of VMware >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>> >>> >>> >>> -- >>> Graeme Rocher >>> Grails Project Lead >>> SpringSource - A Division of VMware >>> http://www.springsource.com >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >> > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Right, POM seems ok, but the Grails dependency resolution can't resolve the version syntax like "[0.1,"
So for me it works to ignore this one (--> dependOn definition) and let the release-plugin generate versions like "latest.release" (--> from the BuildConfig) I hope in Grails 2.0 the "dependsOn" definition is deprecated and dependency-resolution just uses the definitions in BuildConfig.groovy Cheers, Mos --- http://www.mosbase.com/ On Thu, Jul 14, 2011 at 4:43 PM, Goran Ehrsson <[hidden email]> wrote: Graeme is correct, version 1.0.0.M3 of the release plugin writes correct version info in the POM. But then arise next problem, Ivy can't read version ranges, so plugin resolution fails. dependOn with fixed versions (1.2.3) works though. |
|
> I hope in Grails 2.0 the "dependsOn" definition is deprecated and
> dependency-resolution just uses the definitions in BuildConfig.groovy This is the intention, yes. Peter -- Peter Ledbrook Grails Advocate SpringSource - A Division of VMware --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
In reply to this post by mos-7
On 15/07/2011 12:03, Mos wrote:
> I hope in Grails 2.0 the "dependsOn" definition is deprecated and > dependency-resolution just uses the definitions in BuildConfig.groovy Presumably loadAfter will remain (which is the secondary purpose of dependsOn, controlling the load order of interdependent plugins)? Ian -- Ian Roberts | Department of Computer Science [hidden email] | University of Sheffield, UK --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
>> I hope in Grails 2.0 the "dependsOn" definition is deprecated and
>> dependency-resolution just uses the definitions in BuildConfig.groovy > > Presumably loadAfter will remain (which is the secondary purpose of > dependsOn, controlling the load order of interdependent plugins)? As far as I'm aware, yes, loadAfter will continue to be supported since that information can't be specified in the dependency DSL. Peter -- Peter Ledbrook Grails Advocate SpringSource - A Division of VMware --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
