Generating plugin/feature build scripts with <eclipse.scriptBuild> [message #139262] |
Mon, 20 February 2006 16:40  |
Eclipse User |
|
|
|
Originally posted by: ohurley.iona.com
I'm fighting with automating the generation of plugin and feature build.xml
scripts using the <eclipse.scriptBuild> ant task.
I have a workspace, within which there are plugins and features directories.
In the feature directory, I have a trivial feature project which depends
upon a trivial plugin project which resides in the plugins directory:
root
workspace
features
org.my.feature
plugins
org.my.plugin
In the root directory I have a build.xml, with the following content:
<project name="p" basedir="." default="do">
<target name="do">
<eclipse.buildScript
elements="feature@org.my.feature"
buildDirectory="${basedir}/workspace"
baseLocation="${basedir}/workspace"
/>
</target>
</project>
From the root directory, I start the eclipse antRunner app:
java -cp startup.jar org.eclipse.core.launcher.Main
-data workspace
-application org.eclipse.ant.core.antRunner
-buildfile build.xml
and the antRunner is not best pleased - it seems to have trouble locating
the plugin:
org.eclipse.core.runtime.CoreException: Unable to find plug-in: org.my.plugin_1.0.0.
Please check the error log for more details.
at org.eclipse.pde.internal.build.builder.FeatureBuildScriptGen erator.computeElements(Featur
eBuildScriptGenerator.java:117)
at org.eclipse.pde.internal.build.builder.FeatureBuildScriptGen erator.generateChildrenScript
s(FeatureBuildScriptGenerator.java:708)
at org.eclipse.pde.internal.build.builder.FeatureBuildScriptGen erator.generate(FeatureBuildS
criptGenerator.java:226)
at org.eclipse.pde.internal.build.BuildScriptGenerator.generate Features(BuildScriptGenerator
..java:160)
at org.eclipse.pde.internal.build.BuildScriptGenerator.generate (BuildScriptGenerator.java:72
)
at org.eclipse.pde.internal.build.tasks.BuildScriptGeneratorTas k.run(BuildScriptGeneratorTas
k.java:79)
at org.eclipse.pde.internal.build.tasks.BuildScriptGeneratorTas k.execute(BuildScriptGenerato
rTask.java:71)
Following the instruction to consult the log file, I see it just contains
the same stack trace information as above, so no new insights there.
I've read as much documentation as I can get my hands on through eclipse
help and google, and I've looked at examples in the pde build plugin,
but I haven't made an progress in resolving this issue. I have a suspicion
that I have left out something small but significant in my setup or
in the various incantations. I'm using eclipse 3.1.1 on winxp.
Note that a build driven from the UI works fine, the problem just
arises when doing a headless build.
If anyone can point out my error here, or point me to some fresh examples
it would be much appreciated!
regards
Oisin
|
|
|
Re: Generating plugin/feature build scripts with <eclipse.scriptBuild> [message #139334 is a reply to message #139262] |
Tue, 21 February 2006 04:45  |
Eclipse User |
|
|
|
Originally posted by: ohurley.iona.com
Reply to self, as is often the case :)
Oisin Hurley wrote:
>
> <project name="p" basedir="." default="do">
> <target name="do">
> <eclipse.buildScript
> elements="feature@org.my.feature"
> buildDirectory="${basedir}/workspace"
> baseLocation="${basedir}/workspace"
> />
> </target>
> </project>
Your problem here is that the baseLocation should point to the
set of installed plugins that are required by the plugins that
you are building. For example, if feature org.my.plugin in
turn requires the presence of org.eclipse.emf.ecore, then
if org.eclipse.emf.ecore cannot be found, the scriptBuilder
task will state that it cannot find org.my.plugin.
Change the baseLocation to point to the eclipse install
directory so that all the required plugins can be resolved
and it will work.
cheers
--oh
|
|
|
Powered by
FUDForum. Page generated in 0.08681 seconds