Maven Setup for Alfresco SDK on eclipse

cancel
Showing results for 
Search instead for 
Did you mean: 

Maven Setup for Alfresco SDK on eclipse

sakshik
Established Member
3 3 5,315

Alfresco SDK Setup on Eclipse

  1.      Install Maven:
  •    Add the path of bin folder of the created directory apache-maven-3.5.0 to the PATH environment variable

Confirm with mvn –v after entering bin directory.

 

  1.      Create Maven project:
  •    Open eclipse

   Make sure your internet connection doesn't have a firewall enabled 

  •  Go to Windows – Open Perspective – Java
  •  File – New –Project – Maven Project – Leave everything as default - Click Next – Click on Configure button – Add Remote catalog –

Catalog File: https://artifacts.alfresco.com/nexus/content/groups/public/archetype-catalog.xml

          Description: Alfresco Public

  •     Click OK
  •     On the ‘New Maven Project’ dialog, select All catalog in the drop down
  • Type org.alfresco.maven in the filter: select allinone – Click Next

Group Id: org.alfresco.training

Artifact Id: ws4js-repo

  •    Click on Finish
  1.         If an error comes saying plugin execution not covered by life cycle configuration.

Right click on error – Quick fix – select permanently mark goal run in pom.xml as ignored in Eclipse build 

  1. 4. Right click on project – Select Maven- Update project
  2.      Create custom Run Configuration for Maven project:
  • On the Eclipse toolbar select 'Run', and then 'Run Configurations’ – This will open the 'Run Configurations' dialog box.
  • Select the Maven Build

"Maven Integration Test REPO" and edit the Base directory to point to your project. Make sure it

Matches the following:

Base directory: ${workspace_loc:/ws4js-repo}

In Goal: clean install –DskipTests=true alfresco:run

 

Note: If an error comes saying: no compiler is provided in this environment perhaps you are running on a jre instead of jdk

Go to Windows – Preferences – Java – Installed JREs

Change the path from jre to jdk click OK

Then Run the same way.

It will take some time

 

  1.     Check browser : localhost:8080/share

Credentials:

Login: admin

Password: admin

3 Comments
billydekid
Established Member II

Hi Sakshi Kochhar‌,

Thanks for this nice quick tutorial.

I just want to add an option when adding archetype catalog.

As mentioned on my posting here Got different alfresco archetype version (shell prompt vs IDE) , that the Alfresco's nexus or artifacts archetype-catalog list is not the latest version (I don't know why?). The solution is to choose from "Maven Central" - http://repo.maven.apache.org/maven2/archetype-catalog.xml option as another archetype catalog source.

In example, alfresco's nexus/artifacts still holds alfresco-platform-jar-archetype latest version 3.0.0-beta-5, while Maven Central is 3.0.1.

Thanks,

[bayu]

Tabu
Member II

Hello sakshik,

Hope your doing well.

These were the best guidelines provided for creating the maven project using Eclipse.
I wanted to create the maven project as well for Alfresco Community Edition 5.1.f (Platform) & 5.1.g (Share) version. 
Please do provide the Remote Catalog link for creating the All-in-one Archetype which is compatible with the above mentioned Alfresco version.

Any help would be appreciated...Thank you!

amar6792
Active Member

@sakshik 

I am currently working on Windows 10 and follow all the steps as you described but while running the configuration I am getting the following error,

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/amar.sutar/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.18.0.20210618-2246/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/amar.sutar/eclipse/java-2021-09/eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]

Can you Please help me with this?

Thanks and Regards.