mavenized version?

104 views
Skip to first unread message

Meredith Gregory

unread,
Oct 2, 2012, 4:29:15 PM10/2/12
to scal...@googlegroups.com
Dear Scalagwt'rs,

i was attempting to use the hello world sample for a mavenized scalagwt build i found here. This works up to the call to the gwt compiler. i can invoke this via

> mvn gwt:compile

or as part of 

> mvn package

No matter which version of the gwt-maven-plugin (2.4.0 or 2.5.0-rc1) this phase fails -- though in different ways. With the former i get a compilation failure (see below). With the latter i get a failure with the configuration of the command line (see below).

Essentially, i'm using this on a small variant of the Showcase sample which i've merely put into a different package, and with a different module file. i've got this variant to build using the ant script, but would love to get it running under maven.

Best wishes,

--greg

// 2.4.0 gwt-maven-plugin results of mvn gwt:compile
[INFO] Compiling scala.Function$$anonfun$tupled$1
[INFO]    [ERROR] An internal compiler exception occurred
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:109)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO] at com.google.gwt.dev.jjs.ast.JExpressionStatement.traverse(JExpressionStatement.java:41)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[INFO] at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[INFO] at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[INFO] at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:426)
[INFO] at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:395)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:893)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:618)
[INFO] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:532)
[INFO] at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:278)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[INFO] Caused by: java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)Lscala/collection/mutable/ArrayOps;
[INFO] at com.biosimilarity.iacontainer.generator.ShowcaseGenerator.generate(ShowcaseGenerator.scala:95)
[INFO] at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
[INFO] at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:652)
[INFO] at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
[INFO] at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:265)
[INFO] at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleGwtCreate(UnifyAst.java:355)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:433)
[INFO] at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:237)
[INFO] at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:243)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] ... 32 more
[INFO]       [ERROR] at Unknown(0): GWT.create(Showcase$GeneratorInfo.class)
[INFO]          com.google.gwt.dev.jjs.ast.JMethodCall
[INFO]       [ERROR] at Unknown(0): GWT.create(Showcase$GeneratorInfo.class)
[INFO]          com.google.gwt.dev.jjs.ast.JExpressionStatement
[INFO]       [ERROR] at Unknown(0): {
[INFO]   GWT.create(Showcase$GeneratorInfo.class);
[INFO]   ShowcaseConstants constants = (ShowcaseConstants) GWT.create(ShowcaseConstants.class);
[INFO]   this.com$biosimilarity$iacontainer$client$Showcase$$updateStyleSheets();
[INFO]   this.setupTitlePanel(constants);
[INFO]   this.setupMainLinks(constants);
[INFO]   this.setupOptionsPanel();
[INFO]   this.setupMainMenu(constants);
[INFO]   History.addValueChangeHandler(Handlers$.MODULE$.fn2valueChangeHandler(new Showcase$$anonfun$onModuleLoad$1(this)));
[INFO]   Handlers$.MODULE$.enrichHasSelectionHandlers(this.com$biosimilarity$iacontainer$client$Showcase$$app()).onSelection(new Showcase$$anonfun$onModuleLoad$2(this));
[INFO]   if (History.getToken().length() > 0) {
[INFO]     {
[INFO]       History.fireCurrentHistoryState();
[INFO]     }
[INFO]   } else {
[INFO]     {
[INFO]       TreeItem firstItem = this.com$biosimilarity$iacontainer$client$Showcase$$app().getMainMenu().getItem(0).getChild(0);
[INFO]       this.com$biosimilarity$iacontainer$client$Showcase$$app().getMainMenu().setSelectedItem(firstItem, false);
[INFO]       this.com$biosimilarity$iacontainer$client$Showcase$$app().getMainMenu().ensureSelectedItemVisible();
[INFO]       this.com$biosimilarity$iacontainer$client$Showcase$$displayContentWidget((ContentWidget) this.com$biosimilarity$iacontainer$client$Showcase$$itemWidgets().get(firstItem));
[INFO]     }
[INFO]   }
[INFO] }
[INFO]          com.google.gwt.dev.jjs.ast.JBlock
[INFO]       [ERROR] at Unknown(0): {
[INFO]   GWT.create(Showcase$GeneratorInfo.class);
[INFO]   ShowcaseConstants constants = (ShowcaseConstants) GWT.create(ShowcaseConstants.class);
[INFO]   this.com$biosimilarity$iacontainer$client$Showcase$$updateStyleSheets();
[INFO]   this.setupTitlePanel(constants);
[INFO]   this.setupMainLinks(constants);
[INFO]   this.setupOptionsPanel();
[INFO]   this.setupMainMenu(constants);
[INFO]   History.addValueChangeHandler(Handlers$.MODULE$.fn2valueChangeHandler(new Showcase$$anonfun$onModuleLoad$1(this)));
[INFO]   Handlers$.MODULE$.enrichHasSelectionHandlers(this.com$biosimilarity$iacontainer$client$Showcase$$app()).onSelection(new Showcase$$anonfun$onModuleLoad$2(this));
[INFO]   if (History.getToken().length() > 0) {
[INFO]     {
[INFO]       History.fireCurrentHistoryState();
[INFO]     }
[INFO]   } else {
[INFO]     {
[INFO]       TreeItem firstItem = this.com$biosimilarity$iacontainer$client$Showcase$$app().getMainMenu().getItem(0).getChild(0);
[INFO]       this.com$biosimilarity$iacontainer$client$Showcase$$app().getMainMenu().setSelectedItem(firstItem, false);
[INFO]       this.com$biosimilarity$iacontainer$client$Showcase$$app().getMainMenu().ensureSelectedItemVisible();
[INFO]       this.com$biosimilarity$iacontainer$client$Showcase$$displayContentWidget((ContentWidget) this.com$biosimilarity$iacontainer$client$Showcase$$itemWidgets().get(firstItem));
[INFO]     }
[INFO]   }
[INFO] }
[INFO]          com.google.gwt.dev.jjs.ast.JMethodBody
[INFO]       [ERROR] at Unknown(0): public void onModuleLoad();
[INFO] 
[INFO]          com.google.gwt.dev.jjs.ast.JMethod
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

