OkI found a problem.

It appears to be a problem coming from the repository.

It happens because there is a redirection in https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOTS/

mbp2:1.1.2-SNAPSHOT ntlartey$ ls ~/.m2/repository/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-SNAPSHOT.jar
/Users/ntlartey/.m2/repository/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-SNAPSHOT.jar
mbp2:1.1.2-SNAPSHOT ntlartey$ cat ~/.m2/repository/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-SNAPSHOT.jar
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-SNAPSHOT.jar";>here</a>.</p>
<hr>
<address>Apache/2.2.20 (Ubuntu) Server at repository.apache.org Port 80</address>
</body></html>
mbp2:1.1.2-SNAPSHOT ntlartey$

Workaround:
mbp2:1.1.2-SNAPSHOT ntlartey$ wget https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-20130524.124212-18.jar --2013-05-27 15:33:28-- https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-20130524.124212-18.jar
Resolving repository.apache.org... 140.211.11.74
Connecting to repository.apache.org|140.211.11.74|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 73994 (72K) [application/java-archive]
Saving to: 'syncope-archetype-1.1.2-20130524.124212-18.jar'

100%[===================================================================================================================================================================================================>] 73,994 123KB/s in 0.6s

2013-05-27 15:33:30 (123 KB/s) - 'syncope-archetype-1.1.2-20130524.124212-18.jar' saved [73994/73994]

mbp2:1.1.2-SNAPSHOT ntlartey$ pwd
/Users/ntlartey/.m2/repository/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT
mbp2:1.1.2-SNAPSHOT ntlartey$ ls -lrt
total 192
-rw-r--r-- 1 ntlartey staff 73994 May 24 14:42 syncope-archetype-1.1.2-20130524.124212-18.jar -rw-r--r-- 1 ntlartey staff 420 May 27 15:27 syncope-archetype-1.1.2-SNAPSHOT.jar
-rw-r--r--  1 ntlartey  staff    195 May 27 15:27 resolver-status.properties
-rw-r--r-- 1 ntlartey staff 402 May 27 15:27 maven-metadata-syncope-archetype-repo.xml -rw-r--r-- 1 ntlartey staff 420 May 27 15:27 syncope-archetype-1.1.2-SNAPSHOT.pom
-rw-r--r--  1 ntlartey  staff    249 May 27 15:27 _maven.repositories

Then mvn archetype:generate + update pom.xml and it compiles/builds.

When I deploy and access the console

glassfish (GlassFish Server Open Source Edition 3.1.2 (build 23))throws :
2013-05-27 16:05:04.073+0000 (68) StandardWrapperValve[default]: PWC1406: Servlet.service() for servlet default threw exception java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute with name restTemplate at org.apache.catalina.session.ManagerBase.checkSessionAttribute(ManagerBase.java:832) at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1713) at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:178) at org.springframework.web.context.request.ServletRequestAttributes.setAttribute(ServletRequestAttributes.java:129) at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:44) at org.springframework.web.context.request.SessionScope.get(SessionScope.java:92) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:329) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:273) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1125) at org.apache.syncope.console.SyncopeSession.<init>(SyncopeSession.java:99) at org.apache.syncope.console.SyncopeApplication.newSession(SyncopeApplication.java:182) at org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1557)
    at org.apache.wicket.Session.get(Session.java:168)


[nik@anvil uforge]$ curl -u admin:password -H "Content-Type: application/json" -X GET http://10.1.2.217:9090/syncope/cxf/users/self
gives the following exception stack:
2013-05-27 16:14:19.889+0000 (69) StandardWrapperValve[CXFServlet]: PWC1406: Servlet.service() for servlet CXFServlet threw exception java.lang.NoSuchMethodError: javax.ws.rs.core.Response.getHeaders()Ljavax/ws/rs/core/MultivaluedMap; at org.apache.cxf.jaxrs.utils.JAXRSUtils.setMessageContentType(JAXRSUtils.java:1596) at org.apache.cxf.jaxrs.utils.JAXRSUtils.convertFaultToResponse(JAXRSUtils.java:1590)
    at org.apache.cxf.jaxrs.JAXRSInvoker.handleFault(JAXRSInvoker.java:313)
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:207)
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)

rgds,
Nik
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/



Reply via email to