GWT designer doesn't work with Maven-GWT project - eclipse

I just started a GWT project with environment:
Eclipse Helios
google plugin for Eclipse 3.6
maven2 plugin for eclipse
Gwt designer for eclipse 3.6
The project is created by gwt-maven-plugin. The project can run in dev mode. But GWT Designer doesn't work for client GUI class. I removed Maven dependencies for GWT and directly import Eclipse GWT SDK, GWT Designer starts working for client GUI class. But it still doesn't work for UiBuilder template file.
The error message is :
UIBinder template should be in client package.
You are attempting to use UiBinder for /hsp-web/src/main/java/com/hs/hspweb/client/ui/UserListViewImpl.ui.xml, however it is not in GWT client package.

Go to "Java build path" in project properties, click on
"YourProjectName/src/main/resources" -> "Excluded: **"
entry and press "Remove" button. It should change to "Excluded: (None)"
Then, you will be able to open GWT designer.

I found the solution here.
http://mojo.codehaus.org/gwt-maven-plugin/eclipse/google_plugin.html
A restriction of this plugin is that it will search for gwt modules and host pages only in the first classpath source folder. Using a Maven / Eclipse integration like m2eclipse, this one will be your sourceDirectory (src/main/java). You'll have to move your gwt.xml files in this folder, instead of the standard Maven resource directory. See Google Eclipse Plugin issue #1597.

Related

I developed an eclipse editor using ecllipse-rcp concepts .My requirement is to build the project using maven

I developed an eclipse editor using eclipse-rcp concepts .My requirement is to build the project using maven.
So i wrote the pom with packaging type=bundle using apache felix concepts.
After building the project, the project jar has the class files,plugin.xml and the manifest file.
Now, I am dropping this jar in plugins folder of eclipse.I want to open files of a certain extension with this editor. But my eclipseis not showing my editor name in the Internal/External editor list, even though the plugin is the plugins folder of eclipse.
Please help.
If you want to build Eclipse plug-ins with Maven, you should use Tycho: https://www.eclipse.org/tycho/. It provides specific packaging types for handling Eclipse plugins and features (groups of plugins).

how can I create maven Gwt project?

Hello friends I have not so much Idea about maven build tool. I just download and install it in my system as I read maven is a build tool and work perfectly with transitive dependency. this is the basic reason to use it
I also configure mavan plugin in Eclipse.
so what is the proper Gwt maven archetype in eclipse and I read so many command in tutorials like maven:gwt run but I dont to where is this command exist in eclipse
I am very new in maven so please help me like a beginner
This is a common approach to get support of maven in existing GWT-Project
Make a gwt project by using the gwt plugin in Eclipse. Now you have
an Eclipse gwt project.
Select the project in Project Explorer , right-click it, then choose
Configure . Then select Convert to Maven Project . Now you get a
gwt-maven project.
Now add necessary dependencies to pom.xml .
if you want to create a gwt maven project directly you need to choose gwt archetype if not exist you can add this have a look in
this video
You should:
Download the gwt plugin in Eclipse and create a gwt project.
In Eclipse select the project, right-click on it, then choose Configure. Then select Convert to Maven Project.
Now you get a gwt-maven project.

Eclipse Juno, maven project not able to run on server

