Need How To Instruction; Can't duplicate PDE build "headlessly" [message #189090] |
Thu, 09 December 2004 10:03 |
Eclipse User |
|
|
|
Originally posted by: wayne.arenz.gd-ais.com
Using Version: 3.0.0 Build id: 200406251208
We've a number of plugins we've developed that we wish to bundle as a
feature/ product. We can build manually using the facilities of the IDE.
We'd like to automate the build. My question is: "how do I do this?". The
failed procedure I've tried, and its mode of failure, follows:
I CAN build a distribution zip using the "Run > Ant Build ..." wizard
without too much trouble (one exception I'll ask about below). My procedure
is 1) pull clean source into a folder (and set workspace to this folder), 2)
change file attributes to make support files writable (.classpath in
particular), 3) "PDE Tools > update classpath" across the workspace. [This
is all necessary because the autobuild across this work generally can't
immediately resolve all references -- which is perhaps the core of my
problem.] 4) Run > Ant Build ... success (with the minor exception).
I've been trying to do the same thing "headlessly" (using correct paths to
the %variables%):
%JAVAEXE% -cp %STARTUPJAR% org.eclipse.core.launcher.Main -application
org.eclipse.ant.core.antRunner -data %WORKSPACE% -buildfile %BUILDFILE%
clean build.jars zip.distribution refresh
Approximately 50% of our ~18 plugins report some class or classes that fail
compile; the logs typically appear as this:
----------
1. ERROR in D:\ws\build\com.gs.eclipse.db\src\com\g\eclipse\db\DbPlugin. java
(at line 0)
package com.g.eclipse.db;
^
The type org.eclipse.swt.widgets.Shell cannot be resolved. It is indirectly
referenced from required .class files
----------
1 problem (1 error)
That is, almost always involving a core SWT package.
My thought is that the ant build is not dealing with the classpaths in the
same manner as the "Ant Build ..." launch, (which generates and uses a
..launch file found in the .metadata folder?).
*******
The one problem I do have with the "Ant Build ..." : One of the plugins I
have has to be built with Java 1.3 compatibility due to some classes that
must use the default package. Though I've set Properties on the plugin for
1.3 compatibility, the "Ant Build ..." cannot resolve the imports from the
default package. The failure is despite the build.xml containing these
lines:
<property name="javacSource" value="1.3"/>
<property name="javacTarget" value="1.2"/>
<property name="compilerArg" value=""/>
My workaround is to Export that plugin project as a .jar. The Export
process builds the code without error. Why are Export and Ant Build ...
behaving differently? What is the fix for my automated build, which
experiences the same compile failure?
|
|
|
Powered by
FUDForum. Page generated in 0.03370 seconds