Transitive plugin bug?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Transitive plugin bug?

Will Hughes

Okay, after a solid day I've solved my problem but think this must be
a bug. I started in grails 2.3.2 and upgraded to 2.3.4, all the same.

My grails app is divided up into plugins: a base plugin that has core
domain objects and some interfaces, N "factory" plugins that require
the base plugin and one app, that can include any number of the
"factory" plugins. All of these plugins, for now, are local (not in
any external maven repo)

So this is what people are calling the 'transitive' plugin issue. What
I'm seeing is that I write the base plugin and use 'maven install' to
put it into my local repo (the ~/.m2/repository...). Fine. Then I
write one of the "factory" plugins where in the BuildConfig under the
'plugins' section I put the 'base' plugin. It compiles and packages
fine, but when I run 'maven-install' it says:

| Error Could not find artifact pkg-blah:name-blah:jar:ver-blah in
grailsCentral ( (scope: compile)
(Use --stacktrace to see the full trace)

Now, beyond the s there's something I didn't see for about 6 hours.
The 'jar'. See it there? I didn't for a LONG time. A very LONG,
frustrating time. Why is it looking for 'jar' when it's been put into
the 'plugins' section of the BuildConfig? That, to my understanding,
is only when it's in the 'dependencies' section.

I think that's the bug. Let me know how wrong I may or may not be.
Dunno. I'm no Grails God, just an everyday user.

Oh, the fix: use grails create-pom, put 'pom true' into the
BuildConfig, then edit the pom and under the dependencies section of
the pom for the plugins, add in <type>zip</type>. Oh, default
packaging at the top of the pom is 'grails-plugin' or something.
Change it to 'zip'. Then all is fine.

Just dunno why it's defaulting to 'jar' for a plugin. Edify me!


Ph: 206.799.1589

To unsubscribe from this list, please visit: