WoooHaaaa
WoooHaaaa

Reputation: 20450

How do I convert a exist Java project to maven project?

I've installed m2eclipse, and using the embedded Maven3.

Now I want to add dependencies to my project(there are existing jars), but the search result is always 0, how do I deal with this ?

I don't want to download all jars for now, just want to create the dependencies now.

enter image description here

Upvotes: 0

Views: 993

Answers (5)

bcfurtado
bcfurtado

Reputation: 301

Let me see, you want to use along with the maven dependencies existing in the project, right?

Assuming your project structure already in structured maven, you can follow this tip below, but beware, i think maybe you can have some sort of conflict between dependencies..

Use the website below to browse dependencies:

Upvotes: 0

Aaron Digulla
Aaron Digulla

Reputation: 328594

The dialog in your question is a bit confusing. It's actually two dialogs and should be using tabs. In the upper part, you can manually add a dependency if you happen to know all the details.

In the lower part, you can search for dependencies. The search will only work if you leave the fields at the top empty.

Upvotes: 0

Evgeniy Dorofeev
Evgeniy Dorofeev

Reputation: 136012

Try searching for spring-context instead of spring. If you are not sure about the name of the artifact you are looking for you can use wildcards, eg *spring*.

Upvotes: 0

Rollen Holt
Rollen Holt

Reputation: 517

if you want to convert a project to eclipse maven project, you can open terminal and run

mvn eclipse:eclipse

or convert to idea maven project:

mvn idea:idea

Upvotes: 1

Charles Forsythe
Charles Forsythe

Reputation: 1861

"spring" and "spring" are not valid specifiers for the Spring libraries.

Here is a link to a helpful article about artifact names for Spring:

http://spring.io/blog/2009/12/02/obtaining-spring-3-artifacts-with-maven/

You should be using names like:

    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>

Upvotes: 1

Related Questions