Hello,
I replaced the core module in a Maven project with the core module from another project. However, when I ran "mvn clean install -PautoInstallPackage", the package is not installed, so nothing found at http://localhost:4502/system/console/bundles.
I was able to make it work by manually installing the jar file (project-abc.core-3.0.0-SNAPSHOT.jar) taken from the target folder. But I still wonder why is my core module is not getting installed automatically.
Here are my steps after I replaced the core module:
1. Update the `artifactId` in my added core module at "core/pom.xml" to be `project-abc.core` to match the new project structure.
2. Make sure that the "core/pom.xml" refer correctly to the new parent pom.xml per below:
<parent>
<groupId>com.abc.aem</groupId>
<artifactId>project-abc</artifactId>
<version>2.9.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
3. Make sure that the dependencies and embeds refer to the correct core module `artifactId` from step 1.
/AEM_ABC/ui.apps/pom.xml
<dependency>
<groupId>com.abc.aem</groupId>
<artifactId>project-abc.core</artifactId>
<version>${project.version}</version>
</dependency>
/AEM_ABC/all/pom.xml
<embedded>
<groupId>com.abc.aem</groupId>
<artifactId>project-abc.core</artifactId>
<target>/apps/project-abc-packages/content/install</target>
</embedded>
4. Made sure the filter.xml at "/AEM_ABC/all/src/main/content/META-INF/vault/filter.xml" include the path below:
<workspaceFilter version="1.0">
<filter root="/apps/project-abc-packages"/>
</workspaceFilter>
As you can see, I am not exactly sure what are required by OSGi to install the jar file as a bundle when running "mvn clean install -PautoInstallPackage". Any input or suggestion is appreciated,
Thanks,
Sean
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @sean12341
Step-1: Please update the embed path to
/apps/project-abc-packages/application/install
Step-2: Dependency would also be needed to update under all's pom.xml
<dependency>
<groupId>com.abc.aem</groupId>
<artifactId>project-abc.core</artifactId>
<version>${project.version}</version>
</dependency>
Step-3: Core module should be declared in parent pom.xml
Step-4: Delete the jar generated in target folder on core bundle
Step-5: Execute mvn clean install in Parent folder
Notice is core bundle is also being processed and is bundle created in target folder
Step-6: Check if the all package created under the target folder contains the bundle under configured embed path
Hello @sean12341
Step-1: Please update the embed path to
/apps/project-abc-packages/application/install
Step-2: Dependency would also be needed to update under all's pom.xml
<dependency>
<groupId>com.abc.aem</groupId>
<artifactId>project-abc.core</artifactId>
<version>${project.version}</version>
</dependency>
Step-3: Core module should be declared in parent pom.xml
Step-4: Delete the jar generated in target folder on core bundle
Step-5: Execute mvn clean install in Parent folder
Notice is core bundle is also being processed and is bundle created in target folder
Step-6: Check if the all package created under the target folder contains the bundle under configured embed path
The problem happened if your jar just uploaded under
/apps/project-abc-packages/content/install
but not installed.
to make sure, In your CRX package manager reinstall the corresponding package where the JAR exists. If you find out this in your OSGI bundle, then you made any mistake on your pom.xml. [On that case recheck it agin]
Views
Likes
Replies