BuildConfig Dependencies vs Plugins

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

BuildConfig Dependencies vs Plugins

Dencel
Hello,
I am new to groovy/grails (I am a Java programmer) and it's absolutely amazing. After reading the docs I can't get my head around the distinction between dependencies and plugins in BuildConfig.groovy. When do I need to add a declaration in both sections, when in plugins and when in dependencies?

Another question in this category: I've created a plugin which dependsOn plugin-config. The plugin just works fine, but when I install it in another project, grails complaints about the missing dependsOn which is declared in the MyPlugin.groovy. This is not inherited? Do I have to declare the same plugins in the main project as in the plugin project?

MyGrailsPlugin.groovy:
def dependsOn = [pluginConfig:'0.1.5 > *']
BuildConfig.groovy:
    plugins {
                compile ':plugin-config:[0.1.5,)'
               
        build(":tomcat:$grailsVersion",
              ":release:1.0.0") {
            export = false
        }
    }

PluginConsumerProject:
BuildConfig.groovy:
    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.7.1"
        runtime ":resources:1.1.6"

        build ":tomcat:$grailsVersion"
    }
    dependencies {
    }
grails.plugin.location.my = "../my"

Running PluginConsumerProject grails exists with this error:
| Error Error: The following plugins failed to load due to missing dependencies: [my]
- Plugin: my
   - Dependencies:
       ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]

I am using STS 2.9.2
Reply | Threaded
Open this post in threaded view
|

Re: BuildConfig Dependencies vs Plugins

Graeme Rocher
Administrator
On Thu, Jul 19, 2012 at 11:05 AM, Dencel <[hidden email]> wrote:
> Hello,
> I am new to groovy/grails (I am a Java programmer) and it's absolutely
> amazing. After reading the docs I can't get my head around the distinction
> between dependencies and plugins in BuildConfig.groovy. When do I need to
> add a declaration in both sections, when in plugins and when in
> dependencies?

plugins { } block is used declare dependencies on grails plugins found
in the portal (http://grails.org/plugins/) and built locally.

dependencies { } block is used to declare dependencies on JAR files
and third party java libraries typically found in Maven central (see
http://search.maven.org/#browse)


>
> Another question in this category: I've created a plugin which dependsOn
> plugin-config. The plugin just works fine, but when I install it in another
> project, grails complaints about the missing dependsOn which is declared in
> the MyPlugin.groovy. This is not inherited? Do I have to declare the same
> plugins in the main project as in the plugin project?


Declare plugin-config in the plugins { } block of BuildConfig.groovy
inside your plugin project

Cheers

>
> MyGrailsPlugin.groovy:
> def dependsOn = [pluginConfig:'0.1.5 > *']
> BuildConfig.groovy:
>     plugins {
>                 compile ':plugin-config:[0.1.5,)'
>
>         build(":tomcat:$grailsVersion",
>               ":release:1.0.0") {
>             export = false
>         }
>     }
>
> PluginConsumerProject:
> BuildConfig.groovy:
>     plugins {
>         runtime ":hibernate:$grailsVersion"
>         runtime ":jquery:1.7.1"
>         runtime ":resources:1.1.6"
>
>         build ":tomcat:$grailsVersion"
>     }
>     dependencies {
>     }
> grails.plugin.location.my = "../my"
>
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]
>
> I am using STS 2.9.2
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851.html
> Sent from the Grails - user mailing list archive at Nabble.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


Reply | Threaded
Open this post in threaded view
|

Re: BuildConfig Dependencies vs Plugins

Dencel
Just to be clear: so the distinction is in the way grails handle plugins (through grails.org/plugins)  vs the way Java frameworks handle dependencies (like maven)?
Thus, plugins{} -> Grails plugins, dependencies{} -> java plugins; I guess that makes sense.

I have the plugin-config declaration in the plugin BuildConfig,
plugins {
                 compile ':plugin-config:[0.1.5,)'
 
        build(":tomcat:$grailsVersion",
               ":release:1.0.0") {
             export = false
         }
     }

but when starting the project (the plugin consumer), grails complaints it's missing the dependency:
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]

