During the hackathon at Alfresco Summit in London I worked on porting the nice features of the Alfresco SDK 2.0 to work with Alfresco 4.2.x.
Sadly, we have hit a bump on the road: The Alfresco artifacts changed too much between 4.2.x and 5.x. Because of this we have to branch out and maintain two separate branches. What does this mean for you? Well, remember these two sentences an help other users out, as this will be a very difficult thing to grasp:
FOR ALFRESCO 4.2.x USE ALFRESCO SDK 1.2.0 OR NEWER
FOR ALFRESCO 5.X USE ALFRESCO SDK 2.0 OR NEWER
We have not released 1.2.0 just yet, but we do have a snapshot version out that seems pretty stable, but I need people to help test it.
Here is a small guide on how to use Alfresco SDK 1.2.0-SNAPSHOT to work with 4.2.x.
First of all you need to allow Maven to use Sonatype’s snapshots repository. You have to add this to your ~/.m2/settings.xml
Next up you generate a project from the archetype:
mvn archetype:generate -DarchetypeCatalog=https://oss.sonatype.org/content/repositories/snapshots/archetype-catalog.xml -Dfilter=org.alfresco:
Select the archetype you want to use, and make sure to select 1.2.0-SNAPSHOT.
Now you’re ready to go, simply run ./run.sh to get started and enjoy all the nice features.
Please raise an issue on our GitHub issue tracker if you encounter any bugs.
Testing #AlfrescoSDK 2.0 against 4.2? Read this guide and help provide feedback! http://t.co/VxBJhjRWkz
I’ve tested version 1.2.0-SNAPSHOT on https://github.com/softwareloop/uploader-plus – a main pom project with two amp modules, one for repo the other for share.
I was upgrading from 1.1.1 and I had to modify tomcat/context.xml and add a few properties in the poms but, other than that, the SDK worked perfectly. Thanks for the great work!
Just tested this out using the all-in-one and it works well. Even was able to modify the POM to point to the Enterprise version 18.104.22.168 and it worked.
One question I have and noticed this with the SDK 5 all-in-one under the share interface the all of the Tools under the Admin Tools are blank. Any idea why?
I’ve faced the same problem using SKD 2.0.0-SNAPSHOT for alfresco 5.0.b
The Share admin console is blank because development mode for Share is activated. This, sadly, is a known bug in Share and it does not seem like they will fix it. See https://issues.alfresco.com/jira/browse/ALF-9970 for more details.
The easy answer is to simply disable development mode in share-config-custom (look in src/test/resources).
I discussed a potential fix for this at summit in London, but it’s work in progress, and it does not seem like Alfresco wants to fix the underlying issue.
One other item I noticed was that for the 1.2 SDK it has the alfresco.rm.version set to 2.3.a.1 which will not work with alfresco 4.2.
Excellent, thanks for the feedback. I’ll do a blog post about upgrading from 1.1.1 to 1.2 once we get closer to release 🙂
Thanks, Ole! I’m trying it out now. So far, so good (i.e. Maven is downloading the Internet). 🙂
Any time. Let me know how it works out
I am getting several errors with SOLR when adding content. The new content appears to not get indexed as well.
org.alfresco.error.AlfrescoRuntimeException: 10100038 api/solr/aclchangesets return status:500
This is with an all-in-one
Solved the SOLR issue by changing from the default H2 database to a MySQL database.
I have noticed that when running the all-in-one that it is loaded items from the config twice. I noticed that the context-repo.xml have the config of the repo-amp as a virtual. Is it possible that this is causing the issue in that since the runner gets a copy of the config from the war and then you add another reference via the virtual. I am not that familiar with using runner so please correct me if I am off base here. Main issue I am running into is that I get an error when it trys to load my custom audit config complaining that it already has that audit key.
Is there a better forum to discuss the SDK 1.2?
I have run into issue trying to run tests with the all-in-one build.
Sorry for not replying here, my email notification has been broken for my blog, so I just saw your comments now. The proper place to discuss would be github, feel free to raise an issue there and I’ll have a look at it.
using the suggested archetype catalog to build my alfresco-amp project this error occurs:
[ERROR] ‘dependencies.dependency.version’ for junit:junit:jar is missing. @ org.alfresco.maven:alfresco-sdk-parent:1.2.0-SNAPSHOT
I checked the pom.xml at:
It seems the junit version is missing.
In addition, searching on github I have found a closed issue which could be related with this problem:
You should update the wrong pom.xml of the alfresco-sdk-parent-1.2.0 archetype.
Hm did you create the project form 1.2.0-SNAPSHOT? In all my tests it adds junit in the project. Could you provide a copy of your pom? Feel free to raise an issue on github if that’s easier.
I think the problem could be related with a multi-module maven projects where both a jar sub-module and alfresco-amp sub-module could inherit the junit dependency configuration from the alfresco-sdk-parent-1.2.0 root archetype.
In the alfresco-amp sub-module the junit version is explicitly declared, in a any other sub-module it could be inherited from the parent archetype (the alfresco-sdk-parent-1.2.0 where it’s mssing…)
I created a blank multi-modules project to reproduce the error, I can’t attach it on github. If you need i can provide the zip.
Here the issue: