Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rc7 devmode vs rc8 devmode #95

Closed
Waxolunist opened this issue Oct 9, 2017 · 6 comments
Closed

rc7 devmode vs rc8 devmode #95

Waxolunist opened this issue Oct 9, 2017 · 6 comments

Comments

@Waxolunist
Copy link

When starting devmode from the reactor project with following line rc7 works and rc8 not:

mvn gwt:devmode -pl <gwt-app-projectname> -am 

With rc8 I get following error:

[WARNING] Error: Could not find or load main class com.google.gwt.dev.DevMode

The difference is in the classpath:

rc7 classpath:

<projectpath>/<gwt-app>/src/main/java:
<projectpath>/<gwt-app>/target/generated-sources/annotations:
<projectpath>/<gwt-lib>/src/main/java:
<projectpath>/<gwt-lib>/target/generated-sources/annotations:
<projectpath>/<gwt-app>/target/<gwt-app>/WEB-INF/classes:
<home>/.m2/repository/com/google/gwt/gwt-dev/2.8.1/gwt-dev-2.8.1.jar:<home>/.m2/repository/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar:
<all other maven deps>

rc8 classpath:

<projectpath>/<gwt-app>/src/main/java:
<projectpath>/<gwt-app>/target/generated-sources/annotations:
<projectpath>/<gwt-lib>/src/main/java:
<projectpath>/<gwt-lib>/target/generated-sources/annotations:
<projectpath>/<gwt-app>/target/<gwt-app>/WEB-INF/classes:

In rc8 all maven jars are missing.

@tbroyer
Copy link
Owner

tbroyer commented Oct 9, 2017

Could it be a dupe of #91? I haven't gotten to release a rc9 yet.

@Waxolunist
Copy link
Author

Waxolunist commented Oct 10, 2017

That is maybe the same. I just tested with 1.0-SNAPSHOT and I get following error

[ERROR] Failed to execute goal net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT:add-super-sources (default-add-super-sources) on project gwt-common: Execution default-add-super-sources of goal net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT:add-super-sources failed: An API incompatibility was encountered while executing net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT:add-super-sources: java.lang.NoSuchMethodError: org.codehaus.plexus.util.StringUtils.isBlank(Ljava/lang/String;)Z

I am using maven 3.3.9, the latest on debian stable

@tbroyer
Copy link
Owner

tbroyer commented Oct 10, 2017

Could you run Maven with debug logs (mvn -X) and isolate the portion where it populates the class realm for the plugin? (should begin with a line like “[DEBUG] Populating class realm plugin>net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT”, the lines above should be in "tree" view, the lines below the flat list of dependencies added to the plugin classloader)

@Waxolunist
Copy link
Author

Waxolunist commented Oct 10, 2017

I ran now the devmode with -X option on java 8 and maven 3.3.9:

Populating class realm extension>net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT
[DEBUG]   Included: net.ltgt.gwt.maven:gwt-maven-plugin:jar:1.0-SNAPSHOT
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:1.1
[DEBUG] Extension realms for project com.payolution:gwt-common:gwt-lib:1.10.0-SNAPSHOT: [ClassRealm[extension>net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT, parent: sun.misc.Launcher$AppClassLoader@5c647e05]]
[DEBUG] Created new class realm project>com.payolution:gwt-common:1.10.0-SNAPSHOT
[DEBUG] Populating class realm project>com.payolution:gwt-common:1.10.0-SNAPSHOT
[DEBUG] Looking up lifecyle mappings for packaging gwt-lib from ClassRealm[project>com.payolution:gwt-common:1.10.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]
[DEBUG] Extension realms for project com.payolution:collection-portal-ui:gwt-app:1.6.0-SNAPSHOT: [ClassRealm[extension>net.ltgt.gwt.maven:gwt-maven-plugin:1.0-SNAPSHOT, parent: sun.misc.Launcher$AppClassLoader@5c647e05]]
[DEBUG] Looking up lifecyle mappings for packaging gwt-app from ClassRealm[project>com.payolution:gwt-common:1.10.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]
[INFO] ------------------------------------------------------------------------

The isBlank method exists only since 1.5.2

@tbroyer
Copy link
Owner

tbroyer commented Oct 10, 2017

OK, so, plexus-utils 1.1 is automatically added by Maven when it doesn't find plexus-utils as a dependency of the plugin (backwards compat' with Maven 1 (sic!)). This means your POM for the gwt-maven-plugin is corrupt. Clean your local repo and/or force redownload with -U (might not redownload, might only check for new version, and thus keep your corrupt POM)

@tbroyer tbroyer closed this as completed Oct 10, 2017
@Waxolunist
Copy link
Author

You are right. I was missing the pom file. Somehow nexus did not download the pom file.
I can now confirm, that devmode is working for me with rc7 and 1.0-SNAPSHOT but not rc8.
I will now use the snapshot version and as soon as rc9 is released will use that one.
Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants