GWT Maven Archetype in Eclipse - Unknown output directory - eclipse

I've created a new Maven project using the gwt-maven-plugin archetype in Eclipse Juno.
After creating the project I get a build error:
Unknown Google Web App Problem: The output directory for the project
should be set to /myproject/src/main/webapp/WEB-INF/classes
How do I resolve this?

Go to Project|Properties|Google|Web Application. Uncheck the checkbox (Launch and deploy from this directory ...).
See http://googlewebtoolkit.blogspot.com/2010/08/how-to-use-google-plugin-for-eclipse.html

Related

Eclipse juno getting error during build [duplicate]

I am working on Blackberry webworks, Phonegap framework, Apache Ant and configured them in Eclipse 3.6 with sample index.html.
I followed the article Getting Started with PhoneGap BlackBerry WebWorks
But I am getting an error message after running the project:
"Errors running builder 'Faceted Project Validation Builder' on project 'MyProject' "
How do I properly configure the project to support cross-platform?
Right click on your project >>> Properties >>> Project Facets >>> uncheck Static web Module.
I tried the previous response and was not very successful.
Do this:-
install Eclipse Java EE Developer Tools using the Eclipse -> Help -> Install new software -> Work with -> (your Eclipse version's download repository. e.g.:) Indigo.
In the filter field type, then checkbox, Eclipse Java EE Developer Tools.
Download and let it install. No more problems.
In the maven web project.
1.Clear the maven project.
2.Build the maven project.
3.Go to the Project Facts on right click on project -> properties -> project facts.
4.On the top right side tab select the Runtimes -> select appropriate Apache version(8.5) that is installed on your machine.
5.Then Run the project.
It's Solve in my case, try once in your case.
Maybe you have a wrong item in Runtime settings of Project Facets. Right click on project >>> Properties >>> Project Facets >>> Runtime and modify it. Runtime settings of Project Facets

Error in my java web application after convert it to a maven project

I'm following a tutorial wich explains how to create a dynamic web project and convert it to a maven one. I have the m2e plugin installed in Eclipse, but after I right-click my project and convert it to maven, a red error icon is appearing in my project's root but when I open the folders inside it, there is no files with an error. I still tried to run the app but an 404 error message was the output. This is what Eclipse looks like:

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".

Create an eclipse plugin with dependency on a maven project

I have a maven project that contains a certain api I need to use in an eclipse plugin. This eclipse plugin is not currently a maven project but a normal eclipse plugin project with a manifest. I converted this plugin project to a maven project (using m2e menu command to change project to maven) I added the dependency to the maven project from this project. My maven build for this project is running fine from command line. Now when I launch the eclipse application I am getting a ClassNotFoundException for the api I am referring to from the plugin project. Please help.
This can be done by adding tyco configuration to the maven project. That enables you to have a maven project with a Manifest thus enabling other plugins to depend on it. More info: http://www.eclipse.org/tycho/

on save compile and deploy with maven eclipse and weblogic

I just started maven in general and m2eclipse in specific.
What I have been doing before is follow:
1)Deploy my application to tomcat.
2) make any changes to the java or jsp files.
3) save and run the application again ( no restart is neccessary unless I changed a config file).
now, everytime I make a minor change to my maven project in eclipse I have to do a "pre-clean install" to compile and deploy the application again and then restart weblogic 10 to view the changes.
Is there anyway ( or maybe I m not doing something right) that I when I modify a class or jsp file, the code will get compiled and deployed when I save the file like I was doing before with the eclipse default project builder and tomcat?
Also, When I checkout the maven project from SVN, Eclipes shows bunch of compiling errors due to some missing classes, but when I build the project using m2eclipse everything builds successfull. Why is eclipse not recognizing the classes??
I have looked at the following answer but I was not able to figure out the problem.
How do I start Maven "compile" goal on save in Eclipse?
now, everytime I make a minor change to my maven project in eclipse I have to do a "pre-clean install" to compile and deploy the application again and then restart weblogic 10 to view the changes.
You shouldn't have to do that. Are you using the Oracle Enterprise Pack for Eclipse (OEPE) (available from the market place or from an update site) and the WTP?
Is there anyway ( or maybe I m not doing something right) that I when I modify a class or jsp file, the code will get compiled and deployed when I save the file like I was doing before with the eclipse default project builder and tomcat?
See above.
Also, When I checkout the maven project from SVN, Eclipes shows bunch of compiling errors due to some missing classes, but when I build the project using m2eclipse everything builds successful. Why is eclipse not recognizing the classes??
Try the following: right-click on the project then Maven > Update Project Configuration.