- Install Maven (E.G. use 'sudo apt-get install maven2')
- Install Subversion (E.G. use 'sudo apt-get install subversion')
- Install the Subversion Java bindinds (E.G. use 'sudo apt-get install libsvn-java)
- Install Eclipse (you will need it as the I(ntegrated) D(evelopment) E(nvironment)
- Install the Eclipse Maven plug-in (The download site is 'http://download.eclipse.org/technology/m2e/releases'
- Install the Subversion plug-in (The easisest is to enter subversion in the Eclipse Market Place)
- In Eclipse create a new workspace
- Change the directory to the Eclipse workspace
- Then run the following command
The above command contains 2 place holders. One specifies your domain the other one should name the project. For example the project 'my-repo' will be created.mvn archetype:generate -DarchetypeGroupId=org.alfresco -DarchetypeArtifactId=maven-alfresco-amp-archetype \ -DarchetypeVersion=3.9.1 -DgroupId=${Your domain here, E.G. de.ecg} -DartifactId=${Your project name -repo here, E.G. my-repo} -Dversion=1.0-SNAPSHOT \ -DarchetypeRepository=https://artifacts.alfresco.com/nexus/content/repositories/releases -DinteractiveMode=false
Create the project for the Share extensions
- Change the directory to the Eclipse workspace
- Then run the following command
Create the Eclipse projectsmvn archetype:generate -DarchetypeGroupId=org.alfresco.maven -DarchetypeArtifactId=maven-alfresco-share-archetype \ -DarchetypeVersion=3.9.1 -DgroupId=${Your domain here} -DartifactId=${Your project name -share here} -Dversion=1.0-SNAPSHOT \ -DarchetypeRepository=https://artifacts.alfresco.com/nexus/content/repositories/releases -DinteractiveMode=false
- Open Eclipse
- Click on 'Import -> Maven -> Existing Maven Project into Workspace'
- Navigate into the folder of the repo project and confirm
- The download of the several dependent artifacts / libraries to your local Maven cache may take a while
- Do the same for the Share project
If you should use the above mentioned command to create a repository extension then there seems to be an issue with Alfresco-s movement from HTTP to HTTPS for the artifacts repository. Just tried the steps from above again today without success. Alfresco replaced the amp plugin pom-file by a message which tells you that it was moved to the HTTPS repo. Unfortunately the resulting example project does not reflect that movement. So you have to edit the pom.xml of your 'my-repo' project by replacing http://artifacts.alfresco.com with https://artifacts.alfresco.com .
ReplyDeleteThere was meanwhile a new page created which explains quite all: https://artifacts.alfresco.com/nexus/content/repositories/alfresco-docs/alfresco-lifecycle-aggregator/latest/index.html . Here the steps:
ReplyDelete(1) Install Maven (ZIP distribution)
(2) Install the JDK 7
(3) Set the M3_HOME and JAVA_HOME environment variables by extending the PATH variable to use the bin subfolders
(4) Try to run the command 'mvn' on the command line
(5) Create a new project by using the AMP archetype
(6) Build the empty project by using 'mvn install'
(7) I think Netbeans is quite better than Eclipse to work directly with Maven projects. So you can just open the Maven project directly with Netbeans