compileSourcesArtifact ceased to work

77 views
Skip to first unread message

Gražvydas Valeika

unread,
Jun 5, 2016, 6:21:44 PM6/5/16
to Codehaus Mojo gwt-maven-plugin Users
Hello,

it seems Mojo's Maven Plugin for GWT is alive and well. 

I just found that it has 2.8.0-SNAPSHOT version!

But I was hit by not working compileSourcesArtifact.


Unfortunatelly solution offered by Thomas Broyer is not very helpfull if you have reason not to package java files into module jar at first place.


Could somebody comment what happened to compileSourcesArtifact? Is there any hope for its revival?


Best regards,

Grazvydas

Thomas Broyer

unread,
Jun 6, 2016, 6:33:28 AM6/6/16
to Codehaus Mojo gwt-maven-plugin Users


On Monday, June 6, 2016 at 12:21:44 AM UTC+2, Gražvydas Valeika wrote:
Hello,

it seems Mojo's Maven Plugin for GWT is alive and well. 

I just found that it has 2.8.0-SNAPSHOT version!

But I was hit by not working compileSourcesArtifact.


Unfortunatelly solution offered by Thomas Broyer is not very helpfull if you have reason not to package java files into module jar at first place.

See https://github.com/gwt-maven-plugin/gwt-maven-plugin/issues/127 for an alternative (the proper way if you ask me, compileSourcesArtifact is a crutch for when your build is not properly organized/modularized).
Also have a look at the comments on the stackoverflow question.
As for why it doesn't work, no idea sorry; but updating your build to not using it will only do good, so I'd suggest trying that instead of even trying to debug the issue (if you ask me, that "feature" should simply be removed; but I'm neither a maintainer nor even a user, so…)

Gražvydas Valeika

unread,
Jun 6, 2016, 2:54:19 PM6/6/16
to codehaus-mojo-gwt-...@googlegroups.com
it seems that my problem was not related to sources jar availability.

Building monolitic jars doesn't help.

I was suspecting that 2.8-SNAPSHOT compiler fails because it misses sources, but now I'm not sure.


[INFO]    Found 0 cached/archived units.  Used 0 / 4446 units from cache.
[INFO]    Compiling...
[INFO]       0% complete (ETR: 53 seconds)
[INFO]       10% complete (ETR: 50 seconds)
[INFO]       20% complete (ETR: 31 seconds)
[INFO]       30% complete (ETR: 29 seconds)
[INFO]       40% complete (ETR: 22 seconds)
[INFO]       50% complete (ETR: 17 seconds)
[INFO]       60% complete (ETR: 14 seconds)
[INFO]       70% complete (ETR: 11 seconds)
[INFO]       80% complete (ETR: 7 seconds)
[INFO]       90% complete (ETR: 3 seconds)
[INFO]       100% complete (ETR: 0 seconds)
[INFO]       Compilation completed in 36.48 seconds
[INFO] [ERROR] Unexpected internal compiler error
[INFO] java.lang.IllegalArgumentException
[INFO] at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:226)
[INFO] at com.google.gwt.dev.javac.BytecodeSignatureMaker.getCompileDependencySignature(BytecodeSignatureMaker.java:209)
[INFO] at com.google.gwt.dev.javac.CompiledClass.getSignatureHash(CompiledClass.java:165)
[INFO] at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:41)
[INFO] at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:36)
[INFO] at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:100)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:352)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:548)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:479)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:465)
[INFO] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:423)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:222)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:197)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:156)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:117)
[INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:124)

The only asm version in classpath is 5.0.3.

But this issue is out  of scope of this list,

Thank you,

Grazvydas


--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-mojo-gwt-maven-...@googlegroups.com.
To post to this group, send email to codehaus-mojo-gwt-...@googlegroups.com.
Visit this group at https://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users.
For more options, visit https://groups.google.com/d/optout.

Thomas Broyer

unread,
Jun 6, 2016, 7:12:34 PM6/6/16
to Codehaus Mojo gwt-maven-plugin Users


On Monday, June 6, 2016 at 8:54:19 PM UTC+2, Gražvydas Valeika wrote:
it seems that my problem was not related to sources jar availability.

Building monolitic jars doesn't help.

I was suspecting that 2.8-SNAPSHOT compiler fails because it misses sources, but now I'm not sure.


[INFO]    Found 0 cached/archived units.  Used 0 / 4446 units from cache.
[INFO]    Compiling...
[INFO]       0% complete (ETR: 53 seconds)
[INFO]       10% complete (ETR: 50 seconds)
[INFO]       20% complete (ETR: 31 seconds)
[INFO]       30% complete (ETR: 29 seconds)
[INFO]       40% complete (ETR: 22 seconds)
[INFO]       50% complete (ETR: 17 seconds)
[INFO]       60% complete (ETR: 14 seconds)
[INFO]       70% complete (ETR: 11 seconds)
[INFO]       80% complete (ETR: 7 seconds)
[INFO]       90% complete (ETR: 3 seconds)
[INFO]       100% complete (ETR: 0 seconds)
[INFO]       Compilation completed in 36.48 seconds
[INFO] [ERROR] Unexpected internal compiler error
[INFO] java.lang.IllegalArgumentException
[INFO] at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] at org.objectweb.asm.ClassReader.<init>(Unknown Source)
[INFO] at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:226)

That'd mean either a corrupted class file, a class compiled for Java 9 (using OpenJDK 9 already?), or GWT looking at a file that's not actually a class file:

Gražvydas Valeika

unread,
Jun 7, 2016, 1:42:40 AM6/7/16
to codehaus-mojo-gwt-...@googlegroups.com

That'd mean either a corrupted class file, a class compiled for Java 9 (using OpenJDK 9 already?), or GWT looking at a file that's not actually a class file:

No Java 9. 
Corrupted class file - can't see how - I'm rebuilding everything with mvn clean compile package. It can be custom gwt library taken from maven repository and bult with java 7. But, please correct me - how gwt compiler is related to compiled classes - I expect that it compiles sources to classes by itself and then processes its own produced bytecode.

G.

Eduardo Felipe dos Santos

unread,
Jul 5, 2017, 9:46:32 AM7/5/17
to Codehaus Mojo gwt-maven-plugin Users
Did you managed to fix that? I'm stuck with this issue. 
Reply all
Reply to author
Forward
0 new messages