Export Eclipse Plugin, Assert Errors

Here is my scenario:
I import Eclipse RSE( Remote System Explorer) plug-ins into my workspace and I want to build and test it myself. There are no errors in the workspace and running and debugging is all OK. And I want to export these plug-ins out: Export->Plug-in Development->Deployable plug-ins and fragements -> … An error dialog tells me that “Error occurred during the operation. A zip file containing the build logs has been generated and placed at …”. And exact that *.zip file and there is a @dot.bin.log, saying something like:
4. WARNING in D:\eclipse\workspace\org.eclipse.rse.core \src\org\eclipse\rse\core\ SystemTypeMatcher.java (at line 31)
assert pattern != null;
'assert' should not be used as an identifier, since it is a reserved keyword from source level 1.4 on
5. ERROR in D:\eclipse\workspace\org.eclipse.rse.core \src\org\eclipse\rse\core\ SystemTypeMatcher.java (at line 31)
assert pattern != null;
Syntax error on token "!=", = expected

I know this error. But I already set the Compiler Compliance Level to 1.5 already, and in the workspace there is no errors complaining about this.

Googling all over the net and there is no clear solution to solve this problem. Someone says that modifying ANT script build.xml by adding source=”1.4″ will solve this problem. But the problem is that using Export->… the build.xml will always be regenerated.

After reading the source of plug-in org.eclipse.pde.build, I found that there is an option for the script generator to specify javacSource in build.xml. You can just add two lines in build.properties file like the following:
javacSource = 1.4
javacTarget = 1.4

And exporting plug-ins won’t have errors any more.

It feels great to have sources in hand when solving problems. 😀

This entry was posted in Bug Fix, Eclipse, Tricks and tagged , . Bookmark the permalink.

3 Responses to Export Eclipse Plugin, Assert Errors

  1. Hendy Irawan says:

    Hi Zhou!

    I’ve added a bug report to Eclipse PDE Bugzilla for your issue:


    There is already a response from Remy Chi Jian Suen, an Eclipse committer.

    I hope this bug gets fixed soon. I’m also planning to develop Eclipse plugins very soon. Actually I want to base all of my newer apps out of Eclipse plugins. 🙂

  2. Zhou Renjian says:

    Thanks for reporting this bug to Eclipse PDE Bugzilla.
    O, I am a too lazy guy to make such a bug report. 🙂

  3. Mark82 says:

    Should we attempt an interpretation of Aristotle on substance that reconciles the position of the Categories with that of Metaphysics Z, or should we decide that the two texts are irreconcilable and interpret each as advocating a distinctive position? ,