Bug 96266 - Wrong property in build.properties template
Summary: Wrong property in build.properties template
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC2   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 96605
Blocks:
  Show dependency tree
 
Reported: 2005-05-23 02:18 EDT by Gunnar Wagenknecht CLA
Modified: 2005-05-30 09:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gunnar Wagenknecht CLA 2005-05-23 02:18:04 EDT
The template build.properties for custom component scripts in automated PDE
builds containes a wrong property. (3.1M7)

The template containse:
javacfailonerror

But the generated build.xml files look for:
javacFailOnError

Note the Ant properties are case sensitive.
Comment 1 Gunnar Wagenknecht CLA 2005-05-23 02:19:25 EDT
Index: build.properties
===================================================================
RCS file: /home/eclipse/org.eclipse.pde.build/templates/build.properties,v
retrieving revision 1.8
diff -u -r1.8 build.properties
--- build.properties	17 May 2005 19:13:42 -0000	1.8
+++ build.properties	23 May 2005 06:19:04 -0000
@@ -133,10 +133,15 @@
 javacDebugInfo=false 
 
 # Whether or not to fail the build if there are compiler errors
-javacfailonerror=true
+javacFailOnError=true
 
 # The version of the source code
 #javacSource=1.3
 
 # The version of the byte code targeted
 #javacTarget=1.1
+
+# Asks the compiler for verbose output.  This should be set to true in order
for *.bin.log files to be generated when
+# using the JDT Compiler Adapter to compile.
+javacVerbose=true
+
Comment 2 Gunnar Wagenknecht CLA 2005-05-23 02:22:04 EDT
Also note, that under "BASE CONTROL" you have the following properties:
eclipseURL=<url for eclipse download site>
eclipseBuildId=<Id of Eclipse build to get>
eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip

However, the customTargets.xml does not contain a target to download and unzip
Eclipse from these properties. This might cause a lot confusions if people are
expecting that the build will download it.
Comment 3 Pascal Rapicault CLA 2005-05-24 10:49:21 EDT
The build.properties has been fixed in HEAD.

The download is done in the customTargets.xml, see the task getBaseComponents.
Comment 4 Gunnar Wagenknecht CLA 2005-05-25 06:22:23 EDT
You introduced a new bug with this change. The property "compilerArg" must not
contain the "-log" statement because it's incomplete.

The magic for generating the "myjar.jar.bin.log" files is in
org.eclipse.jdt.core.JDTCompilerAdapter.java around line 297:
----
/*
 * verbose option
 */
if (this.verbose) {
  cmd.createArgument().setValue("-verbose"); //$NON-NLS-1$
  /*
   * extra option allowed by the Eclipse compiler
   */
  cmd.createArgument().setValue("-log"); //$NON-NLS-1$
  this.logFileName = this.destDir.getAbsolutePath() + ".log"; //$NON-NLS-1$
  cmd.createArgument().setValue(this.logFileName);
}
----

As you can see, only if "javacVerbose" is set to "true" the log files will be
generated. 

If you specify the "-log" compiler argument you also need to specify the log
file where the output should be logged to. Unfortunately, this log file will be
overwritten for every jar.

See org.eclipse.jdt.internal.compiler.batch.Main.java around line 861 for details:
----
this.log = new PrintWriter(new FileOutputStream(logFileName, false));
----
Comment 5 Pascal Rapicault CLA 2005-05-25 10:14:01 EDT
I picked those values after getting a demo from Olivier that setting the -log
was working. However we did not test exactly the same thing and a file was being
specified. 
I opened a bug against jdt core because the -log should create a log file in a
default location.
Comment 6 Pascal Rapicault CLA 2005-05-26 11:22:07 EDT
Moving to RC2 since JDT changed bug 96605 to RC2.
This can easily wait 'til RC2 since the change does no evolve any code change,
just change in the template files.
Comment 7 Pascal Rapicault CLA 2005-05-30 09:32:20 EDT
The verbose option of the jdt adapter has been changed to be less verbose (it no
longer indicates what is being written, read, ...).
Therefore, I reverted the options to be what they use to.