Maven reports 'The desired archetype does not exist' when using archetype from bintray

11,688

Please go to https://bintray.com/konsoletyper/teavm/teavm-flavour-dev

Then hit Set Me Up!

And choose: Resolving artifacts using Maven

copy this part into your settings xml (usually located in /Users/os-username/.m2/settings.xml see bellow):

<profiles>
        <profile>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-konsoletyper-teavm</id>
                    <name>bintray</name>
                    <url>http://dl.bintray.com/konsoletyper/teavm</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-konsoletyper-teavm</id>
                    <name>bintray-plugins</name>
                    <url>http://dl.bintray.com/konsoletyper/teavm</url>
                </pluginRepository>
            </pluginRepositories>
            <id>bintray</id>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>bintray</activeProfile>
    </activeProfiles>

Then try the second command again.

settings.xml:

There are two locations where a settings.xml file may live:

The Maven install: ${maven.home}/conf/settings.xml

A user’s install: ${user.home}/.m2/settings.xml

https://maven.apache.org/settings.html

Share:
11,688
Alexey Andreev
Author by

Alexey Andreev

Kotlin/JS compiler developer at JetBrains Also, have my own pet Java bytecode to JavaScript compiler. See http://teavm.org

Updated on June 14, 2022

Comments

  • Alexey Andreev
    Alexey Andreev almost 2 years

    First, I install archetype to my local repository:

    mvn dependency:get \
       -Dartifact=org.teavm.flavour:teavm-flavour-application:0.1.0-dev-8 \ 
       -DremoteRepositories=teavm::::https://dl.bintray.com/konsoletyper/teavm
    

    Second, I run archetype generation:

    mvn -DarchetypeCatalog=local \
      -DarchetypeGroupId=org.teavm.flavour \
      -DarchetypeArtifactId=teavm-flavour-application \
      -DarchetypeVersion=0.1.0-dev-8 \
      archetype:generate
    

    and get the following error:

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.0:generate
    (default-cli) on project standalone-pom: The desired archetype does not exist 
    (org.teavm.flavour:teavm-flavour-application:0.1.0-dev-8) -> [Help 1]
    

    When I build the project from sources and generate SNAPSHOT archetype, everything works fine.

    Is there something I'm doing wrong, or it's a bug in Maven? Is there a workaround?