Question

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 !!!

Was it helpful?

Solution 2

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

OTHER TIPS

Instead of setting the catalog to "Default Local" (which requires an archetype catalog to be set up), try "All Catalogs" and filter to "android" to see the archetype that you installed. Note that jars can also be installed to the repository using MyEclipse->Maven4MyEclipse->Import Jar to Local Repository, as an alternative to using the mvn command in a command window.

When new an Maven Project, select an archetype ,

such as

de.akquinet.android.archetypes
android-quickstart
1.1.0

click Next , and see :

enter image description here

Pay attention to the red box , if there is nothing in it,

It indicate that your eclipse has no reference to you archetype installed.

though you can see it's name when selected.

then you should click the back button, and click `add' ,to add it for refreshing

your eclipse have a reference to . If the red box still blank, go to your local maven

repository (my is : D:\maven\repository) ,find the folder de,and delete it.

then add the archetype again when new a maven project , eclipse will automatically

download it for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top