I upgraded to Eclipse Juno(for Java EE developers). I installed Maven Integration for Eclipse through marketplace.
Just to test, I created a web app using maven-archetype-webapp. I cannot run on server(There's no menu Run On Server). The same happens with another maven project which runs fine using Eclipse Indigo. A tried deleting .settings, .classpath, .project then re-importing the project but nothing. I was hoping so much on Juno!
Does anyone know a real solution to this problem?
May be Dynamic Web Module in Project Facet is not selected
Go to :- Project > Properties > Project Facets > check Dynamic Web Module
How about installing the m2e-wtp plugin and trying? You would want to confirm that the maven project is of war packaging as well.
Run on server is not a maven feature, it's a "classic eclipse" feature.
In order to run a maven project on a server you must adopt a plug-in (e.g a Jetty plug-in for your webapp) and the run the proper maven goal (e.g jetty-run).
Said this, you can run a web project on a server with (right-click) > Run as > Run on server if you have the proper runtime environment configured.
Enabling "Dynamic Web Module" in Project Facets may not help here in maven projects.
Because maven projects are structured differently (target/sampleApp-1.0-SNAPSHOT.war) than the normal Dynamic Web Projects (WebContent/).
So, If you use Dynamic Web Module manually, then eclipse will try to use "WebContent" directory structure as deployment directory for Application Server which won't be the case in maven projects.
Solution is to use m2e-wtp plugin to do the deployment.
If you installed m2e-wtp plugin, it'll automatically detect your maven project type & it'll show you the "Run as Server" option in "Run as" menu in "Project".

Eclipse:Run on server option not visible for maven project

I'm running through the jboss as7 getting started guide here http://hudson.jboss.org/jenkins/job/JBoss-AS7-Docs/lastSuccessfulBuild/artifact/guides/developer-getting-started-guide/target/docbook/publish/en-US/html/helloworld.html . The tutorial has us setting up an example helloworld quickstart maven project.
I'm able to deploy this project from the command line successfully
mvn package jboss-as:deploy
but when I attempt to deploy the helloworld example from Eclipse - the 'run on server' option is missing from the run menu. I have Eclipse 3.7 and maven wtp installed.
Not sure how to fix, any advice appreciated.
The run on server related options only appears if your project has the Dynamic Web Moudle project facets.
You can try to configure it using the Project Facets options in your project properties
To help any other developer with this problem.
I was dealing with this issue recently. Maven projects are structured differently than Dynamic Web Projects. So when you manually add the Dynamic Web Module using Project Facets, eclipse may not register it properly as a Maven project.
To solve this, you have to install the m2e plugin and M2E Eclipse WTP plugin (this tells Eclipse how to run your maven projects).
Go to Help -> Eclipse Marketplace to search for the plugins.
After installing, you will need to restart Eclipse then you will be able to use "run on server" for your Maven projects.
Note: You may need to remove/delete the previous project then import/create it again after the restart.
You have to add maven eclipse pluginin your pom.xml file..
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
</plugin>
According to Red Hat's site, The M2E Eclipse WTP plugin (m2eclipse-wtp) has been deprecated in favor of the newer m2e-wtp plugin. If you don't want to go through the marketplace, the URL for the new plugin is http://download.eclipse.org/technology/m2e/releases.
After copying the project and refreshing it, closing and reopening it, removing and re-adding it (right-click on server) and updating Maven... the option reappeared.
I think it occurs when you up the version of the Java compiler in your .pom file, when you up the compiler in project properties or it has to do with using the newer Jersey (2) version or when you both include local libraries and maven dependencies, it may also be a consequence of a combination of these. It's pretty unclear.
Note though, that you can still add/remove projects by right-clicking on the server in the servers tab.

How compatible are GWT Maven Plugin and Google Plugin 2.3?

I have not been able to make the gwt:eclipse create a Launch that will work with the Plugin (the arguments tab is empty). So I am wondering how compatible it is with the Google Plugin:
- Will I be able to use the GWT Designer?
- Will I be able to run in Hosted Mode
- Will I be able to run GWTTests?
The steps I followed are:
- Use the Archetype to create Maven Project
- Import the project
- Go to the project properties and enable the Web Toolkit from the Google folder
- Copy my *.gwt.xml file to src/main/java
- run gwt:eclpse to create a Launch file (Which does not show in Run As by the way)
In the end it seems that I have to create a Run Configuration by hand. So how compatible are these 2 tools?
Thanks,
Each version of the GWT maven plugin is linked to a GWT version.
When you use GWT maven plugin, you need to check that the version used by the plugin is the same of your project and the same of the Google Eclipse plugin (configured per project).
The two plugins seem to be compatible (I use both without problems).
What I've done to create the project :
- create a maven project using the archetype gwt.
- import the projet in eclipse using import > existing maven project
- make your project a GWT project (project properties and check "enable GWT").
- run as web application (gwt) via the google eclipse plugin and not maven gwt:eclipse.