Community
Participate
Working Groups
When the target is jsr14, the resulting .class files are meant to be run on a 1.4 VM. So we don't need to provide the signature attribute.
Created attachment 136699 [details] Proposed fix
Since SAT4J is using that mode, this change could be useful for them.
Philippe and Kent, please review.
+1
Released for 3.5RC2.
Verified for 3.5RC2 using I20090521-2000.
This change breaks the sat4j 2.1.0 build. Here is the first error: build: [echo] Compiling source code org.sat4j.pb/src/main/java using target jsr14 [javac] Compiling 71 source files to sat4j-2.1.0/bin [javac] ---------- [javac] 1. ERROR in sat4j-2.1.0/org.sat4j.pb/src/main/java/org/sat4j/pb/IPBSolver.java (at line 68) [javac] IConstr addPseudoBoolean(IVecInt lits, IVec<BigInteger> coeffs, [javac] ^^^^ [javac] The type IVec is not generic; it cannot be parameterized with arguments <BigInteger> [javac] ----------
This is because java/org/sat4j/pb/IPBSolver.java ends up being compiled against the binary version of IVec. It should only use the source types. I can try to see what can be done to change the build of SAT4J. Signature attributes must not end up being generated for the target jsr14. This also means that the compiler used a generic signature even if the targeted version is 1.4. This looks like a bug.
The jsr14 mode should only be used to "export" to a jar file. Where is the ant script defined ?
The applicable ant script is http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/sat4j/maven/tags/2_1_0_ECLIPSE/build.xml?rev=463&view=markup
Could you please let me know what I need to load to reproduce the failure locally? Thanks.
1. Download http://forge.ow2.org/project/download.php?group_id=228&file_id=12803 2. ant -Drelease=2.1.0 -lib /eclipse-ecj.jar p2
The shape of the src jar doesn't match the build script. Are you using the script from http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/sat4j/maven/tags/2_1_0_ECLIPSE/build.xml?rev=463&view=markup with the src jar located in the download link in comment 12?
I take it back. While I did look at that jar, it turns out that I actually compiled that source from an SVN export: svn export svn://svn.forge.objectweb.org/svnroot/sat4j/maven/tags/2_1_0_ECLIPSE/ sat4j-2.1.0
The problem seems to come from the output folder being added to the classpath before the source folder. So when generated types are retrieved again, they are retrieved from 1.4 binaries types instead of being retrieve a 1.5 source type. I'll try to remove the output folder from the classpath to see if this fixes the issue.
This had a bad side effect on building multiple projects using the jsr14 target. I'll revert the change to fix bug 286391.
Closing as INVALID.
Verified.