2012/7/19 Graeme Rocher-4 [via Grails] <[hidden email]>
On Thu, Jul 19, 2012 at 11:05 AM, Dencel <[hidden email]> wrote:
> Hello,
> I am new to groovy/grails (I am a Java programmer) and it's absolutely
> amazing. After reading the docs I can't get my head around the distinction
> between dependencies and plugins in BuildConfig.groovy. When do I need to
> add a declaration in both sections, when in plugins and when in
> dependencies?

plugins { } block is used declare dependencies on grails plugins found
in the portal (http://grails.org/plugins/) and built locally.

dependencies { } block is used to declare dependencies on JAR files
and third party java libraries typically found in Maven central (see
http://search.maven.org/#browse)


>
> Another question in this category: I've created a plugin which dependsOn
> plugin-config. The plugin just works fine, but when I install it in another
> project, grails complaints about the missing dependsOn which is declared in
> the MyPlugin.groovy. This is not inherited? Do I have to declare the same
> plugins in the main project as in the plugin project?


Declare plugin-config in the plugins { } block of BuildConfig.groovy
inside your plugin project

Cheers

>
> MyGrailsPlugin.groovy:
> def dependsOn = [pluginConfig:'0.1.5 > *']
> BuildConfig.groovy:
>     plugins {
>                 compile ':plugin-config:[0.1.5,)'
>
>         build(":tomcat:$grailsVersion",
>               ":release:1.0.0") {
>             export = false
>         }
>     }
>
> PluginConsumerProject:
> BuildConfig.groovy:
>     plugins {
>         runtime ":hibernate:$grailsVersion"
>         runtime ":jquery:1.7.1"
>         runtime ":resources:1.1.6"
>
>         build ":tomcat:$grailsVersion"
>     }
>     dependencies {
>     }
> grails.plugin.location.my = "../my"
>
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]
>
> I am using STS 2.9.2
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851.html
> Sent from the Grails - user mailing list archive at Nabble.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





If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851p4631857.html
To unsubscribe from BuildConfig Dependencies vs Plugins, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: BuildConfig Dependencies vs Plugins

Roberto Guerra
Is that plugin a grails plugin? Or is it your own custom plugin? I am suspecting the latter.

You can have inline plugins that reside in your own system, but you configure them differently. For example, if your plugin is in /usr/local/grails/plugins/fancy-plugin
then to use it in you project, you would do this at the end of your BuildConfig.groovy file :

grails.plugin.location.'fancy-plugin' = "/usr/local/grails/plugins/fancy-plugin"

If your plugin is an official grails plugin, then it would help if you pasted your BuildConfig.groovy file. 

On Thu, Jul 19, 2012 at 5:22 AM, Dencel <[hidden email]> wrote:
Just to be clear: so the distinction is in the way grails handle plugins (through grails.org/plugins)  vs the way Java frameworks handle dependencies (like maven)?
Thus, plugins{} -> Grails plugins, dependencies{} -> java plugins; I guess that makes sense.

I have the plugin-config declaration in the plugin BuildConfig,
plugins {
                 compile ':plugin-config:[0.1.5,)'
 
        build(":tomcat:$grailsVersion",
               ":release:1.0.0") {
             export = false
         }
     }

but when starting the project (the plugin consumer), grails complaints it's missing the dependency:
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]

2012/7/19 Graeme Rocher-4 [via Grails] <[hidden email]>
On Thu, Jul 19, 2012 at 11:05 AM, Dencel <[hidden email]> wrote:
> Hello,
> I am new to groovy/grails (I am a Java programmer) and it's absolutely
> amazing. After reading the docs I can't get my head around the distinction
> between dependencies and plugins in BuildConfig.groovy. When do I need to
> add a declaration in both sections, when in plugins and when in
> dependencies?

