cancel
Showing results for 
Search instead for 
Did you mean: 

Custom changes not being reflected in Java files

jlabuelo
Champ on-the-rise
Champ on-the-rise
hi there

Lets see if someone can give me a hand here please.

We are trying to customize the Alfresco Explorer in version 4.2 using Alfresco Maven SDK 1.1. We have built the project over Eclipse and seems to go ok, however when we try to make a single change in the java files, seems that nothing is happening. For example we just added a new image in the pageTag.java file and it is not shown when the amp or war are created.

as I said we are using maven with architype "Alfresco AMP" as it is shown in the image. When I run "mvn integration-test -Pamp-to-war" the project is built fine and no error is shown however no change appears in the image, seems that the changes that I apply in the Java files are not taken into consideration.

Does anyone know what I am doing wrong please? If you have any guide or linke to show how to customize the java files in 4.2 I will really appreciate it

I am following the instructions shown in here:

http://docs.alfresco.com/4.2/tasks/dev-extensions-maven-sdk-quick-start.html

Thanks a lot in advanec
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

you can't (and never should) change Alfresco source files via an extension module build by the SDK. The Alfresco classes are bundled in their own JAR and can't be overriden via an AMP addon (with some trickery, you can include classes that take precedence over the Alfresco classes but this wouldn't be a stable solution).
Your project builds the class just fine and it is most likely deployed in the final WAR, but it is simply not used as the original class is there and has precedence.

Also, it is highly discouraged to still be customizing the Explorer UI. That client is deprecated in 4.2 and has been removed with 5.0, so you are investing effort into something that either locks you to an old / obsolete version of Alfresco or is a work for the trash bin.

In order to customize the PageTag class you would have to rebuild the alfresco-web-client JAR from source (including your changes). This is not something the SDK helps you with as this is not related to any standard development use cases. The difficulty in customizing the Explorer UI with regards to something as simple as an image is also one of the reasons why it has been deprecated and the newer Share client had been introduced before removal of Explorer.

Regards
Axel