Creating a new project in Eclipse using Maven as build tool for Google App Engine project - eclipse

I'm creating GAE projects and I would like to use Maven as build tool. I have found project http://www.kindleit.net/maven_gae_plugin/ that provides ability to use GAE with Maven, but I didn't understand how I can create a new project with this configuration?

First of all you have to have m2eclipse plugin installed to effectively use Maven in Eclipse. Once you have it:
Create a new Maven project with File->New->Project...
Make sure "Create simple project.." checkbox is not checked
Select appropriate archetype from kindleit
Give your project an id and a group
After that it will be generated with proper structure and dependecies

Related

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.

Importing AEM projects into Eclipse

I have searched around and couldn't find a direct answer in how to import an existing AEM project on my local into Eclipse. I am relativity new to AEM and would like to use the features Eclipse has. I have the AEM plug in downloaded and am able to create a new project, just not import.
I am not using maven, just packages and OSGI.
Advice?
You can create a new AEM archetype project (provided by the AEM eclipse plugin). That project will be a maven project.
Since you are not using maven in your current project, you can manually move all of your java files into their respective location on the newly created AEM project. As for the java dependencies, you can lookup tutorials on how to use maven and add your java dependencies to it. or you can just add your dependencies directly on the project, but I recommend using maven.
You have only package and OSGI bundle, so you can only modify the content (package) and cannot modify the bundle.
We cannot import a project from the osgi bundle to make the source code editable.
For import AEM project to Eclipse, follow the procedure:
Import AEM project as maven projects. Please check with image.
Then select your project and build.
From where you are getting those packages and bundles?
When ever you build the project from the source(cmd : mvn clean install), packages/bundles will be generated under respective target folder based on pom.
So, you can only import project source on eclipse and not the generated target files.

Using maven generated sources in Eclipse

I have an application made up of a number of maven projects. I work on it in Eclipse. Some of the projects use Maven plugins to generate stub classes for web services etc.
When i import the projects into a new workspace I have to issue a maven generate sources command followed by attach source folders to build path on each project. The application i work on has more than 5-6 projects which require these steps.
Is there a plugin I can install in Eclipse to pick up the generated sources, or even one that generates the sources and updates the build path to save the manual steps?
I'm pretty sure the m2e plugin takes care of this automatically. m2e is included in the primary Java and Java EE packages of recent Eclipse versions, so you probably already have it. If you right-click on your project, and there is a Maven submenu, then the project is already managed by m2e. Otherwise, right-click and choose Configure > Convert to Maven project.
Well, it depends on exact maven plugin you are using.
generate sources
Before I considered that m2e connector would be needed for any non common plugin, like generator. But I came recently on some plugins (1), that do it without special m2e connector.
attach source folders to build path
For this part check build-helper-maven-plugin and answer to M2E and having maven generated source folders as eclipse source folders

Can i use the google app engine eclipse plugin with a maven gae project?

I migrated a GAE project to a Maven project with the official way (https://developers.google.com/appengine/docs/java/tools/maven) but I don't want to use Maven to deploy/use devserver.
When I'm using the GAE Eclipse plugin I get an error:
Could not locate /path/to/project/target/WEB-INF/appengine-web.xml
Is it possible to use the GAE eclipse plugin or must I use Maven for deploying/local server?
I found the current process to do this a bit tricky, but it is possible. And it works pretty well after fiddling with it... I've been happy to have Maven manage the dependencies and I've found myself using it to test/deploy too. The key to getting it to work can be found in the GWT docs: In particular, you need to use a "dynamic web project" in Eclipse, rather than the normal (to me) GAE project.
Create the Eclipse Dynamic Web Project as in the link above, including changing the source folders to the proper maven-like location, and changing the web module location to the maven location.
Copy your source files in the right places.
Add the pom.xml file to the directory. At this point, you should be able to go to the command-line and run mvn appengine:devserver
Back in Eclipse, go to the project properties and turn on Google -> App Engine: Use GAE, and use HRD.
To be able to use m2eclipse to manage Maven dependencies and take Maven actions in Eclipse, you need to convert the project to a Maven project, as per this StackOverflow question
You might need to shutdown Eclipse, rebuild via Maven, restart/refresh Eclipse. At this point, you should be able to build/debug/deploy via Eclipse or via Maven!

how to convert an existing gwt application in eclipse to maven project

is there any reference website or tutorial? I see some website for migrate java project to maven project, some website for new gwt application using maven, but no website for migrate existing gwt application in eclipse project to maven project.
Try this.
Right click on the project.
Focus on Configure in menu.
Select option Convert to Maven Project.
And if that doesn't work for you. I suggest you to create new maven project and then move all your code there step by step.
Hope this helps you.
Cheers.