plugins { } block is used declare dependencies on grails plugins found
in the portal (http://grails.org/plugins/) and built locally.

dependencies { } block is used to declare dependencies on JAR files
and third party java libraries typically found in Maven central (see
http://search.maven.org/#browse)


>
> Another question in this category: I've created a plugin which dependsOn
> plugin-config. The plugin just works fine, but when I install it in another
> project, grails complaints about the missing dependsOn which is declared in
> the MyPlugin.groovy. This is not inherited? Do I have to declare the same
> plugins in the main project as in the plugin project?


Declare plugin-config in the plugins { } block of BuildConfig.groovy
inside your plugin project

Cheers

>
> MyGrailsPlugin.groovy:
> def dependsOn = [pluginConfig:'0.1.5 > *']
> BuildConfig.groovy:
>     plugins {
>                 compile ':plugin-config:[0.1.5,)'
>
>         build(":tomcat:$grailsVersion",
>               ":release:1.0.0") {
>             export = false
>         }
>     }
>
> PluginConsumerProject:
> BuildConfig.groovy:
>     plugins {
>         runtime ":hibernate:$grailsVersion"
>         runtime ":jquery:1.7.1"
>         runtime ":resources:1.1.6"
>
>         build ":tomcat:$grailsVersion"
>     }
>     dependencies {
>     }
> grails.plugin.location.my = "../my"
>
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]
>
> I am using STS 2.9.2
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851.html
> Sent from the Grails - user mailing list archive at Nabble.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





If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851p4631857.html
To unsubscribe from BuildConfig Dependencies vs Plugins, click here.
NAML



View this message in context: Re: BuildConfig Dependencies vs Plugins
Sent from the Grails - user mailing list archive at Nabble.com.



--
The Journey Is The Reward.
Reply | Threaded
Open this post in threaded view
|

Re: BuildConfig Dependencies vs Plugins

Dencel
It is an inline plugin and I am using STS 2.9.2.
The BuildConfig of my (inline) plugin is:
plugins{
     compile ':plugin-config:[0.1.5,)'
}
MyInlineGrailsPlugin:
def dependsOn = [pluginConfig:'0.1.5 > *']
  

The BuildConfig of my project is:
{..
dependencies{}
    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.7.1"
        runtime ":resources:1.1.6"

        build ":tomcat:$grailsVersion"
    }
}
grails.plugin.location.smartserver = "../myinline"


2012/7/19 Roberto Guerra [via Grails] <[hidden email]>
Is that plugin a grails plugin? Or is it your own custom plugin? I am suspecting the latter.

You can have inline plugins that reside in your own system, but you configure them differently. For example, if your plugin is in /usr/local/grails/plugins/fancy-plugin
then to use it in you project, you would do this at the end of your BuildConfig.groovy file :

grails.plugin.location.'fancy-plugin' = "/usr/local/grails/plugins/fancy-plugin"

If your plugin is an official grails plugin, then it would help if you pasted your BuildConfig.groovy file. 

On Thu, Jul 19, 2012 at 5:22 AM, Dencel <[hidden email]> wrote:
Just to be clear: so the distinction is in the way grails handle plugins (through grails.org/plugins)  vs the way Java frameworks handle dependencies (like maven)?
Thus, plugins{} -> Grails plugins, dependencies{} -> java plugins; I guess that makes sense.

I have the plugin-config declaration in the plugin BuildConfig,
plugins {
                 compile ':plugin-config:[0.1.5,)'
 
        build(":tomcat:$grailsVersion",
               ":release:1.0.0") {
             export = false
         }
     }

but when starting the project (the plugin consumer), grails complaints it's missing the dependency:
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]

2012/7/19 Graeme Rocher-4 [via Grails] <[hidden email]>
On Thu, Jul 19, 2012 at 11:05 AM, Dencel <[hidden email]> wrote:
> Hello,
> I am new to groovy/grails (I am a Java programmer) and it's absolutely
> amazing. After reading the docs I can't get my head around the distinction
> between dependencies and plugins in BuildConfig.groovy. When do I need to
> add a declaration in both sections, when in plugins and when in
> dependencies?

