cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure the development environment with Eclipse.

viperboys
Star Contributor
Star Contributor

Hi

I want to start developing custom modules in Alfresco. For this I have installed the following.

* Eclipse IDE for Java Developers version 2020-03 (4.15.0).

* Java (javac 14.0.1).

* Maven (Apache Maven 3.6.3.).

* JDK 14.0.1.

* Windows 10 64BIT

I followed these steps

https://docs.alfresco.com/sdk2.1/concepts/alfresco-sdk-installing-prerequisite-software.html

https://docs.alfresco.com/5.2/tasks/sdk-develop-eclipse.html

image

I want to do the following.

https://hub.alfresco.com/t5/alfresco-content-services-forum/i-want-to-do-a-post-method-when-creating...

My question is. How do I start doing this from everything I have.

How do I access from the browser?

How can I start developing what I want?

Thank you

2 ACCEPTED ANSWERS

abhinavmishra14
World-Class Innovator
World-Class Innovator

@viperboys which version of ACS you are using? 5.2.x or 6.x ?

For 6.x version see the steps here: 

https://hub.alfresco.com/t5/alfresco-content-services-forum/problem-when-creating-an-all-in-one-proj...

Planning to start with 6.x, see this post: https://hub.alfresco.com/t5/alfresco-content-services-forum/get-started-with-alfresco-6-and-alfresco...

Debug in eclipse: https://github.com/Alfresco/alfresco-sdk/blob/master/docs/advanced-topics/debugging/debug-eclipse.md

If using 5.2.x, see the instructions to get basic project:

Generate the new project by following these steps:

1- Open commond prompt and execute following maven command:

For windows cmd:
mvn archetype:generate -Dfilter=org.alfresco:

For windows powershell:
mvn archetype:generate -Dfilter="org.alfresco:"

For mac/linux terminals, either can be used.

2- You will be asked to choose the archetype. SELECT '2'

Choose archetype:
1: remote -> org.alfresco.maven.archetype:activiti-jar-archetype (DEPRECATED - UNSUPPORTED - EXPERIMENTAL)
2: remote -> org.alfresco.maven.archetype:alfresco-allinone-archetype (Sample multi-module project for All-in-One development on the Alfresco platform. Includes modules for Platform/Repository JAR and Share JAR)
3: remote -> org.alfresco.maven.archetype:alfresco-amp-archetype (Sample project with full support for lifecycle and rapid development of Repository AMPs (Alfresco Module Packages))
4: remote -> org.alfresco.maven.archetype:alfresco-platform-jar-archetype (Sample project with full support for lifecycle and rapid development of Platform/Repository JARs and AMPs (Alfresco Module Packages))
5: remote -> org.alfresco.maven.archetype:alfresco-share-jar-archetype (Share project with full support for lifecycle and rapid development of JARs and AMPs (Alfresco Module
        Packages))
6: remote -> org.alfresco.maven.archetype:share-amp-archetype (Share project with full support for lifecycle and rapid development of AMPs (Alfresco Module
        Packages))

3- Select '11' for the SDK version as 3.1.0

Choose org.alfresco.maven.archetype:alfresco-allinone-archetype version:
1: 2.0.0-beta-1
2: 2.0.0-beta-2
3: 2.0.0-beta-3
4: 2.0.0-beta-4
5: 2.0.0
6: 2.1.0
7: 2.1.1
8: 2.2.0
9: 3.0.0
10: 3.0.1
11: 3.1.0
12: 4.0.0-beta-1
13: 4.0.0
14: 4.1.0
Choose a number: 14:11

4- Provide 'groupId'

Define value for property 'groupId':

e.g. com.demo.aio.sdk3

5- Provide the 'artifactId' (name of your project)

Define value for property 'artifactId':

e.g.: sdk3-aio-project

6- Provide package:

Define value for property 'package' com.demo.aio.sdk3: :

Keep as is. Press enter.

7- You will be asked to confirm the properties:

Confirm properties configuration:
groupId: com.demo.aio.sdk3
artifactId: sdk3-aio-project
version: 1.0-SNAPSHOT
package: com.demo.aio.sdk3
 Y: :

Press 'Y', if everything looks good. A sample project will be generated. 

8- Import them in eclipse and get started.

Note: JDK 1.8 is recommended for SDK3.1.0

To debug in eclipse (SDK3.1.0): http://javaworld-abhinav.blogspot.com/2015/07/debugging-alfresco-and-share-in-eclipse.html

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

@carloshc95  looking at your error it seems you are using windows and i assume you have already installed Docker Desktop for windows (https://docs.docker.com/docker-for-windows/release-notes/

Latest version can be downloaded from here just in case: https://download.docker.com/win/stable/Docker%20Desktop%20Installer.exe

Open poweshell and check following:

docker --version

docker-compose -version

Both should return version successfuly, which idicates installation was proper.

Have you created user account on docker hub? 

You must create a user account on docker hub and when you start Docker Desktop, you must login using the credentials you created. It will allow downloading alfresco/share and other images from docker hub (for community versions). 

Go to: https://hub.docker.com/signup?next=%2F%3Foverlay%3Donboarding to create an account.

To login, use powersehll or docker desktop signin option after user account creation. Posweshell login command shown below.

PS: docker login
		Authenticating with existing credentials...
		Stored credentials invalid or expired
		Username (xyz@gmail.com): xyz
		Password:
		Login Succeeded

https://docs.docker.com/engine/reference/commandline/login/

Using docker desktop: https://www.docker.com/blog/using-docker-desktop-and-docker-hub-together-part-1/

Before starting with SDK4.x and docker based project, Installation of docker engine on your development environment and user account creation is pre-requisite. 

Understand the concept:
https://docs.alfresco.com/6.2/concepts/deploy-concepts.html

Visit here for more details: https://docs.alfresco.com/6.2/concepts/deploy-prereqs.html

If problem stil persists, then create a separate thread with the logs and steps you have followed.

Note that, java11 is mandatory to run the sdk based projects. See details on deploy-prereqs shared above.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

14 REPLIES 14

@viperboys @carloshc95 were you able to resolve the issue ?

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

yes! thanks @abhinavmishra14 

 I managed to properly configure my Docker and I already have my Alfresco project. Now to develop my customizations

thanks @carloshc95 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

Hi!

Following the steps indicated in this post that I created my project, but I get the following error in the pom.xml file.

Plugin execution not covered by lifecycle configuration: org.zeroturnaround:jrebel-maven-plugin:1.1.8:generate (execution: generate-rebel-xml, phase: process-resources)

image

could you help me with this error? Thank you!

You can ignore that warning. Try to run the project if using SDK3.x

1- Right click the pom file of the project which you want to debug.
2- Select Run > Debug Configuration from main menu.
3- Click the New Launch Configuration icon on the top left of the dialog.
4- Give the Debug Configuration a suitable name.
5- For Goals enter- goal as "alfresco:run"
6- On the JRE tab add the following VM arguments: 
-Xms1024m -Xmx4096m -XX:PermSize=1024m
 to avoid PermGenexceptions.
7- Click apply and then click debug.
 

http://javaworld-abhinav.blogspot.com/2015/07/debugging-alfresco-and-share-in-eclipse.html

For SDK 4.X  use the run.bat/run.sh. Look at the README file available in the generated project

~Abhinav
(ACSCE, AWS SAA, Azure Admin)