01-18-2012 06:00 AM
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)my problem is in launching the one line command for managing AMP lifecycle with Maven like is written here: http://wiki.alfresco.com/wiki/Managing_Alfresco_Lifecyle_with_Maven#How_to_manage_Alfresco_AMPs_.28a...
Maven home: /usr/local/apache-maven-3.0.3
Java version: 1.7.0_147-icedtea, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: it_IT, platform encoding: UTF-8
OS name: "linux", version: "3.0.0-14-generic", arch: "amd64", family: "unix"
mvn archetype:generate -DarchetypeGroupId=com.sourcesense.alfresco -DarchetypeArtifactId=maven-alfresco-amp-archetype -DarchetypeVersion=1.9.1 -DgroupId=com.mycompany \-DartifactId=myamp -Dversion=1.0 -DarchetypeRepository=http://maven.alfresco.com/nexus/content -DinteractiveMode=false
now the command line (run with the -e switch to see the full stack trace of the errors) return me this error and I don't find a way to manage that:[INFO] Error stacktraces are turned on.
[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 Batch mode
[INFO] Archetype defined by properties
Downloading: http://maven.alfresco.com/nexus/content/com/sourcesense/alfresco/maven-alfresco-amp-archetype/1.9.1/...
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 4.459s
[INFO] Finished at: Wed Jan 18 11:44:12 CET 2012
[INFO] Final Memory: 13M/309M
[INFO] ————————————————————————
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.sourcesense.alfresco:maven-alfresco-amp-archetype:1.9.1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.sourcesense.alfresco:maven-alfresco-amp-archetype:1.9.1)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: The desired archetype does not exist (com.sourcesense.alfresco:maven-alfresco-amp-archetype:1.9.1)
at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:221)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
… 19 more
Caused by: org.apache.maven.archetype.exception.UnknownArchetype: The desired archetype does not exist (com.sourcesense.alfresco:maven-alfresco-amp-archetype:1.9.1)
at org.apache.maven.archetype.ui.generation.DefaultArchetypeGenerationConfigurator.configureArchetype(DefaultArchetypeGenerationConfigurator.java:117)
at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:205)
… 21 more
[ERROR]
[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
01-27-2012 04:15 PM
02-06-2012 05:08 AM
04-23-2012 10:27 AM
1. Integrating Alfresco SDK locally
As you know, Alfresco SDK includes all dependencies needed to run an Alfresco and to use it.
Problem : How can we add this dependency into our Maven repository ?
Via a small project written in Java and compiled using Maven (if you want to make Maven as well do it anywhere ^^ ).
Principle?
List all dependencies present in AlfrescoEmbedded SDK and integrate them into our repository via a script (. Bat or. Sh)
…
If you want to resolve this problem, you have multiple choice.
1. First, identify one by one each dependency (and repository). Next, create files… if you have time to spend…
2. Second, you have to wait that Alfresco will add all dependency in his official repository or create a pom.xml with them.
Third, it's a mix between all of preceding solutions.
04-23-2012 01:24 PM
#!/bin/sh
# This script will upload the Alfresco SDK artifacts to a local Maven repository.
#main fields to update at your situation expetially for Version and Classifier
ALFRESCO_SDK_VERSION=4.0.c
ALFRESCO_SDK_CLASSIFIER=community
ALFRESCO_SDK_PACKAGING=jar
#not used
MAVEN_REPOSITORY_DIR=.m2/repository
MAVEN_REPOSITORY_ID=alfresco-sdk
#needs the already extracted SDK path
SDK_DIR=/home/godtaxidriver/workspace/alfresco-community-SDK-4.0
mvn install:install-file -Dfile=$SDK_DIR/lib/server/alfresco-core-4.0.c.jar -DgroupId=org.alfresco.sdk -DartifactId=alfresco-core -Dversion=4.0.c -Dclassifier=$ALFRESCO_SDK_CLASSIFIER -Dpackaging=$ALFRESCO_SDK_PACKAGING
mvn install:install-file -Dfile=$SDK_DIR/lib/server/alfresco-remote-api-4.0.c.jar -DgroupId=org.alfresco.sdk -DartifactId=alfresco-remote-api -Dversion=$ALFRESCO_SDK_VERSION -Dclassifier=$ALFRESCO_SDK_CLASSIFIER -Dpackaging=$ALFRESCO_SDK_PACKAGING
mvn install:install-file -Dfile=$SDK_DIR/lib/server/alfresco-repository-4.0.c.jar -DgroupId=org.alfresco.sdk -DartifactId=alfresco-repository -Dversion=$ALFRESCO_SDK_VERSION -Dclassifier=$ALFRESCO_SDK_CLASSIFIER -Dpackaging=$ALFRESCO_SDK_PACKAGING
mvn install:install-file -Dfile=$SDK_DIR/lib/server/alfresco-web-client-4.0.c.jar -DgroupId=org.alfresco.sdk -DartifactId=alfresco-web-client -Dversion=$ALFRESCO_SDK_VERSION -Dclassifier=$ALFRESCO_SDK_CLASSIFIER -Dpackaging=$ALFRESCO_SDK_PACKAGING
mvn install:install-file -Dfile=$SDK_DIR/lib/server/alfresco-data-model-4.0.c.jar -DgroupId=org.alfresco.sdk -DartifactId=alfresco-data-model -Dversion=$ALFRESCO_SDK_VERSION -Dclassifier=$ALFRESCO_SDK_CLASSIFIER -Dpackaging=$ALFRESCO_SDK_PACKAGING
exit 0
<!– Alfresco SDK extra dependencies –>
<dependency>
<groupId>org.alfresco.sdk</groupId>
<artifactId>alfresco-core</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
<classifier>community</classifier>
</dependency>
<dependency>
<groupId>org.alfresco.sdk</groupId>
<artifactId>alfresco-remote-api</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
<classifier>community</classifier>
</dependency>
<dependency>
<groupId>org.alfresco.sdk</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
<classifier>community</classifier>
</dependency>
<dependency>
<groupId>org.alfresco.sdk</groupId>
<artifactId>alfresco-web-client</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
<classifier>community</classifier>
</dependency>
<dependency>
<groupId>org.alfresco.sdk</groupId>
<artifactId>alfresco-data-model</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
<classifier>community</classifier>
</dependency>
03-19-2014 03:04 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.