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
I want to do the following.
https://hub.alfresco.com/t5/alfresco-content-services-forum/i-want-to-do-a-post-method-when-creating-a-file-in-a-folder/m-p/299157#M19538
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
@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-project-in-eclipse/m-p/296208/highlight/true#M17793
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-sdk-4/m-p/298694/highlight/true#M19227
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
@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.
Hi @abhinavmishra14
I have followed all your steps and it worked well and without issue.
Now from Eclipse how can I start with something silly? Develop simple things. Where they explain step by step how to do anything with an eclipse. My goal is to get to this point. https://hub.alfresco.com/t5/alfresco-content-services-forum/i-want-to-do-a-post-method-when-creating-a-file-in-a-folder/m-p/299157#M19538 Because I am already in Eclipse but I could not do anything Haha. I think doing a practical exercise with Eclipse would help me a lot.
Thank you.
If you have generated projects and able to start via docker, the next step would be to either add customizations in repo module or share module. In your case, you want to add a java based behavior. So you can go to repo module and add your custom behavior and then start the containers to test it.
For reference, clone this repository: https://github.com/jpotts/alfresco-developer-series.git
git clone https://github.com/jpotts/alfresco-developer-series.git
and Import this project in eclipse: https://github.com/jpotts/alfresco-developer-series/tree/master/behaviors/behavior-tutorial
Taking the reference from this tutorial add custom behavior in your project.
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)
could you help me with this error? Thank you!
You can ignore that warning. Try to run the project if using SDK3.x
-Xms1024m -Xmx4096m -XX:PermSize=1024m
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
I managed to install the repository from an official tutorial on the Alfresco page.
Now how do I start to study all this? Why is this so difficult? Hahaha