Search code examples
mavenmyeclipse

myeclipse2014 create maven project :The desired archetype does not exist


I'm using maven3.2.1 ,and my jdk version is 1.6.

When I use myeclipse 2014 in win7 to create a maven project,

it throws an Error:

Unable to create project from archetype 
[de.akquinet.android.archetypes:android-quickstart:1.1.0 -> ]
The desired archetype does not exist 
(de.akquinet.android.archetypes:android-quickstart:1.1.0)

this is my maven archetype choosing:enter image description here

And I think maybe there is no that archetype in my local repository, so I searched in web ,and download the jar from maven center repository: http://mvnrepository.com/artifact/de.akquinet.android.archetypes/android-quickstart/1.1.0 then I use this cmd to install it:

mvn install:install-file \
    -DgroupId=de.akquinet.android.archetypes \
    -DartifactId=android-quickstart \
    -Dversion=1.1.0 \
    -Dpackaging=jar \
    -Dfile=D:\Downloads\maven-archeTypes\android-quickstart-1.1.0.jar

And this is the result:

...
[INFO] Installing D:\Downloads\maven-archeTypes\android-quickstart-1.1.0.jar 
       to D:\maven\repository\de\akquinet\android\
archetypes\android-quickstart\1.1.0\android-quickstart-1.1.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
...

I check for myeclipse compiler ,set it to 1.6.

I set Maven4MyEclipse Installations to my maven installed path.

then I try again, but still failure.

could anyone help? Thank you !!!


Solution

  • Please remember that m2eclipse is not enough but you need also m2e-android: http://rgladwell.github.io/m2e-android/

    First of all install latest version of Maven (3.1.x).

    After that, in Eclipse do the following:

    New -> Maven Project -> (next) -> Add Archetype and enter:

    Archetype Group Id: de.akquinet.android.archetypes
    Archetype Artifact Id: android-quickstart
    Archetype Version: 1.1.0
    

    Then enter your project informations (groupId, artifactId, package) and finish the wizard.

    If this shouldn't work try creating the project with you command line:

     mvn archetype:generate \
          -DarchetypeArtifactId=android-quickstart \
          -DarchetypeGroupId=de.akquinet.android.archetypes \
          -DarchetypeVersion=1.1.0 \
          -DgroupId=your.company \
          -DartifactId=my-android-application
    

    And then import it in Eclipse.

    and see