You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@buildr.apache.org by Ketan Padegaonkar <ke...@gmail.com> on 2008/11/14 18:52:20 UTC
Buildr for building osgi plugins.
Hi,
Apologies for the cross post. But I thought this would be a good
extension to buildr so I'm posting to the user and dev lists.
I'm attempting to build eclipse plugins using buildr. Eclipse plugins
follow slightly different conventions from the others, and I'm stuck not
being able to figure things on my own.
Here's what my project structure looks like:
org.eclipse.swt.examples/src
net.sf.swtbot.finder/src
net.sf.swtbot.finder.test/src
As you can see, the test folder is actually a different project, and I'm
attempting to hack into buildr to add support for this kind of a
configuration. I've created two different layouts for the different
kinds of plugins as described above:
class SimplePluginLayout < Layout
def initialize
super
self[:source, :main, :java] = 'src'
self[:source, :main, :resources] = 'src'
end
end
class PluginWithTestLayout < Layout
def initialize plugin_id
super()
self[:source, :main, :java] = 'src'
self[:source, :main, :resources] = 'src'
self[:source, :test, :java] = '../#{plugin_id}.test/src'
self[:source, :test, :resources] = '../#{plugin_id}.test/src'
end
end
I've also defined projects as follows:
define "org.eclipse.swt.examples", :layout=>SimplePluginLayout do
...
end
define "net.sf.swtbot.finder",
:layout=>PluginWithTestLayout.new("net.sf.swtbot.finder") do
...
end
define "net.sf.swtbot.finder",
:layout=>PluginWithTestLayout.new("net.sf.swtbot.finder") do
...
end
What's interesting is that running the "package" task seems to package
the projects into proper jars, but running tests does not execute the
tests, as the layout does not seem to find the tests.
Is there something that I'm doing wrong ?
-- Ketan
Re: Buildr for building osgi plugins.
Posted by Assaf Arkin <ar...@intalio.com>.
On Fri, Nov 14, 2008 at 9:52 AM, Ketan Padegaonkar
<ke...@gmail.com> wrote:
> Hi,
>
> Apologies for the cross post. But I thought this would be a good extension
> to buildr so I'm posting to the user and dev lists.
>
> I'm attempting to build eclipse plugins using buildr. Eclipse plugins follow
> slightly different conventions from the others, and I'm stuck not being able
> to figure things on my own.
>
> Here's what my project structure looks like:
>
> org.eclipse.swt.examples/src
>
> net.sf.swtbot.finder/src
> net.sf.swtbot.finder.test/src
>
> As you can see, the test folder is actually a different project, and I'm
> attempting to hack into buildr to add support for this kind of a
> configuration. I've created two different layouts for the different kinds of
> plugins as described above:
>
> class SimplePluginLayout < Layout
> def initialize
> super
> self[:source, :main, :java] = 'src'
> self[:source, :main, :resources] = 'src'
> end
> end
>
> class PluginWithTestLayout < Layout
> def initialize plugin_id
> super()
> self[:source, :main, :java] = 'src'
> self[:source, :main, :resources] = 'src'
>
> self[:source, :test, :java] = '../#{plugin_id}.test/src'
> self[:source, :test, :resources] = '../#{plugin_id}.test/src'
> end
> end
>
> I've also defined projects as follows:
>
>
> define "org.eclipse.swt.examples", :layout=>SimplePluginLayout do
> ...
> end
>
>
> define "net.sf.swtbot.finder",
> :layout=>PluginWithTestLayout.new("net.sf.swtbot.finder") do
> ...
> end
>
> define "net.sf.swtbot.finder",
> :layout=>PluginWithTestLayout.new("net.sf.swtbot.finder") do
> ...
> end
>
> What's interesting is that running the "package" task seems to package the
> projects into proper jars, but running tests does not execute the tests, as
> the layout does not seem to find the tests.
>
> Is there something that I'm doing wrong ?
"../#{plugin_id}.test/src"
single quotes are taken literally, double quotes do the extra
processing which will expand #{plugin_id}.
Assaf
>
> -- Ketan
>
>
>
>
Re: Buildr for building osgi plugins.
Posted by Assaf Arkin <ar...@intalio.com>.
On Fri, Nov 14, 2008 at 9:52 AM, Ketan Padegaonkar
<ke...@gmail.com> wrote:
> Hi,
>
> Apologies for the cross post. But I thought this would be a good extension
> to buildr so I'm posting to the user and dev lists.
>
> I'm attempting to build eclipse plugins using buildr. Eclipse plugins follow
> slightly different conventions from the others, and I'm stuck not being able
> to figure things on my own.
>
> Here's what my project structure looks like:
>
> org.eclipse.swt.examples/src
>
> net.sf.swtbot.finder/src
> net.sf.swtbot.finder.test/src
>
> As you can see, the test folder is actually a different project, and I'm
> attempting to hack into buildr to add support for this kind of a
> configuration. I've created two different layouts for the different kinds of
> plugins as described above:
>
> class SimplePluginLayout < Layout
> def initialize
> super
> self[:source, :main, :java] = 'src'
> self[:source, :main, :resources] = 'src'
> end
> end
>
> class PluginWithTestLayout < Layout
> def initialize plugin_id
> super()
> self[:source, :main, :java] = 'src'
> self[:source, :main, :resources] = 'src'
>
> self[:source, :test, :java] = '../#{plugin_id}.test/src'
> self[:source, :test, :resources] = '../#{plugin_id}.test/src'
> end
> end
>
> I've also defined projects as follows:
>
>
> define "org.eclipse.swt.examples", :layout=>SimplePluginLayout do
> ...
> end
>
>
> define "net.sf.swtbot.finder",
> :layout=>PluginWithTestLayout.new("net.sf.swtbot.finder") do
> ...
> end
>
> define "net.sf.swtbot.finder",
> :layout=>PluginWithTestLayout.new("net.sf.swtbot.finder") do
> ...
> end
>
> What's interesting is that running the "package" task seems to package the
> projects into proper jars, but running tests does not execute the tests, as
> the layout does not seem to find the tests.
>
> Is there something that I'm doing wrong ?
"../#{plugin_id}.test/src"
single quotes are taken literally, double quotes do the extra
processing which will expand #{plugin_id}.
Assaf
>
> -- Ketan
>
>
>
>