Add ACS AEM Commons to your AEM Maven project
ACS AEM Commons should be included as a Maven dependency on in your AEM project. The instructions for adding ACS AEM Commons to your project varies by the type of AEM and version of ACS AEM Commons you are using.
Please refer to Compatibility to check which version of ACS AEM Commons is compatible with your version of AEM.
Note that all
<dependency>
entries listed below can be defined at the reactor pom.xml’s<dependencyManagement>
with the version, type and classifier, and the version-less dependencies can be used in the sub-project poms. The instructions below define the dependencies directly in each sub-project pom for clarity and succinctness.
ACS AEM Commons 6.0.0+
In ACS AEM Commons 6.0.0, the main dependency artifact ID was renamed from acs-aem-commons-content
to acs-aem-commons-all
.
The setup for embedding/depending on ACS AEM Commons in your code base differs slightly between AEMaaCS and AEM 6.5.
AEM as a Cloud Service
Your Container Content Package (usually called all/pom.xml
)
In your container content package module’s pom.xml file you extend both the
dependencies
section and thefilevault-package-maven-plugin
configuration
like this:
Your OSGi Bundle(s) (usually called core
) (Optional)
To use Java APIs provided by ACS AEM Commons in your code, add a dependency on the acs-aem-commons-bundle
in your OSGi bundle Maven project.
AEM 6.5
All information of AEM as a Cloud Service above applies, but instead of using the specific classifier cloud
, you don’t use any classifier at all. Also instead of embeddeds
one leverages subpackages
Your Container Content Package (usually called all
)
In your container content package module’s pom.xml file, add this:
Your OSGi Bundle(s) (usually called core
) (Optional)
In your OSGi bundle module’s pom.xml file, add this:.
ACS AEM Commons < 6.0.0
Prior to ACS AEM Commons 6.0.0, the main dependency artifact ID was named acs-aem-commons-content
.
Your all/pom.xml
In the filevault-package-maven-plugin
plugin configuration of your all project’s pom.xml file, add this:
In the <dependencies>
section of your all (container-package) project’s pom.xml file, add this:
Your core/pom.xml (Optional)
To use Java APIs provided by ACS AEM Commons in your code, add a dependency on on the acs-aem-commons-bundle
in your OSGi bundle Maven project.