While installing the open-source software like Mahout, I read some notes like
Convert Maven project of Mahout into Eclipse project
What does this mean? What's the difference between a Maven project and Eclipse project?
Install Maven if you haven't already done it.
Enter the command prompt or a shell and navigate to the directory where the Mahout is located (there's a pom.xml file). Type the command:
mvn eclipse:eclipse
which will create project files for Eclipse and open the project in Eclipse.
No conversion is needed. Eclipse supports Maven projects, and vice-versa.
Difference between these two projects yield from the difference of the tools. Eclipse is an IDE and Maven is a build tool. In fact, IDE is a superset of a build tool. That's why Eclipse may use Maven for building. Common properties between the projects relate to how the build is being done and Eclipse has a set of properties aimed to persist the state between programming sessions.
Related
I'm working on writing a script that will checkout multiple Maven projects that all have modules. I want to import all the modules into Eclipse Mars as M2E projects. Now I've scoured other questions and answers about this and only see Eclipse CDT based solutions (eclipse.exe -base workspace -importAll {someURI}). However this doesn't convert your projects into M2E projects in eclipse. They are just plain-Jane java projects.
Does anyone know how I can, from a Windows Batch Script, import Maven projects as M2E faceted projects in Eclipse Mars?
I'm using Eclipse Mars.1, Java 7, Maven 3.3.
ADDED:
Ultimately what I really want is a reliable way to build up a complex workspace of M2E projects. There are hierarchical dependencies between them so if it's not done right it's very confusing for more Junior developers.
You can try to use:
mvn eclipse:eclipse
This will generate eclipse configuration files, after of that you can import into eclipse:
eclipse.exe -base workspace -importAll {someURI}
I search some informations about the faisability of the exact inverse protocol described into this popular question.
Using SBT, i want to compile and/or generate a release of an already existing software actively developed with Eclipse and Plug-in Development Environment (PDE) of Eclipse.
Users want to conserve the eclipse GUI tools to define dependencies for each plugins. But we also need a console tool like SBT. Do you think it exists some tools which can generate an SBT project based on plug-in dependencies written using eclipse PDE systems ?
I see that tycho plugin for eclipse can generate maven file, is it possible using SBT and IVY repository ( don't want .pom :( ) ?
I am new to Maven and if you feel i am asking really basic question then please forgive me.
I am facing couple of problems with Maven mentioned below.
I am using Eclipse Luna 4.4.1 (Which comes with the Maven Plugin).Now i installed two plugins..out of which one is for subclipse(with SVNKit) and m2e-Subclipse which is used for integrating the maven with SVN.I downloaded the project in eclipse using svn plugin as "checkout as Maven project" and i could see the project being downloaded and now to remove all the errors related with the POM.XML i downloaded the Maven and given the local path of the Maven in the preferences > Maven > installations and changed the Global Settings and user settings files which are project specific.
1). Now even after doing all this circus i still can not see the Maven build options in my Eclipse.
2). I am not even able to clean the project from command prompt.
when i go to my project directory and type "mvn -version" which shows me the correct version of maven.
But when i try to clean it using mvn clean. it does not work.
Please help.
Regards.
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
I made simple maven project and I opened it with Eclipse. I have installed maven plugin for Eclipse. I'm interested in following:
How Eclipse compiles code when I hit save on my source code (does it use configuration from ant or maven or something else)?
When I run tests from JUnit plugin for Eclipse those Eclipse calls mvn test (I suppose not, but what is then happening exactly)?
Is it possible that maven does the build successfully but Eclipse is
showing errors in code?
The Maven Integration for Eclipse makes it easier to edit POM files, allows you to execute maven builds from within Eclipse and to help with dependency management. It doesn't actually compile your code (unless of course you execute a maven build from within Eclipse). The main help is with the dependency management and writing the .classpath file of your project within Eclipse.
To try and answer your questions:
Eclipse uses its standard mechanism to compile code. With a standard eclipse for java developers your project will have a Java Project nature and Eclipse will then use the Java Development Tools - JDT to compile the code. (Internally this uses an incremental builder to build the code http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2FresAdv_builders.htm). What source files it will compile and where it will place the resultant .class files is configured in your project's Java Build Path (which I am guessing the maven plugin may well configure for you)
JUnit support is part of the Java Development Tools as well.
It is possible that maven will successfully build a project outside of Eclipse, but that the same project will show errors within Eclipse. This is usually down to classpath errors (dependencies defined in the project's POM not being added to the classpath in Eclipse). If you are using the maven plugin with eclipse this probably shouldn't happen. If you are not using the maven plugin within eclipse you can execute maven eclipse:eclipse to have maven update the Eclipse .classpath file of the project which should then fix any of these problems.