I took a look at the trace output with -X enabled:
ie
[1] mvn -X archetype:generate -DarchetypeGroupId=org.apache.syncope
-DarchetypeArtifactId=syncope-archetype
-DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots
-DarchetypeVersion=1.2.0-SNAPSHOT
:
:
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-archetype-plugin:2.2:generate' with
basic configurator -->
[DEBUG] (f) archetypeArtifactId = syncope-archetype
[DEBUG] (f) archetypeCatalog = remote,local
[DEBUG] (f) archetypeGroupId = org.apache.syncope
[DEBUG] (f) archetypeRepository =
http://repository.apache.org/content/repositories/snapshots
[DEBUG] (f) archetypeVersion = 1.2.0-SNAPSHOT
[DEBUG] (f) basedir = /home/nik/UShareSoft/WKS/syncopeOnGlassfish/test
[DEBUG] (f) interactiveMode = true
[DEBUG] (f) localRepository = id: local
url: file:///home/nik/.m2/repository/
layout: none
[DEBUG] (f) remoteArtifactRepositories = [ id: central
url: http://repo.maven.apache.org/maven2
layout: default
snapshots: [enabled => false, update => daily]
releases: [enabled => true, update => daily]
]
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@6509dc6
[DEBUG] -- end configuration --
:
My question to you is:
a) If the remoteArtifactRepositories is set to
http://repo.maven.apache.org/maven2 how will it retrive the bits
for a snapshot release greater than 1.1.1 (based on
http://search.maven.org/#search|ga|1|syncope)?
b) Shouldn't the remoteArtifactRepositories be set for
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/?
c) If yes, to b) how is this url specified in the command line in [1] above?
rgds,
Nik
Hi Francesco,
Not sure ... I can only "successfully" build to level 1.1.1 using this
maven method on two very
different environments.
At work is a linux box with jdk 1.7:network is a high bandwith fibre-optic
[nik@anvil syncopeOnGlassfish]$ mvn -version
/usr/lib/jvm/java
Apache Maven 3.0.4 (rNON-CANONICAL_2013-01-22_13-18_mockbuild;
2013-01-22 14:18:29+0100)
Maven home: /usr/share/maven
Java version: 1.7.0_19, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.8.11-100.fc17.x86_64", arch: "amd64",
family: "unix"
[nik@anvil syncopeOnGlassfish]$
[nik@anvil syncopeOnGlassfish]$ javac -version
javac 1.7.0_19
[nik@anvil syncopeOnGlassfish]$
but I get the same with my machine at home a mac book pro with its mac
JDK 1.6.0_37
mbp2:WKS ntlartey$ javac -version
javac 1.6.0_37
mbp2:WKS ntlartey$
mbp2:WKS ntlartey$ mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: /usr/share/maven
Java version: 1.6.0_37, vendor: Apple Inc.
Java home:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.8.2", arch: "x86_64", family: "mac"
mbp2:WKS ntlartey$
i.e
mbp2:WKS ntlartey$ snapshot120]$ mvn archetype:generate \
> > -DarchetypeGroupId=org.apache.syncope \
> > -DarchetypeArtifactId=syncope-archetype \
> >
-DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots
\
> > -DarchetypeVersion=1.2.0-SNAPSHOT
-bash:
-DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots:
No such file or directory
mbp2:WKS ntlartey$ mvn archetype:generate \
> -DarchetypeGroupId=org.apache.syncope \
> -DarchetypeArtifactId=syncope-archetype \
>
-DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots
\
> -DarchetypeVersion=1.2.0-SNAPSHOT
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @
standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @
standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @
standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype defined by properties
Downloading:
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
[WARNING] Checksum validation failed, expected <!DOCTYPE but is
f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
[WARNING] Checksum validation failed, expected <!DOCTYPE but is
f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
Downloaded:
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
(402 B at 0.3 KB/sec)
[WARNING] The metadata
/Users/ntlartey/.m2/repository/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata-syncope-archetype-repo.xml
is invalid: end tag name </body> must match start tag name <hr> from
line 7 (position: TEXT seen ...</address>\n</body>... @9:8)
Downloading:
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar
[WARNING] Checksum validation failed, expected <!DOCTYPE but is
08c17e15de2e8732a4cddb281732916952e87c7d for
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar
[WARNING] Checksum validation failed, expected <!DOCTYPE but is
08c17e15de2e8732a4cddb281732916952e87c7d for
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar
Downloaded:
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar
(420 B at 0.5 KB/sec)
Downloading:
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
[WARNING] Checksum validation failed, expected <!DOCTYPE but is
f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
[WARNING] Checksum validation failed, expected <!DOCTYPE but is
f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
Downloaded:
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
(402 B at 0.5 KB/sec)
[WARNING] The metadata
/Users/ntlartey/.m2/repository/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata-syncope-archetype-repo.xml
is invalid: end tag name </body> must match start tag name <hr> from
line 7 (position: TEXT seen ...</address>\n</body>... @9:8)
Downloading:
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom
[WARNING] Checksum validation failed, expected <!DOCTYPE but is
9be18526804c0108aa167a02a5e1a17163749204 for
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom
[WARNING] Checksum validation failed, expected <!DOCTYPE but is
9be18526804c0108aa167a02a5e1a17163749204 for
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom
Downloaded:
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom
(420 B at 0.5 KB/sec)
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 4.642s
[INFO] Finished at: Mon May 27 10:49:50 CEST 2013
[INFO] Final Memory: 7M/81M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-archetype-plugin:2.2:generate
(default-cli) on project standalone-pom: null: MojoFailureException:
NullPointerException -> [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
mbp2:WKS ntlartey$
On 27/05/2013 10:24, Nik wrote:
On 05/27/2013 10:21 AM, Fabio Martelli wrote:
mvn archetype:generate \
-DarchetypeGroupId=org.apache.syncope \
-DarchetypeArtifactId=syncope-archetype \
-DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots
\
-DarchetypeVersion=1.2.0-SNAPSHOT
but this gives me:
[nik@anvil snapshot120]$ mvn archetype:generate \
> -DarchetypeGroupId=org.apache.syncope \
> -DarchetypeArtifactId=syncope-archetype \
>
-DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots\
> -DarchetypeVersion=1.2.0-SNAPSHOT
/usr/lib/jvm/java
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @
standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @
standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @
standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype defined by properties
Downloading:
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
[WARNING] Checksum validation failed, expected <!DOCTYPE but is
f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
You mush have troubles with JDK / Maven / network connectivity (are
you behind some kind of proxy?): besides successfully run the command
above on different platforms, also visiting [1] gives me the expected
metadata document, [2] and [3] the expected checksums.
Regards.
[1]
http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml
[2]
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml.md5
[3]
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml.sha1
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/