Unknown argument: -XfragmentCount

500 views
Skip to first unread message

pierre.q...@gmail.com

unread,
Oct 17, 2013, 9:27:06 AM10/17/13
to codehaus-mojo-gwt-...@googlegroups.com
Hi,

I'm trying to compile GWT with Eclipse and Maven and I'm nearly desesperate to see that after two struggling days, it doesn't work for the moment.
Please let me know if you have any idea on how to resolve this issue.

Thanks !


This is a sample of my pom.xml :

            <!-- GWT Maven Plugin -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>2.5.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>test</goal>
                            <goal>generateAsync</goal>
                        </goals>
                    </execution>
                </executions>
                <!-- Plugin configuration. There are many available options, see gwt-maven-plugin
                    documentation at codehaus.org -->
                <configuration>
                    <runTarget>TMobile.html</runTarget>
                    <hostedWebapp>${webappDirectory}</hostedWebapp>
                </configuration>
            </plugin>

And here a sample of the output log :

[INFO] auto discovered modules [org.Mobile]
[WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts
[ERROR] Unknown argument: -XfragmentCount
[ERROR] Google Web Toolkit 2.0.3
[ERROR] Compiler [-logLevel level] [-workDir dir] [-gen dir] [-style style] [-ea] [-XdisableClassMetadata] [-XdisableCastChecking] [-validateOnly] [-draftCompile] [-compileReport] [-localWorkers count] [-war 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]   -compileReport          Create a compile report that tells the Story of Your Compile
[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]   -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] Total time: 7.220s
[INFO] Finished at: Thu Oct 17 15:06:00 CEST 2013
[INFO] Final Memory: 25M/177M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.5.1:compile (default) on project Mobile: Command [[
[ERROR] D:\javatools\java\jdk1.7.0_40\jre\bin\java -Xmx512m -classpath [...] -logLevel INFO -style OBF -war D:\WEBS\Mobile\target\Mobile-0.0.1-SNAPSHOT -localWorkers 4 -XfragmentCount -1 -gen D:\WEBS\Mobile\Mobile\target\.generated Mobile
[ERROR] ]] failed with status 1
[ERROR] -> [Help 1]

Thomas Broyer

unread,
Oct 17, 2013, 9:34:39 AM10/17/13
to codehaus-mojo-gwt-...@googlegroups.com


On Thursday, October 17, 2013 3:27:06 PM UTC+2, pierre.q...@gmail.com wrote:
Hi,

I'm trying to compile GWT with Eclipse and Maven and I'm nearly desesperate to see that after two struggling days, it doesn't work for the moment.
Please let me know if you have any idea on how to resolve this issue.

Thanks !


This is a sample of my pom.xml :

            <!-- GWT Maven Plugin -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>2.5.1</version>
[…] 
[ERROR] Google Web Toolkit 2.0.3


The problem is that you're using the gwt-maven-plugin 2.5.1 with GWT 2.0.3. gwt-maven-plugin 2.5.1 is only supposed to work with GWT 2.5.1.

That said, passing "-XfragmentCount -1" as argument whereas you didn't specify anything in your pom.xml is probably a bug too, but it doesn't seem to be an issue with GWT 2.5.1.

pierre.q...@gmail.com

unread,
Oct 17, 2013, 9:40:03 AM10/17/13
to codehaus-mojo-gwt-...@googlegroups.com
Hi,

I don't understand why GWT 2.0.3 is used.

Above, in my pom.xml, GWT is defined as :

    <properties>
        <!-- Convenience property to set the GWT version -->
        <gwtVersion>2.5.1</gwtVersion>
        <!-- GWT needs at least java 1.5 -->
        <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>${gwtVersion}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwtVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.mgwt</groupId>
            <artifactId>mgwt</artifactId>
            <version>1.1.2</version>
        </dependency>

Any idea ?

Thanks !

Thomas Broyer

unread,
Oct 17, 2013, 9:47:45 AM10/17/13
to codehaus-mojo-gwt-...@googlegroups.com
I'd blame mgwt (though honestly, the real culprits are Maven and GWT, in this order).
Either use an <exclusion>, or explicitly depend on gwt-dev:2.5.1 (with scope=provided) to override the transitive dependency on gwt-dev:2.0.3.

