I'm trying to setup an alfresco development environment with maven
Maven 3.0.4
Eclipse Indigo
eclipse m2e (Maven integration for eclipse) installed
Java Sun JDK 6.0 update 26
Linux (debian, shouldn't be related)
I need you to validate / correct / advice me on how to achieve the result...
I've encountered issues and I'm not very expert with maven.
Here's what I've done...
from command line I execute this 3 times:
$ mvn archetype:generate -DarchetypeCatalog=http://maven.alfresco.com
choosing
groupId = com.mytest.alfresco
and artifactId (catalog choice):
* alf-amp (1) - v 0.0.1
* alf-war (2) - v 1.0-SNAPSHOT
* alf-share (3) - v 1.0-SNAPSHOT
full log below
Then I open Eclipse:
Import -> Existing Maven Project
And import the 3 projects
Hit next and I'm presented with 2 errors:
* alf-war: No marketplace entries found to handle
maven-dependency-plugin:2.3:unpack-dependencies in Eclipse. Please see
Help for more information.
* alf-amp: No marketplace entries found to handle
maven-nosnapshot-plugin:0.0.5:strip in Eclipse. Please see Help for
more information.
I select for both "Do Not Execute (add to pom)" and hit Finish
Is this allright?
That selection add this to my pom.xml files:
* alf-war:
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e
settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
<versionRange>
[2.3,)
</versionRange>
<goals>
<goal>
unpack-dependencies
</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
* alf-amp:
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e
settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.sourcesense.maven
</groupId>
<artifactId>
maven-nosnapshot-plugin
</artifactId>
<versionRange>
[0.0.5,)
</versionRange>
<goals>
<goal>strip</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
I've still some error in projects...
* alf-war:
Attribute value "${alfresco.db.datasource.class}" of type NMTOKEN must
be a name token.
in /alf-war/jetty/jetty-env.xml at line 10 XML Problem
here:
<New class="${alfresco.db.datasource.class}">
* alf-amp:
The project was not built since its build path is incomplete. Cannot
find the class file for org.alfresco.util.VersionNumber. Fix the build
path then try building this project
alf-amp Unknown Java Problem
adding:
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-core</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
<classifier>community</classifier>
</dependency>
in the pom.xml and selecting Maven -> update project dependencies makes
this error go away
shouldn't I be able to use every "Embedded" library from the amp?
* alf-share:
Content is not allowed in prolog.
/alf-share/src/books/manual.xml at line 1 XML Problem
here:
#set( $symbol_pound = '#' )
can you help me setup the environment and makes this errors goes away?
The following is the full archetype catalog generations for the 3
projects log:
$ mvn archetype:generate
-DarchetypeCatalog=http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml[INFO]
Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> com.sourcesense.alfresco:maven-alfresco-amp-archetype (Archetype for
building Alfresco AMPs with Maven)
2:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> com.sourcesense.alfresco:maven-alfresco-extension-archetype
(Archetype for building and run Alfresco Extensions (WARs) with Maven)
3:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> org.alfresco.maven:maven-alfresco-share-archetype (Archetype for
building and running Alfresco Share Extensions (WARs) with Maven)
4:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> org.alfresco.maven:maven-alfresco-share-module-archetype (Archetype
for building and running Alfresco Share Modules (JARs) with Maven)
5:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> org.alfresco.enablement.codecamps.cmis:cmis-master-labs-archetype
(CMIS 1.0 Public Review compatible Toolkit using Apache Chemistry
AtomPub TCK)
Choose a number or apply filter (format: [groupId:]artifactId, case
sensitive contains): : 1
Define value for property 'groupId': : com.mytest.alfresco
Define value for property 'artifactId': : alf-amp
Define value for property 'version': 1.0-SNAPSHOT: 0.0.1
Define value for property 'package': com.mytest.alfresco:
Confirm properties configuration:
groupId: com.mytest.alfresco
artifactId: alf-amp
version: 0.0.1
package: com.mytest.alfresco
Y:
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype:
maven-alfresco-amp-archetype:3.9.0
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.mytest.alfresco
[INFO] Parameter: artifactId, Value: alf-amp
[INFO] Parameter: version, Value: 0.0.1
[INFO] Parameter: package, Value: com.mytest.alfresco
[INFO] Parameter: packageInPathFormat, Value: com/mytest/alfresco
[INFO] Parameter: package, Value: com.mytest.alfresco
[INFO] Parameter: version, Value: 0.0.1
[INFO] Parameter: groupId, Value: com.mytest.alfresco
[INFO] Parameter: artifactId, Value: alf-amp
[INFO] project created from Archetype in dir:
/home/mastro/ws/experiments/alfresco-maven-test/alf-amp
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 31 seconds
[INFO] Finished at: Tue Feb 14 17:37:56 CET 2012
[INFO] Final Memory: 22M/210M
[INFO]
------------------------------------------------------------------------
$ mvn archetype:generate
-DarchetypeCatalog=http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> com.sourcesense.alfresco:maven-alfresco-amp-archetype (Archetype for
building Alfresco AMPs with Maven)
2:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> com.sourcesense.alfresco:maven-alfresco-extension-archetype
(Archetype for building and run Alfresco Extensions (WARs) with Maven)
3:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> org.alfresco.maven:maven-alfresco-share-archetype (Archetype for
building and running Alfresco Share Extensions (WARs) with Maven)
4:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> org.alfresco.maven:maven-alfresco-share-module-archetype (Archetype
for building and running Alfresco Share Modules (JARs) with Maven)
5:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> org.alfresco.enablement.codecamps.cmis:cmis-master-labs-archetype
(CMIS 1.0 Public Review compatible Toolkit using Apache Chemistry
AtomPub TCK)
Choose a number or apply filter (format: [groupId:]artifactId, case
sensitive contains): : 2
Define value for property 'groupId': : com.mytest.alfresco
Define value for property 'artifactId': : alf-war
Define value for property 'version': 1.0-SNAPSHOT:
Define value for property 'package': com.mytest.alfresco:
Confirm properties configuration:
groupId: com.mytest.alfresco
artifactId: alf-war
version: 1.0-SNAPSHOT
package: com.mytest.alfresco
Y:
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype:
maven-alfresco-extension-archetype:3.9.0
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.mytest.alfresco
[INFO] Parameter: artifactId, Value: alf-war
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.mytest.alfresco
[INFO] Parameter: packageInPathFormat, Value: com/mytest/alfresco
[INFO] Parameter: package, Value: com.mytest.alfresco
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: groupId, Value: com.mytest.alfresco
[INFO] Parameter: artifactId, Value: alf-war
[INFO] project created from Archetype in dir:
/home/mastro/ws/experiments/alfresco-maven-test/alf-war
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 17 seconds
[INFO] Finished at: Tue Feb 14 17:38:55 CET 2012
[INFO] Final Memory: 22M/213M
[INFO]
------------------------------------------------------------------------
$ mvn archetype:generate
-DarchetypeCatalog=http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> com.sourcesense.alfresco:maven-alfresco-amp-archetype (Archetype for
building Alfresco AMPs with Maven)
2:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> com.sourcesense.alfresco:maven-alfresco-extension-archetype
(Archetype for building and run Alfresco Extensions (WARs) with Maven)
3:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> org.alfresco.maven:maven-alfresco-share-archetype (Archetype for
building and running Alfresco Share Extensions (WARs) with Maven)
4:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> org.alfresco.maven:maven-alfresco-share-module-archetype (Archetype
for building and running Alfresco Share Modules (JARs) with Maven)
5:
http://maven.alfresco.com/nexus/content/repositories/releases/archetype-catalog.xml
-> org.alfresco.enablement.codecamps.cmis:cmis-master-labs-archetype
(CMIS 1.0 Public Review compatible Toolkit using Apache Chemistry
AtomPub TCK)
Choose a number or apply filter (format: [groupId:]artifactId, case
sensitive contains): : 3
Define value for property 'groupId': : com.mytest.alfresco
Define value for property 'artifactId': : alf-share
Define value for property 'version': 1.0-SNAPSHOT:
Define value for property 'package': com.mytest.alfresco:
Confirm properties configuration:
groupId: com.mytest.alfresco
artifactId: alf-share
version: 1.0-SNAPSHOT
package: com.mytest.alfresco
Y:
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype:
maven-alfresco-share-archetype:3.9.0
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.mytest.alfresco
[INFO] Parameter: artifactId, Value: alf-share
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.mytest.alfresco
[INFO] Parameter: packageInPathFormat, Value: com/mytest/alfresco
[INFO] Parameter: package, Value: com.mytest.alfresco
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: groupId, Value: com.mytest.alfresco
[INFO] Parameter: artifactId, Value: alf-share
[INFO] project created from Archetype in dir:
/home/mastro/ws/experiments/alfresco-maven-test/alf-share
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Tue Feb 14 17:39:23 CET 2012
[INFO] Final Memory: 22M/210M
[INFO]
------------------------------------------------------------------------