sreenu539
sreenu539
08-05-2018
I have build and deploy code using mvn clean install -PautoInstallPackage.
There are two sub packages as part of pom file ( aem-acs-commons 3.14.8, core-wcm-components-all 2.0.6) these two packages are uploaded as part of build, but these packages not installed in package manager.
I can see packages below etc/packages and in crxde package manager, but not installed, i have to install them manually to get these packages features.
I do not want to do manual install, this install should happen as part of maven build and deploy.
Any help ?
Thanks,
Sri
edubey
edubey
08-05-2018
Did you followed these two documentations for package inclusion:-
https://adobe-consulting-services.github.io/acs-aem-commons/pages/maven.html
sreenu539
sreenu539
08-05-2018
Yes. Followed all 3 steps in acs commons documentation and included core components all as subpackage, dependency.
My local instance has 6.3 upgraded to 6.3.2. But QA, Production has 6.3 with sp1, application code. Now sp2 installed in QA and did mvn build, deploy.
My local instance worked fine having acs commons, core components packages installed( 6.3 applied sp2 directly)
QA instance 6.3 with sp1, upgraded with sp2.
QA has packages in package manager but not installed. Had to do manual install.
Hemant_arora
Hemant_arora
08-05-2018
I tried to reproduce on 6.4 the above but i was successfully able to install acs commons package
here is what i did:
Added the below dependency to pom.xml under ui.content and subpackages section under configuration
<dependency>
<groupId>com.adobe.acs</groupId>
<artifactId>acs-aem-commons-content</artifactId>
<version>3.15.2</version>
<type>content-package</type>
<classifier>min</classifier> <!-- optional, see below -->
</dependency>
<subPackages>
<subPackage>
<groupId>com.adobe.acs</groupId>
<artifactId>acs-aem-commons-content</artifactId>
<filter>true</filter>
</subPackage>
</subPackages>
and for core-wcm-components-all 2.0.6 add the dependency to pom.xml under ui.apps and subpackages section under configuration as below
<subPackages>
<subPackage>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.all</artifactId>
<filter>true</filter>
</subPackage>
</subPackages>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.all</artifactId>
<type>content-package</type>
<version>1.0.6</version>
<scope>provided</scope>
</dependency>
sreenu539
sreenu539
10-05-2018
I do not have any issue in deploying sub packages to local instance.
For DEV, QA, Production business uses Jenkins to trigger the build. i am not sure, if something needs to be done at Jenkins level to auto upload and install sub packages.
Thanks,
Sri
smacdonald2008
smacdonald2008
10-05-2018
Try using Maven and follow @Hemant arora recommendation.
joej47544984
joej47544984
15-06-2018
sreenu539 and Hemant arora (smacdonald2008)
I'm seeing similar (AEM 6.3) - acs commons installing automatically but not wcm core components all.
1. acs commons and core components all subpackages are included in my maven pom, to auto-install along with my custom code project. This looks good at the build stage in maven output:
2. acs commons installs fine but not wcm core components . Maven output gives details for acs commons
3. Hemant arora you say
were you also able to successfully install core-wcm-components-all?
Your example maven details differ from the documentation https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components#include-core-components-a s-subpackage-into-your-own-project-maven-build
not just by <type> (which version of the content-package-maven-plugin did you use?) but you also specify 1.0.6 (rather than 2.0.6 which you mention in your description).
Is https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components#include-core-components wrong or missing something?
Acs commons typically embed its osgi bundle in the apps .../install folder, is something similar required for core components to auto install?
Hemant_arora
Hemant_arora
15-06-2018
go to the pom.xml of ui.apps module add the following to automatically install core components
Under the content-package-maven-plugin under build tag, add the below
<build>
<plugins>
...
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<configuration>
<subPackages>
<subPackage>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.all</artifactId>
<filter>true</filter>
</subPackage>
</subPackages>
</configuration>
</plugin>
</plugins>
</build>
secondly add the dependency under the dependencies section in the same pom file under ui.apps
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.all</artifactId>
<type>zip</type>
</dependency>
now in the main project pom file add the following in dependencies section
<dependencyManagement>
<dependencies>
...
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.all</artifactId>
<type>zip</type>
<version>2.0.8</version>
</dependency>
</dependencies>
</dependencyManagement>
joej47544984
joej47544984
16-06-2018
Thanks Hemant arora that's exactly what I've got already. But no auto-installation for me.
I'm running with
My maven output is as per my previous comment. What maven output do you see?
Hemant_arora
Hemant_arora
17-06-2018
This is maven console log
[INFO] Embedding --- Sub Packages: groupId=com.adobe.cq,artifactId=core.wcm.components.all,filter=true,excludeTransitive=false ---
[INFO] Embedding com.adobe.cq:core.wcm.components.all:zip:2.0.8 -> jcr_root/etc/packages/adobe/cq60/core.wcm.components.all-2.0.8.zip
[INFO] Merging D:\myproject\AEM\apps\src\main\content\META-INF\vault\filter.xml with inlined filter specifications.
[INFO] Building content-package: D:\myproject\AEM\apps\target\myproject.ui.apps-1.0-SNAPSHOT.zip
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ myproject.ui.apps ---
[INFO] Installing D:\myproject\AEM\apps\target\myproject.ui.apps-1.0-SNAPSHOT.zip to C:\Users\hemant\.m2\repository\myproject\myproject.ui.apps\1.0-SNAPSHOT\myproject.ui.apps-1.0-SNAPSHOT.zip
[INFO] Installing D:\myproject\AEM\apps\pom.xml to C:\Users\hemant\.m2\repository\myproject\myproject.ui.apps\1.0-SNAPSHOT\myproject.ui.apps-1.0-SNAPSHOT.pom
[INFO]
[INFO] --- content-package-maven-plugin:0.5.1:install (install-package) @ myproject.ui.apps ---
[INFO] Installing myproject.ui.apps (D:\myproject\AEM\apps\target\myproject.ui.apps-1.0-SNAPSHOT.zip) to http://localhost:4505/crx/packmgr/service.jsp
[INFO] myproject:myproject.ui.apps, 1.0-SNAPSHOT (5813774 bytes)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------