pierre.q...@gmail.com

unread,
Oct 17, 2013, 9:51:40 AM10/17/13
to codehaus-mojo-gwt-...@googlegroups.com
Moreover, my GWT SDK is linked to 2.5.1

A grep in my directory shows :
grep -ri "2.0.3" .
Binary file ./Mobile/target/Mobile-0.0.1-SNAPSHOT/WEB-INF/lib/gwt-dev-2.0.3.jar concordant
Binary file ./Mobile/target/Mobile-0.0.1-SNAPSHOT/WEB-INF/lib/gwt-servlet-2.5.1.jar concordant
Binary file ./Mobile/target/Mobile-0.0.1-SNAPSHOT/WEB-INF/lib/gwt-servlet.jar concordant
Binary file ./Mobile/target/Mobile-0.0.1-SNAPSHOT/WEB-INF/lib/mgwt-1.1.2.jar concordant

But I do not know where gwt-dev-2.0.3 is coming from !


Thomas Broyer

unread,
Oct 17, 2013, 11:46:07 AM10/17/13
to codehaus-mojo-gwt-...@googlegroups.com
"mvn dependency:tree" will tell you, but I'd bet mgwt.
BTW, mgwt should probably have scope=provided.

…and there's no reason for that un-versionned gwt-servlet.jar. You're using M2Eclipse to import your project in Eclipse, aren't you?

Arpit

unread,
Oct 1, 2014, 7:56:28 AM10/1/14
to codehaus-mojo-gwt-...@googlegroups.com
I'm getting same error due to gwt-maps-api (https://github.com/branflake2267/GWT-Maps-V3-Api) dependency.
Solution is to have a dependency on gwt-dev in my own pom with a version I want.

<dependency>
 
<groupId>com.google.gwt</groupId>
 
<artifactId>gwt-dev</artifactId>
 
<version>${gwt.version}</version>
 
<scope>provided</scope>
 
</dependency>

This however, results in a warning "[WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts".
Is there any better way to resolve this issue?

Thomas Broyer

unread,
Oct 1, 2014, 9:00:07 AM10/1/14
to codehaus-mojo-gwt-...@googlegroups.com


On Wednesday, October 1, 2014 1:56:28 PM UTC+2, Arpit wrote:
I'm getting same error due to gwt-maps-api (https://github.com/branflake2267/GWT-Maps-V3-Api) dependency.
Solution is to have a dependency on gwt-dev in my own pom with a version I want.

<dependency>
 
<groupId>com.google.gwt</groupId>
 
<artifactId>gwt-dev</artifactId>
 
<version>${gwt.version}</version>
 
<scope>provided</scope>
 
</dependency>

This however, results in a warning "[WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts".
Is there any better way to resolve this issue?

You could add an exclusion to your gwt-maps-api dependency, or (untested) set the gwt-dev version in your dependencyManagement.

Joseph Lust

unread,
Oct 1, 2014, 6:13:55 PM10/1/14
to codehaus-mojo-gwt-...@googlegroups.com
A known problem fixed for future releases.



- Joe

Brandon Donnelson

unread,
Oct 1, 2014, 6:20:35 PM10/1/14
to codehaus-mojo-gwt-...@googlegroups.com
Nice job. 

Have a good day,
Brandon Donnelson

--
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 http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users.
For more options, visit https://groups.google.com/d/optout.

Arpit Tripathi

unread,
Oct 1, 2014, 7:42:06 PM10/1/14
to codehaus-mojo-gwt-...@googlegroups.com
Exclusion solves the problem! Thanks everyone.
Perhaps we should update the Home page of gwt-maps-api lib (with interim solution) so that new users don't have to go through this painful route of Googling and asking on forums.

~Arpit

--
You received this message because you are subscribed to a topic in the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codehaus-mojo-gwt-maven-plugin-users/VRjRb-nAWYQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codehaus-mojo-gwt-maven-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages