JNAerator - mvn clean install fails on surefire tests

168 views
Skip to first unread message

secknv

unread,
Jan 3, 2018, 5:33:44 PM1/3/18
to NativeLibs4Java
I am new to Maven; did a lot of googling; didn't know what else to do but come here.
Cannot build JNAerator using mvn clean install:
Posted what I think are the relevant parts below. If you need more just say.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Anarres JCPP (with JNAerator modifications) ........ SUCCESS [  7.761 s]
[INFO] JNAerator Parent Project ........................... SUCCESS [  0.032 s]
[INFO] OChafik's General Utilities ........................ SUCCESS [  4.430 s]
[INFO] OChafik's Swing Utilities .......................... SUCCESS [  6.588 s]
[INFO] JNAerator Runtime .................................. SUCCESS [  6.261 s]
[INFO] JNAerator Rococoa Runtime .......................... SUCCESS [  2.995 s]
[INFO] JNAerator Parser ................................... SUCCESS [ 17.023 s]
[INFO] JNAerator CLI and Studio Tools ..................... FAILURE [ 26.544 s]
[INFO] JNAerator Maven Plugin ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:11 min
[INFO] Finished at: 2018-01-03T21:49:25Z
[INFO] Final Memory: 40M/695M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project jnaerator: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\*****\JNAerator\jnaerator\target\surefire-reports for the individual test results.

Here is the test result that failed:

-------------------------------------------------------------------------------
Test set: com.ochafik.lang.jnaerator.JNAerationTest
-------------------------------------------------------------------------------
Tests run: 123, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 23.544 sec <<< FAILURE! - in com.ochafik.lang.jnaerator.JNAerationTest
test[55](com.ochafik.lang.jnaerator.JNAerationTest)  Time elapsed: 0.089 sec  <<< FAILURE!
java.lang.AssertionError: Error : com.ochafik.lang.compiler.CompilerUtils$CompilationError: Error in file:///TestJNA.java at line 9, col 17 :
illegal start of expression

1: import com.sun.jna.*;
2: import com.sun.jna.ptr.*;
3: import java.nio.*;
4: import test.*;
5: public class TestJNA {
6: public static void main(String[] args) {
7: // globals.test / JNA
8: //#runtime(JNA)
9:>>> import static test.TestLibrary.*;
10: }
11: }
Error in file:///TestJNA.java at line 9, col 24 :
illegal start of expression

1: import com.sun.jna.*;
2: import com.sun.jna.ptr.*;
3: import java.nio.*;
4: import test.*;
5: public class TestJNA {
6: public static void main(String[] args) {
7: // globals.test / JNA
8: //#runtime(JNA)
9:>>> import static test.TestLibrary.*;
10: }
11: }
Error in file:///TestJNA.java at line 9, col 35 :
';' expected

1: import com.sun.jna.*;
2: import com.sun.jna.ptr.*;
3: import java.nio.*;
4: import test.*;
5: public class TestJNA {
6: public static void main(String[] args) {
7: // globals.test / JNA
8: //#runtime(JNA)
9:>>> import static test.TestLibrary.*;
10: }
11: }
Error in file:///TestJNA.java at line 9, col 48 :
<identifier> expected

1: import com.sun.jna.*;
2: import com.sun.jna.ptr.*;
3: import java.nio.*;
4: import test.*;
5: public class TestJNA {
6: public static void main(String[] args) {
7: // globals.test / JNA
8: //#runtime(JNA)
9:>>> import static test.TestLibrary.*;
10: }
11: }
Error in file:///TestJNA.java at line 9, col 49 :
illegal start of expression

1: import com.sun.jna.*;
2: import com.sun.jna.ptr.*;
3: import java.nio.*;
4: import test.*;
5: public class TestJNA {
6: public static void main(String[] args) {
7: // globals.test / JNA
8: //#runtime(JNA)
9:>>> import static test.TestLibrary.*;
10: }
11: }
 in :
{TestJNA.java=import com.sun.jna.*;
import com.sun.jna.ptr.*;
import java.nio.*;
import test.*;
public class TestJNA {
public static void main(String[] args) {
// globals.test / JNA
//#runtime(JNA)
import static test.TestLibrary.*;
}
}}
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at com.ochafik.lang.jnaerator.JNAerationTest$1.setFinished(JNAerationTest.java:184)
at com.ochafik.lang.jnaerator.JNAerator.jnaerate(JNAerator.java:1066)
at com.ochafik.lang.jnaerator.JNAerationTest.test(JNAerationTest.java:137)

Fred Eisele

unread,
Aug 20, 2018, 3:57:05 PM8/20/18
to NativeLibs4Java
I have a fork that passes the tests.


pushd nativelibs4java
mvn clean install
popd

pushd JNAerator
mvn clean install
popd




David F

unread,
Jul 4, 2020, 10:28:38 AM7/4/20
to NativeLibs4Java
I get an error using mvn on JNAerator using Java SDK 8 (1.8.0.251) - invalid flag -html5 on Anarrres JCPP. Trying to find the flag but can't. Shows up in a created batch file but I can't find the actual place where the batch file is created.
Reply all
Reply to author
Forward
0 new messages