Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error to compile when applying Single Script Linker

Because I am creating a chrome extension with GWT project, I want to use Single Script Linker to avoid inline scripting restriction (sigh...). And I found this resource on line: http://tech-drum.blogspot.ch/2012/08/gwt-chrome-extension-using-version-2.html

This single script linker looks like a charm, but when I really added it into my gwt.xml file and compile, it got errors... (sigh again)

The following is the error msg:

[INFO] --- gwt-maven-plugin:2.5.1:compile (default) @ fake-app ---
[INFO] auto discovered modules [com.fake...]   
[INFO] Compiling module com.fake.name.app
[INFO]    Compiling 6 permutations
[INFO]       Compiling permutation 0...
[INFO]       Process output
[INFO]          Compiling
[INFO]             Compiling permutation 3...
[INFO]       Process output
[INFO]          Compiling
[INFO]             Compiling permutation 1...
[INFO]       Process output
[INFO]          Compiling
[INFO]             Compiling permutation 2...
[INFO]       Compiling permutation 4...
[INFO]       Compiling permutation 5...
[INFO]    Compile of permutations succeeded
[INFO] Linking into /path/to/fake/app
[INFO]    Invoking Linker Single Script
[INFO]       [ERROR] The module must have exactly one distinct permutation when using the Single Script Linker; found 6
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

What's the problem with this? It looks that permutation number (assumed as js file?) to be larger than expected, but shouldn't the linker put size restriction when creating permutations? In short, how to fix this? Thanks a lot!

like image 616
user1299082 Avatar asked Mar 03 '26 14:03

user1299082


1 Answers

Selecting just the user agent for Chrome should fix your problem.

You don't need more user-agent permutations since your extension only works with one browser.

The linker you are using is the correct one for producing just a javascript file with the code of your extension.

<set-property name="user.agent" value="safari" />   
like image 88
Manolo Carrasco Moñino Avatar answered Mar 05 '26 19:03

Manolo Carrasco Moñino