plugins { } block is used declare dependencies on grails plugins found
in the portal (http://grails.org/plugins/) and built locally.

dependencies { } block is used to declare dependencies on JAR files
and third party java libraries typically found in Maven central (see
http://search.maven.org/#browse)


>
> Another question in this category: I've created a plugin which dependsOn
> plugin-config. The plugin just works fine, but when I install it in another
> project, grails complaints about the missing dependsOn which is declared in
> the MyPlugin.groovy. This is not inherited? Do I have to declare the same
> plugins in the main project as in the plugin project?


Declare plugin-config in the plugins { } block of BuildConfig.groovy
inside your plugin project

Cheers

>
> MyGrailsPlugin.groovy:
> def dependsOn = [pluginConfig:'0.1.5 > *']
> BuildConfig.groovy:
>     plugins {
>                 compile ':plugin-config:[0.1.5,)'
>
>         build(":tomcat:$grailsVersion",
>               ":release:1.0.0") {
>             export = false
>         }
>     }
>
> PluginConsumerProject:
> BuildConfig.groovy:
>     plugins {
>         runtime ":hibernate:$grailsVersion"
>         runtime ":jquery:1.7.1"
>         runtime ":resources:1.1.6"
>
>         build ":tomcat:$grailsVersion"
>     }
>     dependencies {
>     }
> grails.plugin.location.my = "../my"
>
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]
>
> I am using STS 2.9.2
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851.html
> Sent from the Grails - user mailing list archive at Nabble.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





If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851p4631857.html
To unsubscribe from BuildConfig Dependencies vs Plugins, click here.
NAML



View this message in context: Re: BuildConfig Dependencies vs Plugins
Sent from the Grails - user mailing list archive at Nabble.com.



--
The Journey Is The Reward.



If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851p4631867.html
To unsubscribe from BuildConfig Dependencies vs Plugins, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: BuildConfig Dependencies vs Plugins

Roberto Guerra
I believe this

grails.plugin.location.smartserver = "../myinline"

should be this

grails.plugin.location.'smartserver' = "../myinline"

And I would use absolute path instead of relative path also. That is what I normally do. I've never tried it the way you've pasted it.

On Thu, Jul 19, 2012 at 5:54 AM, Dencel <[hidden email]> wrote:
It is an inline plugin and I am using STS 2.9.2.
The BuildConfig of my (inline) plugin is:
plugins{
     compile ':plugin-config:[0.1.5,)'
}
MyInlineGrailsPlugin:
def dependsOn = [pluginConfig:'0.1.5 > *']
  

The BuildConfig of my project is:
{..
dependencies{}

    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.7.1"
        runtime ":resources:1.1.6"

        build ":tomcat:$grailsVersion"
    }
}
grails.plugin.location.smartserver = "../myinline"


2012/7/19 Roberto Guerra [via Grails] <[hidden email]>
Is that plugin a grails plugin? Or is it your own custom plugin? I am suspecting the latter.

You can have inline plugins that reside in your own system, but you configure them differently. For example, if your plugin is in /usr/local/grails/plugins/fancy-plugin
then to use it in you project, you would do this at the end of your BuildConfig.groovy file :

grails.plugin.location.'fancy-plugin' = "/usr/local/grails/plugins/fancy-plugin"

If your plugin is an official grails plugin, then it would help if you pasted your BuildConfig.groovy file. 

On Thu, Jul 19, 2012 at 5:22 AM, Dencel <[hidden email]> wrote:
Just to be clear: so the distinction is in the way grails handle plugins (through grails.org/plugins)  vs the way Java frameworks handle dependencies (like maven)?
Thus, plugins{} -> Grails plugins, dependencies{} -> java plugins; I guess that makes sense.

I have the plugin-config declaration in the plugin BuildConfig,
plugins {
                 compile ':plugin-config:[0.1.5,)'
 
        build(":tomcat:$grailsVersion",
               ":release:1.0.0") {
             export = false
         }
     }

