Hi guys : I have a Java project in eclipse that uses Maven (M2) dependency management. I noticed that the Eclipse / M2 plugin (Maven2) has an empty /target folder .... When I noticed this, I started wondering how my project even works if there is nothing in the /target folder !
So to resolve this, I decided to test how a "pure" maven project in eclipse would look.... And so I tried to create a M2 project from a simple archetype, from scratch inside of eclipse, and it ran fine, but the target folder was STILL empty.... I'm quite confused about how the target folder is used by maven in the M2 eclipse plugin... ?
could you please be more specific on your question?
When you said your project using maven dependency management, doesn't that mean you project is already a maven project?
What are you exactly trying to do?
Joined: Aug 30, 2005
Well.... My project is a Java project, in the eclipse sense. And I have enabled Maven Dependency Management. I assumed that this would use Maven to also build the project and deploy .jar files to the /target folder. But that did not happen.... So Im confused about how maven, the m2 plugin, and eclipse are interacting.
Joined: Aug 17, 2010
Sorry to say that life is never so easy my friend.....
Doing so would just enable the maven plugin for your project.You need to do the rest by your self.
Basically ensure you project structure is in the below structure as this is the standard structure for a maven project.
Maven can potentially do an IMMENSE amount of work, including running unit tests, checking code into repositories, building javadocs, installing products into the Maven repository, building a support website, and so forth all in a singleMaven operation. You don't want a minor code change to lock up your machine for half an hour just because a Maven rebuild kicked itself off. And actually, given the fact that Maven projects typically support a wide range of goals, it would be hard to figure out which goal it should choose to run automatically.
It isn't just Maven that has to be run manually by the user. Ant builds work that way, too.
Customer surveys are for companies who didn't pay proper attention to begin with.
subject: Maven target folder is empty when using Eclipse M2 plugin