Greetings Guys,
I've created an all-in-one project using maven sdk for alfresco. I'm using version maven-sdk version 4.0, because I'm still upgrading my Alfresco 5.2.x to Alfresco 6.2.x.
I am successfully able to build and deploy the repo.amp for my project, but when I try to build my share.amp for the same project I'm missing all the files that were stored in the config.alfresco folder in maven-sdk 2.2.0.
I read numerous forums for exactly the same thing, but simply cannot get the right answer.
Here is how my Folder structure looks in Alfresco 5.2.x + SDK 2.2.0:
And here's how the folder structure looks in Alfresco 6.2.x + SDK 4.0.0:
On further investigation, I see that the folder web-extension is getting archived in the jar file as shown in the image below:
Kindly help me get the structure right - wherein the custom templates and ftl files are packaged correctly into the share.amp file.
Thanks and Regards,
-Mohit
Solved! Go to Solution.
Compared to sdk2.x, sdk4.x has slightly different folder structure.
Take a look at this project, https://github.com/jpotts/alfresco-sdk-upgrader/ . it is not for sdk2.x but will give you some idea on sdk upgrades.
You can also refer to this post: https://hub.alfresco.com/t5/alfresco-content-services-forum/upgrading-from-sdk-3-0-1-to-sdk4/td-p/29...
Whatever you are seeing is correct and default. You should move all your webscripts, messages etc. under web-extension directory always. So map the files and configs as per new structure. Everything goes to jar file except what's in "alfresco\module\<projectmodule>" You would have to enable the amp assembly plugin. Look for "maven-assembly-plugin" in your parent pom file and uncomment it.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>build-amp-file</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <appendAssemblyId>false</appendAssemblyId> <descriptor>src/main/assembly/amp.xml</descriptor> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <version>${alfresco.sdk.version}</version> </dependency> </dependencies> </plugin>
However, this will generate amp as well as jar file both. You would still see the web-extension under the jar file.
Checkout these docs:
https://docs.alfresco.com/content-services/6.0/develop/sdk/#structureaio
https://docs.alfresco.com/content-services/6.0/develop/sdk/#my-all-in-one-project-share
Compared to sdk2.x, sdk4.x has slightly different folder structure.
Take a look at this project, https://github.com/jpotts/alfresco-sdk-upgrader/ . it is not for sdk2.x but will give you some idea on sdk upgrades.
You can also refer to this post: https://hub.alfresco.com/t5/alfresco-content-services-forum/upgrading-from-sdk-3-0-1-to-sdk4/td-p/29...
Whatever you are seeing is correct and default. You should move all your webscripts, messages etc. under web-extension directory always. So map the files and configs as per new structure. Everything goes to jar file except what's in "alfresco\module\<projectmodule>" You would have to enable the amp assembly plugin. Look for "maven-assembly-plugin" in your parent pom file and uncomment it.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>build-amp-file</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <appendAssemblyId>false</appendAssemblyId> <descriptor>src/main/assembly/amp.xml</descriptor> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.alfresco.maven.plugin</groupId> <artifactId>alfresco-maven-plugin</artifactId> <version>${alfresco.sdk.version}</version> </dependency> </dependencies> </plugin>
However, this will generate amp as well as jar file both. You would still see the web-extension under the jar file.
Checkout these docs:
https://docs.alfresco.com/content-services/6.0/develop/sdk/#structureaio
https://docs.alfresco.com/content-services/6.0/develop/sdk/#my-all-in-one-project-share
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.