but when starting the project (the plugin consumer), grails complaints it's missing the dependency:
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]

2012/7/19 Graeme Rocher-4 [via Grails] <[hidden email]>
On Thu, Jul 19, 2012 at 11:05 AM, Dencel <[hidden email]> wrote:
> Hello,
> I am new to groovy/grails (I am a Java programmer) and it's absolutely
> amazing. After reading the docs I can't get my head around the distinction
> between dependencies and plugins in BuildConfig.groovy. When do I need to
> add a declaration in both sections, when in plugins and when in
> dependencies?

plugins { } block is used declare dependencies on grails plugins found
in the portal (http://grails.org/plugins/) and built locally.

dependencies { } block is used to declare dependencies on JAR files
and third party java libraries typically found in Maven central (see
http://search.maven.org/#browse)


>
> Another question in this category: I've created a plugin which dependsOn
> plugin-config. The plugin just works fine, but when I install it in another
> project, grails complaints about the missing dependsOn which is declared in
> the MyPlugin.groovy. This is not inherited? Do I have to declare the same
> plugins in the main project as in the plugin project?


Declare plugin-config in the plugins { } block of BuildConfig.groovy
inside your plugin project

Cheers

>
> MyGrailsPlugin.groovy:
> def dependsOn = [pluginConfig:'0.1.5 > *']
> BuildConfig.groovy:
>     plugins {
>                 compile ':plugin-config:[0.1.5,)'
>
>         build(":tomcat:$grailsVersion",
>               ":release:1.0.0") {
>             export = false
>         }
>     }
>
> PluginConsumerProject:
> BuildConfig.groovy:
>     plugins {
>         runtime ":hibernate:$grailsVersion"
>         runtime ":jquery:1.7.1"
>         runtime ":resources:1.1.6"
>
>         build ":tomcat:$grailsVersion"
>     }
>     dependencies {
>     }
> grails.plugin.location.my = "../my"
>
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]
>
> I am using STS 2.9.2
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851.html
> Sent from the Grails - user mailing list archive at Nabble.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





If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851p4631857.html
To unsubscribe from BuildConfig Dependencies vs Plugins, click here.
NAML



View this message in context: Re: BuildConfig Dependencies vs Plugins
Sent from the Grails - user mailing list archive at Nabble.com.



--
The Journey Is The Reward.



If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851p4631867.html
To unsubscribe from BuildConfig Dependencies vs Plugins, click here.
NAML



View this message in context: Re: BuildConfig Dependencies vs Plugins
Sent from the Grails - user mailing list archive at Nabble.com.



--
The Journey Is The Reward.
Reply | Threaded
Open this post in threaded view
|

Re: BuildConfig Dependencies vs Plugins

Dencel
I don't know the exact difference, but quoting did the trick. Many thanks for enlighten me and for your help!

2012/7/19 Roberto Guerra [via Grails] <[hidden email]>
I believe this

grails.plugin.location.smartserver = "../myinline"

should be this

grails.plugin.location.'smartserver' = "../myinline"

And I would use absolute path instead of relative path also. That is what I normally do. I've never tried it the way you've pasted it.

On Thu, Jul 19, 2012 at 5:54 AM, Dencel <[hidden email]> wrote:
It is an inline plugin and I am using STS 2.9.2.
The BuildConfig of my (inline) plugin is:
plugins{
     compile ':plugin-config:[0.1.5,)'
}
MyInlineGrailsPlugin:
def dependsOn = [pluginConfig:'0.1.5 > *']
  

The BuildConfig of my project is:
{..
dependencies{}

    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.7.1"
        runtime ":resources:1.1.6"

        build ":tomcat:$grailsVersion"
    }
}
grails.plugin.location.smartserver = "../myinline"


2012/7/19 Roberto Guerra [via Grails] <[hidden email]>
Is that plugin a grails plugin? Or is it your own custom plugin? I am suspecting the latter.

