Search code examples
mavenapache-apexbigdata

Maven archetype error while creating a new Apache Apex project


I am following the documentation related to the Apache Apex which helps create a startup project. https://apex.apache.org/docs/apex-3.4/apex_development_setup/#creating-new-apex-project

While executing the maven command,

@echo off
@rem Script for creating a new application
setlocal
mvn archetype:generate -DarchetypeGroupId=org.apache.apex -DarchetypeArtifactId=apex-app-archetype -DarchetypeVersion=3.5.0 -DgroupId=com.example -Dpackage=com.example.myapexapp -DartifactId=myapexapp -Dversion=1.0-SNAPSHOT
endlocal

I am facing the following issue.

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.0:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.0:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:3.0.0:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo.maven.apache.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0.pom
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 7fdb0195c216fb3cbb981a7d1454af1e1139c15f for http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 7fdb0195c216fb3cbb981a7d1454af1e1139c15f for http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0
Downloaded: http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0.pom (2 KB at 0.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/apex/apex/3.5.0/apex-3.5.0.pom
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 699f18e175976623c84ada3e48ef32301cf8c30b for http://repo.maven.apache.org/maven2/org/apache/apex/apex/3.5.0/apex-3.5.0.pom
[WARNING] Checksum validation failed, expected <!DOCTYPE but is 699f18e175976623c84ada3e48ef32301cf8c30b for http://repo.maven.apache.org/maven2/org/apache/apex/apex/3.5.0/apex-3.5.0.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/apex/apex/3.5.0/apex-3.5.0.pom (17 KB at 7.4 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0.jar
[WARNING] Checksum validation failed, expected <!DOCTYPE but is da76067a61f0fc02442cb2f09a9f8934e437cf2e for http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0
[WARNING] Checksum validation failed, expected <!DOCTYPE but is da76067a61f0fc02442cb2f09a9f8934e437cf2e for http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0
Downloaded: http://repo.maven.apache.org/maven2/org/apache/apex/apex-app-archetype/3.5.0/apex-app-archetype-3.5.0.jar (2 KB at 0.3 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.953s
[INFO] Finished at: Thu Feb 16 11:51:24 IST 2017
[INFO] Final Memory: 16M/491M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.0:generate (default-cli) on project standalone-pom: The defined artifact is not an archetype -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

What is the cause for this error?


Solution

  • Likely there is a problem with your internet connection to the maven repository. Try downloading the necessary artifacts manually:

    mvn dependency:get  -DremoteRepositories=http://repo1.maven.org/maven2/ -DgroupId=org.apache.apex -DartifactId=apex-app-archetype -Dversion=3.5.0