I’m very pleased to officially announce the beta4 release of the Alfresco SDK 2.0.
Gab has written a great post about the release, which includes a ton of goodies, like hot reloading java code, web scripts and client side resources. We’ve also included a records management profile and extra goodies.
We’re also officially now on Maven Central, so fire up your terminal and run “mvn archetype:generate -Dfilter=org.alfresco.maven.archetype:” – or look at the video below to see how to use it from Eclipse.
It’s been a huge team effort, we’ve had a lot of people help test it out and contribute.
There is a lot of extra stuff going into the final 2.0 release and we’ll be working hard to stabilise these new features, introduce even more features and documentation.
I’ll continue my work with the SDK, create new videos, howtos etc. During the hackathon at Alfresco Summit in London, I’ll be working on back porting some of the reloading features to 4.2.x.
To wrap it all up I’ve created a video that shows how to setup and use the SDK with Eclipse. Enjoy!
#AlfrescoSDK 2.0.0-beta4 is officially released! http://t.co/8WX12c7d1N Guide to setup and use with Eclipse: https://t.co/XuKYm3qIqw
Hi Ole, getting the following error with
Eclipse Java EE IDE for Web Developers.
Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800
and following your video !! Any hints for me, what am I missing ?
Description Resource Path Location Type
Project build error: Unknown packaging: amp pom.xml /my-alfresco-amp line 9 Maven pom Loading Problem
Project build error: Unresolveable build extension: Plugin org.alfresco.maven.plugin:alfresco-maven-plugin:2.0.0-beta-4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.alfresco.maven.plugin:alfresco-maven-plugin:jar:2.0.0-beta-4 -> org.apache.maven:maven-plugin-api:jar:3.0.4 -> org.sonatype.sisu:sisu-inject-plexus:jar:2.3.0 -> org.sonatype.sisu.inject:guice-plexus-shim:jar:2.3.0 -> org.sonatype.sisu.inject:guice-plexus-binders:jar:2.3.0 -> org.sonatype.sisu.inject:guice-plexus-scanners:jar:2.3.0 pom.xml /my-alfresco-amp line 1 Maven pom Loading Problem
Sorry forgot to say that I’m working on MAC OSX 10.10 !
Hi Ole,
nice work, but It seems hot-reloading works only with the last Eclipse (Luna 4.4.1).
In the previous Eclipse Helios the maven build (mvn integration-test -Pamp-to-war) is successfully completed, but the code hot-reloading doesn’t work.
Furthermore I tried to use the SDK+spring-loaded out of the eclipse IDE (using the command line), but it seems spring-loaded does not update the classloader when code is changed from classes. Here my steps:
1. create a project “alfresco-amp” in a normal way (mvn archetype:generate -Dfilter=org.alfresco:)
2. export MAVEN_OPTS=”-Xms256m -Xmx1G -XX:PermSize=300m -javaagent:/code/libs/springloaded-1.2.0.RELEASE.jar -noverify”
3. run mvn integration-test -Pamp-to-war
4. after the ProtocolHandler starting, make some change to the code (i.e. java-backed webscript) using vi or gedit
5. refresh the webscript url in your browser
6. the expected changing is not visible
App stack:
– java version “1.7.0_07”
– Apache Maven 3.2.3
– SDK 2.0.0-beta-4
– spring-loaded 1.2.0.RELEASE
Hi Joel3
The reloading happens from the target/ directory. If you are using IntelliJ or Eclipse it will compile / make the project and your changes end up in the proper location in target/
When using vi/gedit or some other standard editor, there is nothing triggering the build process. Try running “mvn compile” or “mvn process-test-resources” manually in the terminal.
I have not tested the previous Eclipse projects, but could it be that you are missing the m2e-wtp plugin?
You say right Ole,
it seems the issue is related to the build process trigger in the Eclipse Helios. It souds like a m2e plugin issue…I will perform a deep investigation.
Manually running “mvn compile” the hot-reloading works!
Thanks for your feedback
😉
Hi Ole, i´m going crazy with reloading… I´m working on a share amp project, my web-script (javascript) is not reloading. Well, as I can understand spring loaded is for changing java, so when developing a controller with javascript, there is nothing to do, am I right?
For now, I found that doing this, it works
1. mvn install (compile doesn´t work if I only change .js files, I get “nothing to compile” 😉
2. Refresh Web Scripts from Web Script Home page
It´s a deal, I don´t have to restart but it would be great if everything work like in your video, just save!
If possible to do that with javascript? there is a shorter path to get it than I did?
thx.
Hi RURIA
I will need a bit more information to help you better, but I can give you some pointers for now. If you don’t manage to solve it, please find me on IRC, #alfresco on FreeNode (or just go to chat.alfresco.com), my username is ohej.
You’re right, spring-loaded does reloading of java classes, but it does not affect server side web scripts.
For share you should pay attention to the following:
– Make sure that development mode is turned on
Look for share-config-custom.xml in src/test/, and look in your own code and see if you by chance have your own share-config-custom.xml. Verify by checking the “Admin tools” section in share – if development mode is turned on the admin tools page will be blank.
– Do “mvn compile” instead of install.
Start out by verifying development mode, change a file and do “mvn compile” to see if the changes are picked up. Only once you have it working from the command line you can start worrying about Eclipse/IntelliJ.
Are you including other server side javascripts in your controller? If so, you might be hitting this issue: https://issues.alfresco.com/jira/browse/ALF-21244
Hope this helps, otherwise come find me on IRC.