// 2.5.0-rc1 maven-gwt-plugin results 

[INFO] --- gwt-maven-plugin:2.5.0-rc1:compile (compile-gwt) @ iacontainer ---
[WARNING] You're project declares dependency on gwt-user 2.4.0-scalagwt. This plugin is designed for at least gwt version 2.5.0-rc1
[WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts
[WARNING] You're project declares dependency on gwt-user 2.4.0-scalagwt. This plugin is designed for at least gwt version 2.5.0-rc1
[ERROR] Unknown argument: -XfragmentCount
[ERROR] Google Web Toolkit 0.0.0
[ERROR] Compiler [-logLevel level] [-workDir dir] [-gen dir] [-style style] [-ea] [-XdisableClassMetadata] [-XdisableCastChecking] [-validateOnly] [-draftCompile] [-optimize level] [-compileReport] [-strict] [-localWorkers count] [-war dir] [-deploy dir] [-extra dir] module[s] 
[ERROR] 
[ERROR] where 
[ERROR]   -logLevel               The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
[ERROR]   -workDir                The compiler's working directory for internal use (must be writeable; defaults to a system temp dir)
[ERROR]   -gen                    Debugging: causes normally-transient generated types to be saved in the specified directory
[ERROR]   -style                  Script output style: OBF[USCATED], PRETTY, or DETAILED (defaults to OBF)
[ERROR]   -ea                     Debugging: causes the compiled output to check assert statements
[ERROR]   -XdisableClassMetadata  EXPERIMENTAL: Disables some java.lang.Class methods (e.g. getName())
[ERROR]   -XdisableCastChecking   EXPERIMENTAL: Disables run-time checking of cast operations
[ERROR]   -validateOnly           Validate all source code, but do not compile
[ERROR]   -draftCompile           Enable faster, but less-optimized, compilations
[ERROR]   -optimize               Sets the optimization level used by the compiler.  0=none 9=maximum.
[ERROR]   -compileReport          Create a compile report that tells the Story of Your Compile
[ERROR]   -strict                 Only succeed if no input files have errors
[ERROR]   -localWorkers           The number of local workers to use when compiling permutations
[ERROR]   -war                    The directory into which deployable output files will be written (defaults to 'war')
[ERROR]   -deploy                 The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar)
[ERROR]   -extra                  The directory into which extra files, not intended for deployment, will be written
[ERROR] and 
[ERROR]   module[s]               Specifies the name(s) of the module(s) to compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

--
L.G. Meredith
Managing Partner
Biosimilarity LLC
7329 39th Ave SW

Nate Bauernfeind

unread,
Oct 4, 2012, 6:29:57 PM10/4/12
to scal...@googlegroups.com
This part worries me:
[WARNING] You're project declares dependency on gwt-user 2.4.0-scalagwt. This plugin is designed for at least gwt version 2.5.0-rc1

What's the build error if you're using v2.4.0 of the gwt-maven-plugin?

Are you able to get my barebones project working at all (from nearly a fresh git clone)?

Meredith Gregory

unread,
Oct 8, 2012, 1:53:52 PM10/8/12
to scal...@googlegroups.com
Dear Nate,

Thanks for asking! i've included the trace of the error that happens using 2.4.0 gwt-maven-plugin. 

i've modified my project to be a version of the Showcase sample, released with the scala-gwt samples. However, i've changed the code to simply be in a different package. So, it's not quite the same as your HelloWorld, but very similar. My modified version builds just fine with the ant build script. Additionally, it compiles under mvn up to -- but not including -- jribble compilation. When i then call 

> mvn gwt:compile

or

> mvn package

i get the compilation error, below.

Best wishes,

Nate Bauernfeind

unread,
Oct 8, 2012, 3:16:58 PM10/8/12
to scal...@googlegroups.com
Can you fork my sample gwt-maven-plugin and push your changes to see if I can take a stab at fixing this?

Meredith Gregory

unread,
Oct 8, 2012, 5:13:35 PM10/8/12
to scal...@googlegroups.com
Dear Nate,

Thanks for following up. i put up a version under one of my projects already on github. Does that work?

Best wishes,

--greg

Nate Bauernfeind

unread,
Oct 12, 2012, 12:40:07 PM10/12/12
to scal...@googlegroups.com
Just to give you a heads up, I was able to reproduce your issue with the jar's I've built previously.

I'm going to try and get the showcase sample up and running with as few modifications as I can manage. I don't have time right at this moment, but it's on my todo list. I'll keep you updated.

Meredith Gregory

unread,
Oct 12, 2012, 12:56:44 PM10/12/12
to scal...@googlegroups.com, nate.bau...@gmail.com
Dear Nate,

Thanks! Do let me know if you get things going, and don't hesitate to ask if you think i can be of help.

Best wishes,

--greg

Meredith Gregory

unread,
Oct 19, 2012, 11:30:17 PM10/19/12
to scal...@googlegroups.com, Nate Bauernfeind
Dear Nate,

i just thought i'd check in and see how things might be progressing on this front.

Best wishes,

--greg

On Fri, Oct 12, 2012 at 9:40 AM, Nate Bauernfeind <nate.bau...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages