Hello Everyone,
As I know, Alfresco SDK 4.1 generates Jar file on build. We can configure it for AMP file as well. However, for my deployment, I would need WAR file to be generated for my custom code.
Can anyone please let me know how can I achieve this? What are the steps needed in SDK?
Thanks in Advance.
Solved! Go to Solution.
SDK 4.x doesn't generate war files. Even previous version of sdk 3.x also does't generate war files as far as i know. However with sdk3.x you had option to create overlay project and build a custom war file by adding your customization to alfresco/share war files.
SDK4.x is totally based on docker, so it is recommended to use its capabilities meant for docker based environment.
All your customizations are automatically applied to base alfresco/share docker images and containers are launched.
Even if you are planning to use standlone instances (installed via distribution method), you can opt to deploy your customization jar files under "module/share", "module/platform" as stated here: https://docs.alfresco.com/6.2/concepts/dev-extensions-packaging-techniques-jar-files.html
or use: https://docs.alfresco.com/6.2/concepts/dev-extensions-packaging-techniques-amps.html if your customzations are in form of amp package.
Have a look at these docs:
https://docs.alfresco.com/6.2/concepts/deploy-concepts.html
https://docs.alfresco.com/6.2/concepts/deploy-prereqs.html
If you are still looking for generating war files, you may give a try by creating overlayed war with your custom modules by using "content-services-community" artifact for community and "content-services" artifact for enterprise versions of ACS. And for share you can use "share" artifact. See the dependencies below.
<!-- ACS war artifact for community version --> <dependency> <groupId>org.alfresco</groupId> <artifactId>content-services-community</artifactId> <version>6.2.0-ga</version> <type>war</type> </dependency> <!-- ACS war artifact for enterprise version --> <dependency> <groupId>org.alfresco</groupId> <artifactId>content-services</artifactId> <version>6.2.1</version> <type>war</type> </dependency> <!-- share war artifact for both community and enterprise versions --> <dependency> <groupId>org.alfresco</groupId> <artifactId>share</artifactId> <version>6.2.1</version> <type>war</type> </dependency>
I guess this is more a Maven question than a SDK question.
I haven't tried, but have a look at this maven plugin.
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>${version.maven.war.plugin}</version>
</plugin>
<plugin>
If you integrate it into your build process you should be able to achieve what you want.
SDK 4.x doesn't generate war files. Even previous version of sdk 3.x also does't generate war files as far as i know. However with sdk3.x you had option to create overlay project and build a custom war file by adding your customization to alfresco/share war files.
SDK4.x is totally based on docker, so it is recommended to use its capabilities meant for docker based environment.
All your customizations are automatically applied to base alfresco/share docker images and containers are launched.
Even if you are planning to use standlone instances (installed via distribution method), you can opt to deploy your customization jar files under "module/share", "module/platform" as stated here: https://docs.alfresco.com/6.2/concepts/dev-extensions-packaging-techniques-jar-files.html
or use: https://docs.alfresco.com/6.2/concepts/dev-extensions-packaging-techniques-amps.html if your customzations are in form of amp package.
Have a look at these docs:
https://docs.alfresco.com/6.2/concepts/deploy-concepts.html
https://docs.alfresco.com/6.2/concepts/deploy-prereqs.html
If you are still looking for generating war files, you may give a try by creating overlayed war with your custom modules by using "content-services-community" artifact for community and "content-services" artifact for enterprise versions of ACS. And for share you can use "share" artifact. See the dependencies below.
<!-- ACS war artifact for community version --> <dependency> <groupId>org.alfresco</groupId> <artifactId>content-services-community</artifactId> <version>6.2.0-ga</version> <type>war</type> </dependency> <!-- ACS war artifact for enterprise version --> <dependency> <groupId>org.alfresco</groupId> <artifactId>content-services</artifactId> <version>6.2.1</version> <type>war</type> </dependency> <!-- share war artifact for both community and enterprise versions --> <dependency> <groupId>org.alfresco</groupId> <artifactId>share</artifactId> <version>6.2.1</version> <type>war</type> </dependency>
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.