01-26-2021 11:23 PM
I have been trying to set up the development environment in Alfresco SDK 4.0 with Open JDK 11. I have downloaded the all in one project as mentioned in the documentation and even referred jeff pott's material (https://ecmarchitect.com/alfresco-developer-series-tutorials/maven-sdk/tutorial/tutorial.html#alfres...).
I have applied enterprise license and able to start and test the application. But when i put my customized code in the project structure i faced lot of compilation issues which i have fixed eventaully. But there are few stubborn issues which are related Java modules are giving me a tough time.
Below issues are failing the build.
The package com.xxxx.xxxx.entities is accessible from more than one module: <unnamed>, xxxx.alfresco ( In imports declaration)
The package com.com.xxxx.xxxx.entities conflicts with a package accessible from another module: xxxx.alfresco (In Package declration)
I have understood that this issue is related to JDK modules and fixed it by excluding the unnecessary jar in the pom.xm (for 3rd party jars such as xml and w3c). But the above problems arises when i try to build my customized code.
Below is my development environment i have used:
01-28-2021 02:58 PM
Hi @nikhilesh_s1vak,
let's take a step back and try as follows (all from the CLI):
java -version > output.txt
mvn -version >> output.txt
git clone https://github.com/Alfresco/alfresco-sdk.git sdk-4.2or (if you want to use SSH instead of HTTPS):
git clone git@github.com:Alfresco/alfresco-sdk.git sdk-4.2
cd sdk-4.2
mvn clean install -Pmaven.test.skip=true
mvn archetype:generate -Dfilter=org.alfresco:
<alfresco.bomDependencyArtifactId>acs-packaging</alfresco.bomDependencyArtifactId> <docker.acs.image>quay.io/alfresco/alfresco-content-repository</docker.acs.image> <alfresco.platform.version>6.2.2.10</alfresco.platform.version> <alfresco.share.version>6.2.2.2</alfresco.share.version> <keystore.settings></keystore.settings>
>> output.txtat the end of the command.
If the problem is still there at this point, please post here the output.txt file so we can have a look at it.
If instead the problem is gone, then the culprit was likely a dirty cache or the fact that the right version of the SDK to use today is 4.1 or 4.2.
Hope that helps
01-28-2021 02:58 PM
Hi @nikhilesh_s1vak,
let's take a step back and try as follows (all from the CLI):
java -version > output.txt
mvn -version >> output.txt
git clone https://github.com/Alfresco/alfresco-sdk.git sdk-4.2or (if you want to use SSH instead of HTTPS):
git clone git@github.com:Alfresco/alfresco-sdk.git sdk-4.2
cd sdk-4.2
mvn clean install -Pmaven.test.skip=true
mvn archetype:generate -Dfilter=org.alfresco:
<alfresco.bomDependencyArtifactId>acs-packaging</alfresco.bomDependencyArtifactId> <docker.acs.image>quay.io/alfresco/alfresco-content-repository</docker.acs.image> <alfresco.platform.version>6.2.2.10</alfresco.platform.version> <alfresco.share.version>6.2.2.2</alfresco.share.version> <keystore.settings></keystore.settings>
>> output.txtat the end of the command.
If the problem is still there at this point, please post here the output.txt file so we can have a look at it.
If instead the problem is gone, then the culprit was likely a dirty cache or the fact that the right version of the SDK to use today is 4.1 or 4.2.
Hope that helps
02-01-2021 08:47 AM
Hi @andrealigios,
I have tried the below steps but faced issues while executing them.
Command: java -version > output.txt
Command: mvn clean install -Penterprise-62-tests >> output.txt
Command: mvn archetype:generate -DarchetypeCatalog=local >> output.txt
I have removed the file output from the above command and executed only the below part
Command: mvn archetype:generate -DarchetypeCatalog=local
Please guide me where i am going wrong.
02-02-2021 08:07 AM
Which OS are you on? Which CLI are you using?
What does it mean that it doesn't capture the ouptut in the output.txt file? That you see the output but the file remains empty, that the file is not even created, or that you don't even see the output of those commands?
Do you have write permission on that folder? On Linux & Mac you can do:
>> ~/output.txt
to create the file in your user's home, where you definitely have write permissions.
Please, ensure you've followed all the steps above (especially the git clone) and then describe more deeply what happens next, thank you.
02-03-2021 03:49 AM
Hi @andrealigios ,
Which OS are you on? Which CLI are you using?
The file(output.txt) is created but the file remains empty. I see output of commands on the console but the file is empty. The only information i could see in the file is the maven version output (mvn -version >> output.txt) .
The git clone is successful but executing the below mentioned command doesn't show anything on the console.
mvn clean install -Penterprise-62-tests >> output.txt
So i have removed the output.txt from the above command and executed the command (mvn clean install -Penterprise-62-tests) which gave me 401 unauthorized exception. I fixed that by keeping an entry in the settings.xml and executed the same command again which downloads all the dependencies.
I have generated the all-in-one archetype as well without writing the resonse to output.txt file. But when i try to write the response to output.txt file, console doesn't show anything and the file remains empty.
02-03-2021 06:14 AM
dir > test.txtand see if it works?
About the repository in the settings.xml you're right, for the Enterprise version it is needed.
I'll ensure we'll document it better if it's not already so.
Explore our Alfresco products with the links below. Use labels to filter content by product module.