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-27-2021 02:50 AM
Can I just check which version of Alfresco you are using - is it 6.0 (as tagged) or 6.2 (as mentioned in your dev environment description)?
Thanks,
01-27-2021 02:57 AM
Thanks EddieMay for the response. It is 6.2 enterprise.
01-27-2021 03:47 AM
Hello @nikhilesh_s1vak ,
I think you might have been fooled by your IDE,
as described here: https://stackoverflow.com/a/55572922/1654265
I would try:
Hope that helps
01-28-2021 02:02 AM
Hello @andrealigios, Thanks for the response. I have referred the above link and tried to run it from CLI also but the build fails throwing the compilation errors.
I resolved the similar issue with 3rd party Jars (example: xml api) but this happens with alfresco.reposiotry and alfresco.data.model.api jars.
Explore our Alfresco products with the links below. Use labels to filter content by product module.