Closed GoogleCodeExporter closed 9 years ago
I'd recommend that we switch across to a brand new scm repo/clone once we have
a working maven config and Gin and Jukito dependencies are in public maven
repo. There is so much bloat in the current repository and unless hg's shallow
copy feature appears soon.. then we'll be shipping around clones that are 99.9%
deprecated binary dependencies. But history would be lost, and merging other
clones onto this one might be difficult... not sure how patches work that
way.... thoughts?
Original comment by ahhug...@gmail.com
on 22 Nov 2010 at 10:54
Don't worry about losing the history of the samples. We'll keep the original
repo around in case anything is needed in there.
We might consider restarting the main repo from scratch at some point, as
recommended by ahhughes.
Original comment by philippe.beaudoin
on 23 Nov 2010 at 2:13
I just finished the porting of samples.
Here: http://code.google.com/r/jgonian-211/source/list you can find related
revisions.
Next step would be to port the unit tests for gwtp-mvp module.
Did anyone managed to review so far?
to try a sample,
hg clone https://jgonian-211.googlecode.com/hg/ gwtp-Issue211
cd gwtp-Issue211
mvn install
cd gwtp-samples/gwtp-sample-basic|tab|hplace|nested
mvn clean gwt:run
good night (GMT+2) :)
-Yannis
Original comment by jgon...@gmail.com
on 23 Nov 2010 at 11:39
I am trying to port the remaining tests but I am facing some issues:
1) There are some classes in gwtp-tester, gwtp-mvp-client and
gwtp-dispatch-server prefixed with Test* (e.g. TestView, TestAction,
TestPlaceManager e.t.c). These classes are not test suites but are marked for
test inclusion since the surefire plugin will automatically select all java
filenames that start with "Test", resulting in "java.lang.Exception: No
runnable methods" exception thrown by junit.
We can either rename these classes (e.g. MyTest*..) or configure surefire
plugin not to include them.
See:
http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusi
on.html
I think that is safe to nail down the name patterns to "**/*Test.java" and
"**/*TestCase.java" but I'd like to hear your opinion.
2) By default, the surefire plugin has assertions enabled at runtime. Thus,
when running PresenterWidgetTest suite there are 4 tests that fail to pass due
to an AssertionError (attached). Is it ok to @Ignore these tests for now and
file an issue about it or would you like to disable the assertions? In my
opinion, it's not right to do the second.
3) What should we do about GWT tests? Currently, PresenterProxyIntegrationTest
is the only GWT test and it is ignored. Should we move on with what we had
discussed here?
https://wave.google.com/wave/waveref/googlewave.com/w+ZYi_Prc-A/~/conv+root/b+8c
BAavKKA
Original comment by jgon...@gmail.com
on 27 Nov 2010 at 3:03
Attachments:
@Yannis, great work . i able to compile without any error . but when i try to
run any sample mvn gwt:run, i get below minor error. gwt-p repository need to
be added in pom.xml . by the way
http://dep.gwt-platform.googlecode.com/hg/release-repository repository is
broken link
1) com.gwtplatform:gwtp-mvp-client:jar:0.4-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.gwtplatform -DartifactId=gwtp-mvp-client -Dversion=0.4-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.gwtplatform -DartifactId=gwtp-mvp-client -Dversion=0.4-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) com.gwtplatform:gwtp-sample-nested:war:0.4-SNAPSHOT
2) com.gwtplatform:gwtp-mvp-client:jar:0.4-SNAPSHOT
Original comment by second.c...@gmail.com
on 28 Nov 2010 at 5:30
Well, gwtp-mvp-client:jar:0.4-SNAPSHOT does not yet exist in any remote
repository. So, first, you have to install it to your local maven repository in
order for the samples to find it.
Try the following:
rm -rf ~/.m2/repository/com/gwtplatform (delete any gwtp related artifacts
from your local maven repo)
cd <into_your_gwtp_clone>/gwtp-core/
mvn clean install
if the build was successful you should be able to run the samples like this:
cd <your_gwtp_clone>/gwtp-samples/gwtp-sample-nested
mvn gwt:run
Please, let me know if it doesn't work for you
Original comment by jgon...@gmail.com
on 28 Nov 2010 at 10:03
[deleted comment]
In addition to comment 54
(http://code.google.com/p/gwt-platform/issues/detail?id=211#c54) one more
serious issue came up:
In order to compile the tests for gwtp-mvn-client I added a dependency on
gwtp-tester and unfortunately a cyclic dependency problem occurred:
gwtp-mvp-client
+- gwtp-tester
\- gwtp-dispatch-client
gwtp-dispatch-client
+- gwtp-mvp-client
(Oups..) gwtp-dispatch-client --> gwtp-mvp-client --> gwtp-tester -->
gwtp-dispatch-client
As we 've discussed before, gwtp-dispatch-client should not depend on
gwtp-mvp-client. In order to resolve this I extracted from gwtp-mvp-client the
common classes (IndirectProvider, ProviderBundle and CodeSplitBundleProvider)
to a new module called gwtp-clients-common. Now the situation looks like:
gwtp-mvp-client
+- gwtp-clients-common
\- gwtp-tester
\- gwtp-dispatch-client
gwtp-dispatch-client
+- gwtp-clients-common
Any ideas/suggestions are welcome.
As soon as I get feedback for these (comments 54 and 57) I will be able to
almost complete this issue. Then it would be possible to merge it and setup
teamcity.
Original comment by jgon...@gmail.com
on 28 Nov 2010 at 3:46
Original comment by philippe.beaudoin
on 29 Nov 2010 at 7:51
@Yannis I'm willing to merge your changes into the trunk as soon as possible so
we can all work from a mavenized version.
I followed your steps, it all works really well.
To answer your questions:
#54
1) Use the "**/*Test.java" and "**/*TestCase.java" patterns. That's what I was
using in the ant file I think.
2) @Ignore and file an issue. I'm not sure why assertions are failing, we
should investigate.
3) I suggest we keep ignore gwt test for now. Let's fix these after.
#58
I think these classes are really client-side utils so I have no problem
extracting them to a new module. Does this solve the problem?
Also, regarding gwtp-tester, I will remove most of it and add a dependency on
jukito instead (which already has its own public maven repo, even though it has
not been published yet).
Some questions of my own:
1) Were you able to use your pom with m2eclipse? In my case, it fails in
gwtp-dispatch-shared/src/test/java and in gwtp-sample-hplace. In both cases,
it's related to annotation processors.
2) Also, I don't know how to run and debug the samples in eclipse. Is there a
way to do this?
Original comment by philippe.beaudoin
on 29 Nov 2010 at 8:20
Just read that you were not using eclipse and were not planning on having the
POM work in eclipse. This is unfortunate as, without eclipse support,
mavenization is a no-go. I must be able to efficiently develop and debug the
samples and the core.
I hope someone with more maven experience will step forward and explain how to
use m2eclipse to debug GWT/GAE apps. So far I have had no luck scouting the
web...
Original comment by philippe.beaudoin
on 29 Nov 2010 at 8:52
It is true that I am not using eclipse as my main IDE and that I was hoping for
someone else with more m2eclipse experience to pop in and describe the working
flow.
In any case I am planning to setup maven-eclipse-plugin in the POM in order to
ease development with eclipse (running mvn eclipse:eclipse will generate the
eclipse project files). I know that most gwtp developers work with eclipse and
eclipse support is essential.
By the time I close all remaining issues I will give it a shot and post the
results.
I will be very surprised if we can't figure it out since eclipse works well
with maven and theoretically anything you can do via console you should be able
to do it within eclipse
(http://maven.apache.org/guides/mini/guide-ide-eclipse.html)
Original comment by jgon...@gmail.com
on 29 Nov 2010 at 9:06
In order to use Eclipse efficiently you need to install the Google Eclipse
Plugin or use 'mvn gwt:debug' together with Java Remote Debuging.
The Maven Eclipse Plugin may also be setup to activate the Google Eclipse
Plugin.
The Maven eclipse:m2eclipse support is deprecated, you are to use the M2Eclipse
Eclipse Plugin.
When using Maven together with Eclipse/NetBeans, you should not check-in the
.project/.classpath files etc. - have them generated by Maven.
The Unit-Tests are failing because Ant runs by default with assertions disabled
and Maven runs with assertions enabled. This also means that those failing
tests are pretty much bogus at the moment. Therefor you should just add @Ignore.
I think, in order to activate assertions for ant, you need to add
<assertions>
<enable/>
</assertions>
to the JUnit task, and make sure fork="true" is set.
Original comment by kuhnro...@gmail.com
on 29 Nov 2010 at 9:20
I'm successfully using maven and eclipse for my GWT projects. Feel free to take
a look at my POMs:
Super POM with global settings:
http://code.google.com/p/pehl-parent/source/browse/trunk/pom.xml
Super POM for Piriti:
http://code.google.com/p/piriti/source/browse/trunk/pom.xml
Piriti Core module (framework character):
http://code.google.com/p/piriti/source/browse/trunk/core/pom.xml
Piriti Sample module (GWT App deployed on AppEngine):
http://code.google.com/p/piriti/source/browse/trunk/sample/pom.xml
Hope that helps!
Original comment by harald.pehl
on 29 Nov 2010 at 9:21
@harald.pehl Thanks for these userful resources. Out of curiosity, how are you
launching your GWT App (Piriti Sample module) for debugging in eclipse?
@kuhnroyal The mvn:debug method you propose could work and Java Remote
Debugging could work but it seems a bit tedious. I was hoping to use an
approach such as the one described here:
http://mojo.codehaus.org/gwt-maven-plugin/user-guide/comfortable_debugging.html
but so far, no luck.
Original comment by philippe.beaudoin
on 29 Nov 2010 at 9:45
@philippe.beaudoin:
I'm using the Google Plugin for Eclipse to launch the sample application.
Before I can launch it I have to execute mvn package once. By executing this
goal the webapp is build in target/${project.build.finalName}. This folder is
then selected as value for the -war parameter of AppEngineLauncher (you can see
the details when looking at the relevant launch configuration).
This is the only drawback I noticed. It's only relevant for GWT applications.
For framework projects like GWTP or Piriti I'm confident with my setup.
As a general rule of thumb I would recommend to use maven for the dependency
stuff, IDE independence, continous integration and do the rest with the IDE /
Google Eclipse plugin
Original comment by harald.pehl
on 29 Nov 2010 at 10:08
@harald.pehl This is indeed exactly the solution I'm looking for, and it feels
that I'm almost there. (Thanks again for the great references.) Now the only
thing that seems to be missing is GWT complainging about:
Missing required argument 'module[s]'
Indeed, when I look at the configuration of the Google Eclipse Plugin, I don't
see any GWT module and I don't have the option to select one. My module is in
src/main/resources/com/gwtplatform/samples/basic/Gwtpsample.gwt.xml and in my
pom I set it up like that:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<configuration>
<server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
<port>8888</port>
<runTarget>gwtpsample/Gwtpsample.html</runTarget>
<webXml>src/main/webapp/WEB-INF/web.xml</webXml>
<module>com.gwtplatform.samples.basic.Gwtpsample</module>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
But I don't think this would set it up in eclipse... And by looking at your POM
I never find any place where you specify the GWT module to eclipse. Am I
missing something?
Original comment by philippe.beaudoin
on 29 Nov 2010 at 10:46
@philippe.beaudoin:
That's right I didn't specify any GWT modules. Instead I configured the
maven-eclipse-plugin to use the natures "com.google.gwt.eclipse.core.gwtNature"
and "com.google.appengine.eclipse.core.gaeNature". After importing the projects
into eclipse, I selected "Run As -> Web Application" and eclipse listed the
available GWT modules.
On the other hand I found the file
".settings/com.google.gwt.eclipse.core.prefs" where you can specify an entry
point. Up to now I didnt't used that, but it seems worth to give it a try:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
<useProjectReferences>true</useProjectReferences>
<classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
<classpathContainer>com.google.gwt.eclipse.core.GWT_CONTAINER</classpathContainer>
<classpathContainer>com.google.appengine.eclipse.core.GAE_CONTAINER</classpathContainer>
</classpathContainers>
<additionalBuildcommands>
<buildcommand>com.google.gwt.eclipse.core.gwtProjectValidator</buildcommand>
</additionalBuildcommands>
<additionalProjectnatures>
<projectnature>com.google.gwt.eclipse.core.gwtNature</projectnature>
<projectnature>com.google.appengine.eclipse.core.gaeNature</projectnature>
</additionalProjectnatures>
<additionalConfig>
<file>
<name>.settings/com.google.gwt.eclipse.core.prefs</name>
<content><![CDATA[
eclipse.preferences.version=1
entryPointModules=com.gwtplatform.samples.basic.Gwtpsample
]]></content>
</file>
</additionalConfig>
<excludes>
<exclude>com.google.gwt:gwt-dev</exclude>
<exclude>com.google.gwt:gwt-user</exclude>
<exclude>com.google.appengine:appengine-api-1.0-sdk</exclude>
<exclude>com.google.appengine:appengine-api-labs</exclude>
<exclude>com.google.appengine:geronimo-jpa_3.0_spec</exclude>
<exclude>com.google.appengine.orm:datanucleus-appengine</exclude>
<exclude>org.datanucleus:datanucleus-core</exclude>
<exclude>org.datanucleus:datanucleus-jpa</exclude>
<exclude>javax.jdo:jdo2-api</exclude>
<exclude>javax.transaction:jta</exclude>
<exclude>org.apache.geronimo.specs:geronimo-jpa_3.0_spec</exclude>
<exclude>org.apache.geronimo.specs:geronimo-servlet_2.5_spec</exclude>
</excludes>
</configuration>
</plugin>
Original comment by harald.pehl
on 29 Nov 2010 at 11:17
@harald.pehl
With the current version of the Google Eclipse Plugin you don't have to perform
a mvn package before launching it. It is all a matter of the correct
configuration.
The file ".settings/com.google.gwt.eclipse.core.prefs" is automatically created
the first time you launch the Google Eclipse Plugin.
@philippe.beaudoin
The Google Eclipse Plugin has nothing to do with the gwt-maven-plugin. The
setup of either one should not have any effect on the other.
It works all very well together if setup correctly, you should have a look at a
Spring Roo generated project, in there is pretty much all you need.
It is best to use the gwt-maven-plugin from the google-svn directly, not the
one from maven central:
http://code.google.com/p/google-web-toolkit/source/browse/#svn/2.1.0/gwt/maven/o
rg/codehaus/mojo/gwt-maven-plugin/1.3.2.google
There are also problems with older versions of the Google Eclipse Plugin, you
could try a fresh Eclipse/Spring STS installation with the latest Google
Eclipse Plugin.
I don't have the time at the moment else I would create a sample project for
you.
I'll try to find a pom for a correct setup.
Original comment by kuhnro...@gmail.com
on 29 Nov 2010 at 11:25
Thanks everyone for the feedback and the useful resources. I will try to
resolve remaining issues asap, so we can then focus on setting up
maven-eclipse-plugin properly.
Original comment by jgon...@gmail.com
on 29 Nov 2010 at 11:44
I attached a POM that includes all relevant parts.
gwt-maven-plugin:
mvn gwt:run or gwt:debug
jetty-plugin:
start GWT DevMode with noserver=true, this for example allows me to run DevMode
with WebSocket support
You should add everything you need to your POM, especially the
maven-eclipse-plugin section, after that delete the project from the workspace
and delete .project/.classpath/.settings. Now in Eclipse: Import -> Existing
Maven Project
This should correctly setup everything.
Original comment by kuhnro...@gmail.com
on 29 Nov 2010 at 11:48
Attachments:
Just pushed my latest revisions to
http://code.google.com/r/jgonian-211/source/list.
DONE:
* Ported all the source code to maven (including tests).
* Added new module: gwtp-clients-common (needs review)
* Ignored failing tests in gwtp-mvp-client
(http://code.google.com/p/gwt-platform/issues/detail?id=266)
TODO:
* maven-eclipse-plugin
* maven-checkstyle-plugin
* maven-source-plugin
* maven-javadoc-plugin
* upload custom compiled dependencies to a public repo
* setup teamcity
* revisit dependencies
Minor (for now):
* add copyright notice and reporting info in parent POM
* port spring-basic-sample-spring (not working in trunk)
* gwttest
Original comment by jgon...@gmail.com
on 30 Nov 2010 at 12:43
Hello everyone,
Well, setting up the project in eclipse with maven, gwt, gae, checkstyle, and
annotation processing proved little more trickier than I initially though. Yet,
I made some progress.
You can review latest revisions in
https://code.google.com/r/jgonian-211/source/list.
So far (as per rev:6be93ae366) I am able to launch sample projects in dev mode,
with (or without) AppEngineLauncher from inside eclipse or from the console.
I also made first iterations on checkstyle and annotation processing in eclipse
but I am not quite there yet.
To setup the project in eclipse:
1. mvn install
2. ensure you have configured eclipse to use App Engine SDK v1.4.0 and Web
Toolkit SDK v2.1.0
3. Import > Existing Maven Project
4. mvn eclipse:eclipse
5. refresh your workspace (F5)
6. right-click a sample > Run as > Web Application
7. enjoy
If you import all modules in the same workspace and run into problems while
running the samples you can try any of the following:
- try close/reopen all projects in your workspace after running eclipse:eclipse
- eclipse:clean will delete files created by eclipse:eclipse mojo
- import gwtp-samples in a separate workspace since problems from gwtp-core may
interfere with samples
e.g. I noticed that eclipse includes in the classpath test scoped dependencies,
resulting in errors like:
01:06:22.898 [ERROR] [gwtpsample] Line 39 No source code is available for type
org.jukito.JukitoModule; did you forget to inherit a required module?
which should never happen since jukito is a test dependency.
gn,
Original comment by jgon...@gmail.com
on 6 Dec 2010 at 11:35
Thanks a lot Yannis! I will be working on this issue later this week.
Let me know if there is any specific area you want my help on, or if
you'd like us to do a pair programming session.
Original comment by philippe.beaudoin
on 7 Dec 2010 at 12:36
Philippe,
could you please upload the custom compiled dependencies to a public repo?
(maybe here? https://maven.gwt-platform.googlecode.com/hg/)
- com.google.gwt:gwt-gin:1.0-r137:jar
- net.sourceforge.htmlunit:crawl_htmlunit:r5662-gae:jar
Then I'll be able to remove the last checked in binaries from my clone's tip
(this one might help: http://code.google.com/p/gwt-platform/issues/detail?id=51)
Help is always welcome. I will track remaining work and let you know.
Pair programming session sounds interesting and fun, If we could arrange it for
a weekend (overloaded weekdays).
Original comment by jgon...@gmail.com
on 7 Dec 2010 at 11:06
Hello everyone,
last week I tried to setup checkstyle and annotation processing. I nailed
checkstyle down this time but I gave up on annotation processing. I will
describe the problem just in case someone comes up with an idea.
Our processors reside within the sources of gwtp-dispatch-shared and a test
exists (AnnotationProcessingTest) that uses the generated sources.
Maven-wise all that is needed to run the test is to setup
maven-processor-plugin to execute process-test goal in generate-test-sources
lifecycle phase. This will generate required sources before running the test.
The problem arises when I import gwtp-dispatch-shared in my eclipse workspace.
I found that maven-eclipse-plugin invokes the execution of the lifecycle phase
generate-resources prior to executing itself. But generate-test-resources comes
after that. Thus, process-test will not run and eclipse will report problems
like: "FooChangedEvent cannot be resolved to a type" because sources do not
exist. In fact, neither the sources have been generated, nor the classpath
contains the output directory of the generated sources.
The obvious answer is to execute process-test in a prior phase e.g.
generate-sources. Unfortunately, this is not possible with
maven-processor-plugin since it will try to find the processor class which has
not been compiled yet resulting in: "Annotation processor
'com.gwtplatform.dispatch.annotation.processor.GenDtoProcessor' not found"
error.
I found a similar issue here http://jira.codehaus.org/browse/MCOMPILER-97 but I
couldn't find my way out of it. Maybe this is a bug of maven-processor-plugin.
In other words, a working sequence of goals is: mvn compile
processor:process-test eclipse:eclipse
Having imported the project in eclipse and running this command should resolve
annotation processing problems in eclipse.
I tried also a different setup approach with .factorypath and
.settings/org.eclipse.jdt.apt.core.prefs that can be found (commented out) in
the maven-eclipse-plugin configuration in gwtp-dispatch-shared. I managed to
create a view similar to this one:
http://code.google.com/p/gwt-platform/wiki/BoilerplateGeneration#Eclipse but my
eclipse doesn't generate anything... Can anyone experienced in
maven-eclipse-plugin and annotation processing troubleshoot this one as an
alternative to maven-processor-plugin?
Did anyone tried to develop with the new mavenized version? I am afraid that we
should close this issue before any more changes are committed to trunk.
Original comment by jgon...@gmail.com
on 13 Dec 2010 at 10:41
Looks good, I think this is the best you can do with maven, I didn't find a
better solution either. Well I did, it's called Gradle :)
Getting it to work in Eclipse can not be automated as far as I know. After the
import in eclipse you should try a "Run As" -> "Maven compile/test" and then an
"Update Maven Configuration". I think I also added the generation classpath
manually as source path after the import.
If you run eclipse:eclipse then you might as well uninstall M4Eclipse, so that
is not a solution.
Another thing... imo the processor and the annotations should not be part of
the shared module since they are not needed at runtime nor at GWT compilation.
Original comment by kuhnro...@gmail.com
on 13 Dec 2010 at 11:23
I got a little confused. What I attempted to achieve was to connect annotation
processors and eclipse by simply running mvn eclipse:eclipse as I did with
checkstyle. What do you mean by saying that I might uninstall M4eclipse (did
you mean m2eclipse?) if I run eclipse:eclipse? I am not that familiar with
eclipse so I apologize If I misunderstood what you are saying.
Regarding the module I agree with you, but I did as per comment 35. Let's
create a fully working mavenized project and then we can revisit modules and
their dependencies.
Original comment by jgon...@gmail.com
on 14 Dec 2010 at 12:31
Superb job, Yannis. I'm playing around with your latest version right now.
I notice that you configured maven-eclipse-plugin and recommend using
eclipse:eclipse. I would rather target m2eclipse. From what I see there is an
eclipse:m2eclipse target, do you think we could use this instead?
@kuhnroyal What are the advantages/drawbacks of splitting processors &
annotations in a different module? Could we get rid of the staggered
compilation problem if they were in a totally separate module?
Original comment by philippe.beaudoin
on 14 Dec 2010 at 12:40
Ooops. Scratch that. It seems maven-eclipse-plugin and m2eclipse are not meant
to be interoperable. See:
http://maven-users.828.n2.nabble.com/searching-for-eclipse-m2eclipse-td4743556.h
tml
I'm looking for an m2eclipse-only solution...
Original comment by philippe.beaudoin
on 14 Dec 2010 at 12:44
Interesting thread on this:
http://maven.40175.n5.nabble.com/Preparing-for-M2Eclipse-1-0-amp-no-support-for-
the-maven-eclipse-plugin-td139921.html
Original comment by philippe.beaudoin
on 14 Dec 2010 at 12:46
Checkstyle with m2eclipse:
http://code.google.com/p/m2e-extensions/wiki/Checkstyle
(Sorry for link spamming, thought it might be useful...)
Original comment by philippe.beaudoin
on 14 Dec 2010 at 12:50
Yes sorry I was talking about m2eclipse ofcourse.
Well eclipse:eclipse generates a static .classpath file, in which everything is
hardwired, this is meant to be used if you do not use m2eclipse. m2eclipse and
eclipse:m2eclipse generates a dynamic .classpath file which uses the Maven
dependency container. So you should decide to use either one of these approches
but not combine them. Optimal would be to allow for both ways, they both use
the maven-eclipse-plugin section of the pom.xml for setup.
Also, as far as I know, eclipse:m2eclipse has been deprecated. It is advised to
use m2eclipse inside Eclipse directly.
@philippe Well, the processor is for compile-time only, so I just don't see it
belonging in a server package. Also, if it is in a separate module, you may as
well use it to generate GWTP's own events. What staggered compilation problem
are you referring to?
Original comment by kuhnro...@gmail.com
on 14 Dec 2010 at 1:01
Okay well, it was deprecated for a while, now it has been removed :)
Thanks for the link pilippe.
Original comment by kuhnro...@gmail.com
on 14 Dec 2010 at 1:05
BTW, Yannis, running
mvn install
On your latest repo leads to the following error on my machine:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-checkstyle-plugin:2.6:checkstyle (validate) on
project gwtp: Execution validate of goal
org.apache.maven.plugins:maven-checkstyle-plugin:2.6:checkstyle failed: Plugin
org.apache.maven.plugins:maven-checkstyle-plugin:2.6 or one of its dependencies
could not be resolved: Failure to find
com.gwtplatform:gwtp-build-tools:jar:0.5-SNAPSHOT in
http://download.java.net/maven/2/ was cached in the local repository,
resolution will not be reattempted until the update interval of
maven2-repository.dev.java.net has elapsed or updates are forced -> [Help 1]
Original comment by philippe.beaudoin
on 14 Dec 2010 at 1:55
Good morning,
Thanks both for your feedback. I will come back on this later in the day.
Philippe, try to install gwtp-build-tools in your local repo (cd
gwtp-build-tools; mvn clean install) prior running mvn clean install in gwtp.
Seems a dependency problem. I will fix it later.
Original comment by jgon...@gmail.com
on 14 Dec 2010 at 7:21
Ok, now I understand why we need mvn eclipse:eclipse. I don't think we can work
around this and it's a minor annoyance. It is not supposed to work with
m2eclipse, but it looks like it does and I've seen others use it in this way.
(We get a nasty comment in the .project files: <comment>NO_M2ECLIPSE_SUPPORT:
Project files created with the maven-eclipse-plugin are not supported in
M2Eclipse.</comment>)
The alternative (writing some m2eclipse extensions for GAE and GWT? Figuring
out how to get the m2eclipse-eclipse-cs extension to work?...) is not really
appealing. Maybe if we have some time later, but now I'm happy with anything
that works.
I have spent some time fixing the dependency problem that caused mvn install to
fail. I have also switched to the following checkstyle nature which is the one
that comes with eclipse-cs:
net.sf.eclipsecs.core.CheckstyleNature
(Get it from http://eclipse-cs.sourceforge.net/)
It seems to replace com.atlassw.tools.eclipse.checkstyle.CheckstyleNature
You can apply the attached patch to your clone's root to get this.
A couple of details:
- To test, follow your process (mvn install, import with m2eclipse, mvn
eclipse:eclipse, refresh)
- We often repeat the entire configuration of maven-eclipse-plugin in the
sample's poms. We could probably move most of the boilerplate to a
<pluginManagement> section of the gwtp-samples pom. What do you think?
- There seems to be some refresh problem with the annotation processor in
eclipse. You may need to open "Properties > Java Compiler > Annotation
Processing" then uncheck/recheck some checkbox in there.
- Sometimes eclipse hangs for a very long time on a "validating ..." message,
not sure why.
- Running a sample from eclipse is very very slow, not sure why.
- Some samples cause strange GWT errors upon running (related to Jukito) there
must be something wrong in the classpath.
Let me know if you work on this.
Original comment by philippe.beaudoin
on 14 Dec 2010 at 10:26
Attachments:
Just some precision: the patch fixes not only checkstyle nature, but also all
the annotation processor problems.
Original comment by philippe.beaudoin
on 14 Dec 2010 at 10:28
@pilippe m2eclipse works fine with GAE and GWT, the problem is the annotation
processing.
Once GWT has compiled some js files, eclipse will start validating them - so
deactivate javascript validation.
Original comment by kuhnro...@gmail.com
on 14 Dec 2010 at 12:23
[deleted comment]
Just a quick (inline) reply to comment 87
(http://code.google.com/p/gwt-platform/issues/detail?id=211#c87),
"I have spent some time fixing the dependency problem that caused mvn install
to fail. I have also switched to the following checkstyle nature which is the
one that comes with eclipse-cs:
net.sf.eclipsecs.core.CheckstyleNature
(Get it from http://eclipse-cs.sourceforge.net/)
It seems to replace com.atlassw.tools.eclipse.checkstyle.CheckstyleNature
You can apply the attached patch to your clone's root to get this."
I haven't tried it yet but Its appreciated. I will apply it as soon as I get
the chance.
"A couple of details:
- To test, follow your process (mvn install, import with m2eclipse, mvn
eclipse:eclipse, refresh)
- We often repeat the entire configuration of maven-eclipse-plugin in the
sample's poms. We could probably move most of the boilerplate to a
<pluginManagement> section of the gwtp-samples pom. What do you think?"
I have already tried this but it seems that is not possible since we need to
specify entryPointModules in .settings/com.google.gwt.eclipse.core.prefs for
each sample separately. This means that configuration from a parent
PluginManagement declaration will be overridden. That is why I repeat all the
boilerplate configuration in each sample. I 'll try it again just to be sure..
"- There seems to be some refresh problem with the annotation processor in
eclipse. You may need to open "Properties > Java Compiler > Annotation
Processing" then uncheck/recheck some checkbox in there."
yes, I noticed this as well but I couldn't reproduce it consistently.
"- Sometimes eclipse hangs for a very long time on a "validating ..." message,
not sure why."
I think this is happening because it cannot resolve
http://www.puppycrawl.com/dtds/configuration_1_3.dtd in doctype of
gwtp-checkstyle.xml
"- Running a sample from eclipse is very very slow, not sure why."
It is slow, but only for the first time (until the sample app loads). Are you
referring to something else?
"- Some samples cause strange GWT errors upon running (related to Jukito) there
must be something wrong in the classpath."
I believe this is happening because eclipse does not separate (exclude) test
dependencies from the classpath due to useProjectReferences option that is true
by default
(http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html#useProje
ctReferences). If we choose to turn this option off, a mvn install will be
required in order to communicate any changes between modules (maybe we should
set it to false just for the samples)
"Let me know if you work on this."
No, currently I am not. I spend as much time as I can on this but unfortunately
my spare time pool is very limited.
- Yannis
PS. sorry for the previous reply via email..
Original comment by jgon...@gmail.com
on 14 Dec 2010 at 12:53
@kuhnroyal The goal of the mvn eclipse:eclipse target is to add the GAE and GWT
nature to the .project, as well as configure these. Without it, users would
have to do a lot of manual configuration in eclipse. The mechanism proposed by
@harald.pehl and implemented by @jgonian (open in m2eclipse, then run
eclipse:eclipse) is documented elsewhere on the web and it's the best I've been
able to achieve.
My take away message here: maven+eclipse integration is still not mature enough
for the case where you require a couple of eclipse plugins. :(
@jgonian
Please don't get my question wrong! I'm very very grateful for the hard work
you did on this issue. I just wanted to make sure we are not interfering too
much. :)
Re: Moving maven-eclipse-plugin to <pluginManagement>
Ok, this will need more exploration. It's not a priority.
Re: Missing DTDs
Makes sense. We should try dropping the missing DTDs (or finding the good URLs)
since this is quite annoying.
Re: Slowness of execution
It seemed unusually slow. Might have to do with missing DTDs though.
Re: Test dependencies in samples.
I'm fine turning useProjectReferences off for samples. This is the way they
were working before (you needed to ant build GWTP's jars). I think it's fine to
ask for a "mvn install" now. (An alternative might be to use eclipse:eclipse
<sourceExcludes> but I'm not sure it works for project references.)
Re: Merging into trunk
I believe that, in its current state, mavenization is usable enough that we can
merge it into the trunk. I will try to do it tonight (PST). After that we'll
solve the remaining quirks right there and hopefully have GWTP 0.5 out just in
time for christmas!
Original comment by philippe.beaudoin
on 14 Dec 2010 at 4:19
Well, in my projects GWT and GAE setup works without the eclipse:eclipse goal,
m2eclipse reads the pom section of the maven-eclipse-plugin the same way and
configures everything correctly.
Original comment by kuhnro...@gmail.com
on 14 Dec 2010 at 4:32
You're right! The GWT and GAE configurations are found automatically without
the need for eclipse:eclipse.
Unfortunately, checkstyle and annotation processors are not configured
automatically, however... So it seems we will have to rely on eclipse:eclipse
for part of the setup.
Original comment by philippe.beaudoin
on 14 Dec 2010 at 5:05
Attached is a patch that solves:
- DTD problem (Included DTD in gwtp-build-tools, the URL seems unreliable)
- Slow sample start problem (Removed useProjectReferences)
Still remaining:
- Eclipse does not refresh annotation processor status correctly for
gwtp-dispatch-shared
Apply this patch on top of the previous one.
Documentation (to put in the wiki at some point):
cd gwtp-Issue211
mvn clean eclipse:clean
mvn install
* File > Import > Maven > Existing Maven Project
* Root Directory: .../gwtp-Issue211
* Projects: Check all
* Wait until console outputs terminates
mvn eclipse:eclipse
* Wait until the previous command completes
* Select all projects, hit F5 to refresh
* Wait until console outputs terminates
## BEGIN Fix for annotation processor bug in gwtp-dispatch-shared ##
* Right-click on gwtp-dispatch-shared > Properties > Java Compiler > Annotation
Processing
* Select [X] Enable project specific settings
* Select [X] Enable annotation processing
* Select [X] Enable processing in editor
* Generated source directory: target/generated-sources/apt-test
* Java Compiler > Annotation Processing > Factory Path
* Select [X] Enable project specific settings
* [Add Variable...]
* M2_REPO [Extend]
* com/gwtplatform/gwtp-processors/0.5-SNAPSHOT/gwtp-processors-0.5-SNAPSHOT.jar
## END fix for annotation processor bug in gwtp-dispatch-shared ##
* Right-click on gwtp-sample-????? > Run As > Web Application
Original comment by philippe.beaudoin
on 14 Dec 2010 at 8:58
Attachments:
You did well that you post this Philippe and I was lucky to check my mail just
before committing my changes regarding DTD problem and useProjectReferences..
We did exactly the same :)
I have one question for your first patch. Did you intentionally didn't move
processors' tests from
gwtp-dispatch-shared>src/test/com/gwtplatform/dispatch/annotation to
gwtp-processors or you overlooked it?
Now, I will work on porting basicsample-spring and then I will push the changes
including your patches.
Original comment by jgon...@gmail.com
on 14 Dec 2010 at 10:00
I did it intentionally because I read somewhere (couldn't find it now) that
eclipse processors and test worked better as separate projects. Plus I thought
it may solve your previous problem.
That said, processor tests in gwtp-dispatch-shared do look a bit weird. Maybe
we could have a gwtp-processors-test? Or if you figure out a way of having them
run in eclipse whithin the same project we could do that.
As soon as your branch is in sync with the trunk, I'll merge it into the trunk.
Original comment by philippe.beaudoin
on 14 Dec 2010 at 10:19
I pushed latest revisions (incl Plilippe's patches) on
https://code.google.com/r/jgonian-211/source/list.
I ported basicspring sample to maven structure and setup maven-eclipse-plugin
and gwt-maven-plugin but I definitely missing a part of the puzzle because when
I run the sample it fails with
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named
'dispatch' is defined.. If someone feels like fixing it, please go ahead. I am
too tired to deal with it right now so I am calling it a day..
gn
Original comment by jgon...@gmail.com
on 15 Dec 2010 at 12:40
Thanks Yannis!
Attached is a patch that solves the problem with spring. (It works, but I wish
I knew what I was doing... ;))
I'm bringing this over to trunk right away. Still to do:
- Update the documentation on how to build gwtp and how to run/debug it in
eclipse.
- Update the CI server to use maven
- Unleash the power of Maven!
- Build fail on checkstyle errors
- Automatically generate javadoc (issue 178)
- Automatically deploy all samples on AppEngine (issue 105)
Then we can even consider things like adding static code analysis (FindBugs or
PMD).
Original comment by philippe.beaudoin
on 15 Dec 2010 at 5:12
Attachments:
Also:
- Remove AUTHORS file, add them to the main pom.xml
Original comment by philippe.beaudoin
on 15 Dec 2010 at 5:16
Original issue reported on code.google.com by
philippe.beaudoin
on 22 Sep 2010 at 4:54