I'm new to Google App Engine. To use Java App Engine, there are two options provided by Google: create a Maven project, or non-maven project backed by Eclipse Google Plugin. According to the doc, Eclipse version is easier. So should I go ahead with Eclipse? But I have seen lots of posts about maven. Could anyone comment what the pro/cons of using Maven are.
Thanks
Although you might want to try our first with the Eclipse plugin, Maven is the way to go in the long run because :
It is designed to enable collaboration between developers, ensuring everyone uses the same libraries and the same build process
It works with any serious Java IDEA, not only Eclipse. If you or the people you work with use IntelliJ, Netbeans or anything else Maven will help harmonize everything
It allows you to do Continuous Integration . Especially since now this comes bundled with App Engine via push-to-deploy. Push-to-deploy is great because it allows you to do debugging in production from the admin console. But you need to use Maven for it to work.
In conclusion, use the Eclipse plugin for your first quick-and-dirty tutorial or test project. But then learn Maven to make a real project.
Related
I'm a Java and Web developer.
After using eclipse for 5 years, I decided to at least try to migrate my currently active projects to the JetBrains IDE.
Mainly because of the new features for Android Studio that have been announced at Google IO 15 and I feel that it might be better for me to familiarize myself with it in general. Just in case the support for ADT in eclipse is dropped by Google at some point.
I also noticed that the Laravel (PHP framework) integration is pretty good for IntelliJ, which would come in handy for some of my planned Web projects.
The Java project I'd like to migrate is more specific a libGDX game which has a git repo.
So my question(s) are:
Is it possible to convert the project from an eclipse project to an IntelliJ project, without loosing the git repository?
Does anyone have got experience with this?
Does anyone know if there will be issues with files generated by the libGDX setup tool?
Thanks in advance
Edit: I know that there is an import option for eclipse projects to convert them to the IDEA structure, but I'm not sure if that will also handle git.
First of all, you could just try it, IntelliJ won't delete you anything. You could even use both IDEs on the same sources.
If you create a project or module from a directory which is versioned (e.g. contains .git), then IntelliJ will automatically pick it up, so you can use it.
We are trying to develop a java application for iRods(a middleware for Heterogeneous databases). To use the jargon API we need to use the Java Jargon API which is in this link . We are using Java for the first time and not aware of how to import the library in our project.
In the presentation the following steps are mentioned at the beginning
git clone https://github.com/DICE-UNC/jargon.git
mvn clean install -Dmaven.test.skip=true
But I want to expose those libraries in my new eclipse project. Any pointers regarding setting up those libraries for an exlipse project would be helpful.
You are asking for a quote of the Eclipse JDT docs. But I try to give you a hint on the matter.
When you have managed to install maven and got the build running, you will find a jargon-xxx.jar in your target folder.
Take that jar file and place it in your eclipse project and select "configure build path" - "add Jar". Select the jargon.jar file in your project folder, it is now on your classpath in the project.
Hint: If this is a professional project, you need to have someone on your team to setup a proper build environment for you, possibly using maven or some other tool that manages dependencies for you and is supported in your IDE. Otherwise you can only perform manual builds of your software, which will hinder your progress really soon. You should hire someone to guide you through the first steps and get you rolling.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I code mostly in Java and use Maven for all of my projects. I do really love using Maven since it is easy to download the sources and documentations, and, more importantly, I don't need to keep the copy of the external libraries under my project source code folders.
I have started to develop an Android application and I found that the Android plugin for eclipse are terribly good. However, all provided examples are not maven projects so I do not know whether, if I use maven, I would still get all the functionalities from the Android plugin or whether there is any drawback from using Maven.
So the questions are:
Do all features from Android plugin for eclipse still work?
Is it going to be more difficult than using the normal build (I believe it is Ant but not certain)
Any other drawbacks, e.g. the file size of the final application (Maven tends to bundle a lot of things together) or the difficulties of getting the latest libraries on maven repository (which is probably differnt for Android).
Please do not point to this maven support for android projects?
I would like an answer from experience developers. I already know that it is possible to use maven for an Android app. All I need to know is whether I should use it.
My teams current task is to develop an Android app. Since it is a small app and also some kind of prototype we decided to evaluate Maven and the Android Eclipse plugin.
In short:
After two developers spent three days, we were not able to gain the Android Eclipse plugin functionalities in our Maven project.
The R class was not updated according to our resources
We were not able to start the application directly from within Eclipse in the emulator and/or an attached device
Because of these issues which impeded our development sincerely we decided to develop the app without Maven.
But if any of you knows how to fix these issues I would love to hear a solution!
If you want fast running tests you are nearly forced to use maven. As robolectric is the way to go then. And they said Roboletric is probably easier to set up via maven under Eclipse (they are using IDEA).
That said, did you read this post or that? And what error message exactly did you get?
Typical things I made wrong:
use maven >= 3.0.3 ! And avoid that embedded thing in eclipse. (This was necessary only for robolectric, if I remember correctly)
use ~/.m2/settings.xml as described on the robolectric page to set up the android path
specify your android sdk also properly in the local.properties and under Preferences -> Android -> SDK location
Further read this and that or just try the mavenized robolectric example itself, which worked for me. Import it as existing maven project.
Install the necessary sdk (in my case 2.2_r3) via maven-android-sdk-deployer and
export ANDROID_HOME=/path/to/android/sdk
mvn install -P 2.2
And did I mention this strange tool: m2e-android - not sure why one needs so many stuff with Eclipse ... here you can install it via software updates http://rgladwell.github.com/m2e-android/updates/master/m2e-android/
Hopefully I remembered all steps correctly. Good luck!
Update:
Switching back to normal Android stuff without maven under Eclipse as the IDE makes strange stuff: http://groups.google.com/group/robolectric/browse_thread/thread/ac814076c40d9df1
But the nice thing of this Maven adventure is that I can now easily test and debug my projects via NetBeans :)
As we all know Android Devolopment migrated to Android Studio from Eclipse.
The Android Studio build system consists of an Android plugin for Gradle. Gradle is an advanced build toolkit that manages dependencies and allows you to define custom build logic.
The build system is independent from Android Studio, so you can invoke it from Android Studio or from the command line.
The Android Studio build system supports remote Maven dependencies. As you know, Maven is a popular software project management tool that helps organize project dependencies using repositories.
You can build your Android apps from the command line on your machine from Android Studio,thus by avoiding the mess of plugins as there in Eclipse.
Check out this tutorial for Building Android Apps with Maven.
Refer here for more about Gradle build
I recommend avoiding Maven for professional development on Android. Here's why:
Google is investing time into keeping Android Studio integrated with Gradle. So maven is extra work right off the bat.
If you have to use Maven (e.g. to manage dependent libraries), then Gradle can use the Maven plugin. See https://docs.gradle.org/current/userguide/maven_plugin.html
By making maven your primary build tool you'll be downloading a massive amount of dependencies that you don't need and you're not sure where they come from. This goes against the notion that for your Android app, you ideally want just your code, and the android platform. In other words you're involving a lot of libraries/code you don't need.
In short, using maven as your Android build tool adds much more work than is necessary and creates a management nightmare (IMO).
Try this to illustrate:
Heat a pan on a stove.
Hold up a raw egg. Say "This is your android application."
Crack the egg into the pan.
Say "This is your android application on maven-with-rats-nest-dependency-tree-and-unknown-code-downloads-that-you-don't-need-anyway."
Wait for the egg to burn to a crisp.
Say, "This is your android application when the maven build packaged a useless or bad library with your Android application."
I have been able to use maven for android application development using Android Development Tools for Eclipse (Kepler) and Android for Maven Eclipse 1.0.1 (m2e-android). Follow these instructions http://rgladwell.github.io/m2e-android/. After you have created your new project with the android quickstart archetype modify your pom.xml. Add the android platform version. Eclipse (m2e) will report an error on the pom.xml on the android-maven-plugin declaration, to fix this issue follow alexander's response in Error in maven pom xml file: Building Android project. Then update the maven project using eclipse and that should be it.
From my own experience in Intellij. I used Maven as a build automation tool for my android development process. I started learn it with "Android Application Development with Maven" from Packtpub.
Is there, somewhere a tutorial on how to make an eclipse plugin.
need it to integrate as a NEW PROJECT into eclipse.
I've seen others, but not for making a NEW PROJECT plugin.
or is there an existing open source plugin i could check for tips and tricks... could not find it, eclipse list of plugins is crazy to search through.
This as well as this tutorial look rather promising for beginning plugin development. Also have a look at https://stackoverflow.com/questions/592391/eclipse-plugin-development-resources. For wizards, check this tutorial.
Eclipse.org officially suggests THIS BLOG to start developing the eclipse plugins.
This will give you an understanding on where to start, how to write and how to generate it as a plugin and deploy it.
Posts given by #Dirk also will be very helpful.
There are a lot of tutorials on Eclipse RCP on the Internet, on the following link from the chapter Tutorials Writing an Eclipse Plug-in (Part 1) to Writing an Eclipse Plug-in (Part 6) will be helpful:
http://lubospeclipse.wordpress.com/eclipse-plugin-and-rcp-development-notes-2-2/
Also, if you want to check an existing Open Source Eclipse plugin which does the same thing, the best way do is to find plugins made for new languages of technologies. Basically, every new language or technology first implements plugins for new project and for custom file type.
My organization has made an upper level decision to move to maven as the standard build tool for Java projects. I have been tasked with helping our local teams migrate projects over to maven.
One of the core tools that is in play is the MyEclipse IDE. MyEclipse seems to have had a "fun" history with the maven team as evidenced in various places, especially when dealing with war projects. I haven't encountered problems with simple jar projects...yet.
After fighting with MyEclipse and failing to make it recognize a war project easily, the question becomes, is MyEclipse worth it for developing maven war apps?
If so, is there a way to get MyEclipse to play nicely with a war project that I've not found? Or, am I simply better off suggesting its time to use Eclipse Java EE edition with m2eclipse?
No. MyEclipse does not support projects that were created outside of it. It is by design only working with projects created using its wizards.
From the Using Maven in MyEclipse Overview
NOTE: Maven is only supported for new projects. Migration of existing
projects to Maven-enabled projects is not supported at this time, but
may be considered for a later release. Right now the MyEclipse team is
focused on providing as fluid a new-Maven-project experience as
possible
I am working as a tech lead, and we recently started moving to maven. I had a couple of issues getting maven to work with myeclipse. First, even when I "Enabled all m2eclipse features" checkbox, I still couldn't check out a project as a maven project, from subversion. That option (that you get from m2eclipse) just wasn't available.
Also, some of the preferences you get with m2eclipse are not available with maven4myeclipse.
Finally, I couldn't just uninstall the maven4eclipse plugin and install m2eclipse. That would have been an acceptable workaround.
I think Genutec tried to make Maven more accesible to newbies, but there are some problems in the impementation, and I don't see them being fixed soon. For us, that will likely delegate MyEclipse to being just a fancy jsp editor.
Mike,
Sorry to hear you are fighting MyEclipse and Maven, in the past the most common problem I've seen causing people pain in this area is when they don't have the Web Root, Java source dirs or resource dirs set correctly.
Using this webpage as reference for a standard Maven2 web project layout, you can easily create a Maven-enabled MyEclipse Web Project. The steps you would want to take are as follows:
File > New > Web Project
Give your project a name, use the Java source dir of "src/main/java" and a Web Root of "src/main/webapp", check the Java EE spec level you want, check "Add Maven support" checkbox and hit Finish (unless you want to setup the artifact/group IDs).
Now, if this is the first time using Maven4MyEclipse, a lot of initialization will take place preparing your local repository and grabbing all the Java EE resources to build your project, but after that's done you should be all set.
You can execute the Maven targets off the Right-click Run As or Debug As menu and even manage custom goal execution using the "Maven build..." shortcut -- this is all similar to m2eclipse.
If you decide you want to use m2eclipse complete, you can navigate to Window > Preferences > MyEclipse > Maven4MyEclipse and check the "Enable all m2eclipse features" checkbox.
Out of the box we only hide the bits that can make Maven confusing for first-time folks, if you enable all the m2 bits, you can do whatever you want with Maven and MyEclipse. If you keep having trouble stop by our forums and let us know and we'll help out as best we can.
Mike,
think the issue is that the project has already been created outside of MyEclipse and >worked thru maven using the command line. Importing it is not successful.
I saw this post when looking for other Maven resources so I'll chime in.
Why not import your existing project using File > Import and turn on all the m2eclipse features and continue to develop it as you did before using maven commandline tools? I've done this and it works well for legacy projects, once m2eclipse features are enabled as mentioned in Riyad's #5.
Personally, I've always thought the maven war format was a bust, but we still have some old projects that use it around. Maven's format is just a default (and a poor one), not some sort of standard. However, we currently leave those old projects "as is" (using the above technique) just because it's easy. But for new work we use the MyEclipse web projects then just enable Maven support on them. The benefit is that you get all the Maven support and it's super easy to use and manage but no more commandline (although that still works too) and all the MyEclipse tools work perfectly on them as well. It's a "best of both" approach, well, at least for us. YMMV.
Hope that helps,
Dave
Mike,
Interesting, what happens when you have developers who are not using MyEclipse?
Not an issue here; I work for a very large company that has been standardized on it for quite some time (happily, I might add as we used to be a WSAD shop -- shudder.)
Anyway, if you have some that use MyEclipse and some that don't I see two options. First, if you create MyEclipse web projects and then "Add Maven capabilities" (or whatever it's called) to them, they'll work in MyEclipse and from the Maven commandline as well. So even if you're not using MyEclipse you can still use the commandline Maven tools. Also, since the MyEclipse structure is the more standard "exploded war" layout, it should work with whatever else you use as well.
Other thing to consider is that Maven's web layout is simply a default and Maven can easily support any project structure, including the one MyEclipse uses, so you should be able to use the MyEclipse project with Maven in any tool with just a little additional config. That's likely why the Maven commandline tools still work on the MyEclipse Web projects -- the MyEclipse guys just automatically configure Maven to recognize the format.
You also could just import the externally created Maven web projects as I said in my last post. We don't like to do that because that structure is unique to Maven and just doesn't work with any tools except Maven. As a result, it basically defeats the the tool support you get automatically in MyEclipse, Eclipse Java EE, or pretty much any other tool. It's just a poor default. Exploded WAR format, that's used by MyEclipse, Eclipse Java EE, WSAD, RAD, and everyone else is simply a better solution. Especially when it still works with Maven just fine as well.
Maven was made to be flexible to project structure. We've just found by using that flexibility a little you can get Maven support and great tool support too.
Dave