You can have inline plugins that reside in your own system, but you configure them differently. For example, if your plugin is in /usr/local/grails/plugins/fancy-plugin
then to use it in you project, you would do this at the end of your BuildConfig.groovy file :

grails.plugin.location.'fancy-plugin' = "/usr/local/grails/plugins/fancy-plugin"

If your plugin is an official grails plugin, then it would help if you pasted your BuildConfig.groovy file. 

On Thu, Jul 19, 2012 at 5:22 AM, Dencel <[hidden email]> wrote:
Just to be clear: so the distinction is in the way grails handle plugins (through grails.org/plugins)  vs the way Java frameworks handle dependencies (like maven)?
Thus, plugins{} -> Grails plugins, dependencies{} -> java plugins; I guess that makes sense.

I have the plugin-config declaration in the plugin BuildConfig,
plugins {
                 compile ':plugin-config:[0.1.5,)'
 
        build(":tomcat:$grailsVersion",
               ":release:1.0.0") {
             export = false
         }
     }

but when starting the project (the plugin consumer), grails complaints it's missing the dependency:
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]

2012/7/19 Graeme Rocher-4 [via Grails] <[hidden email]>
On Thu, Jul 19, 2012 at 11:05 AM, Dencel <[hidden email]> wrote:
> Hello,
> I am new to groovy/grails (I am a Java programmer) and it's absolutely
> amazing. After reading the docs I can't get my head around the distinction
> between dependencies and plugins in BuildConfig.groovy. When do I need to
> add a declaration in both sections, when in plugins and when in
> dependencies?

plugins { } block is used declare dependencies on grails plugins found
in the portal (http://grails.org/plugins/) and built locally.

dependencies { } block is used to declare dependencies on JAR files
and third party java libraries typically found in Maven central (see
http://search.maven.org/#browse)


>
> Another question in this category: I've created a plugin which dependsOn
> plugin-config. The plugin just works fine, but when I install it in another
> project, grails complaints about the missing dependsOn which is declared in
> the MyPlugin.groovy. This is not inherited? Do I have to declare the same
> plugins in the main project as in the plugin project?


Declare plugin-config in the plugins { } block of BuildConfig.groovy
inside your plugin project

Cheers

>
> MyGrailsPlugin.groovy:
> def dependsOn = [pluginConfig:'0.1.5 > *']
> BuildConfig.groovy:
>     plugins {
>                 compile ':plugin-config:[0.1.5,)'
>
>         build(":tomcat:$grailsVersion",
>               ":release:1.0.0") {
>             export = false
>         }
>     }
>
> PluginConsumerProject:
> BuildConfig.groovy:
>     plugins {
>         runtime ":hibernate:$grailsVersion"
>         runtime ":jquery:1.7.1"
>         runtime ":resources:1.1.6"
>
>         build ":tomcat:$grailsVersion"
>     }
>     dependencies {
>     }
> grails.plugin.location.my = "../my"
>
> Running PluginConsumerProject grails exists with this error:
> | Error Error: The following plugins failed to load due to missing
> dependencies: [my]
> - Plugin: my
>    - Dependencies:
>        ! pluginConfig (Required: 0.1.5 > *, Found: Not Installed) [INVALID]
>
> I am using STS 2.9.2
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851.html
> Sent from the Grails - user mailing list archive at Nabble.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





If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851p4631857.html
To unsubscribe from BuildConfig Dependencies vs Plugins, click here.
NAML



View this message in context: Re: BuildConfig Dependencies vs Plugins
Sent from the Grails - user mailing list archive at Nabble.com.



--
The Journey Is The Reward.



If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851p4631867.html
To unsubscribe from BuildConfig Dependencies vs Plugins, click here.
NAML



View this message in context: Re: BuildConfig Dependencies vs Plugins
Sent from the Grails - user mailing list archive at Nabble.com.



--
The Journey Is The Reward.



If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/BuildConfig-Dependencies-vs-Plugins-tp4631851p4631874.html
To unsubscribe from BuildConfig Dependencies vs Plugins, click here.
NAML