Maven OSGI error | Community
Skip to main content
Jai1122
New Participant
October 16, 2015
Solved

Maven OSGI error

  • October 16, 2015
  • 24 replies
  • 7705 views

Hi All,

   I tried to setup a maven project and refered the help docs.

I have successfully compiled and jar files are available in the target folder. But it is not getting installed to the CQ instance.

In the maven logs i could see "D://Workspace/target/my-bundle-SNAPSHOT-1.0-Jar is not an OSGI bundle, not uploading" .  

I am not sure what could be the error. 

Can someone please help me on this!!

Thanks,

Jai

Best answer by ogill

What happens when you run the maven command mvn clean install -Pautoinstallbundle inside the bundle folder?

24 replies

New Participant
November 7, 2025

Hi Jai, It seems like the issue you're facing is due to the JAR file not being recognized as an OSGi bundle. This typically happens when the Maven pom.xml is not configured properly to generate the necessary OSGi metadata for the bundle. I recommend double-checking your pom.xml to ensure you're using a plugin like the maven-bundle-plugin to properly package the JAR as an OSGi bundle. Additionally, make sure the MANIFEST. MF inside the JAR includes the necessary OSGi headers like Bundle-Name and Bundle-SymbolicName. If everything looks good there, try running a clean build (mvn clean install) to refresh your build and resolve any issues with stale artifacts. Also, if you're struggling with SEO for your project or looking to improve the visibility of your content, it could be worth reaching out to an SEO expert in Delhi

New Participant
March 3, 2025

Auscanz Overseas Pvt. Ltd. is a reputable immigration consultancy based in Chandigarh, specializing in a variety of visa services. As one of the leading tourist visa consultants in Chandigarh, Auscanz Overseas offers in-depth expertise in securing tourist visas, student visas, work permits, and spouse visas. The company is dedicated to guiding clients through the often complex immigration process, ensuring smooth and timely visa approvals. Known for providing personalized solutions, Auscanz Overseas also offers expert advice and ongoing support. With a reputation for integrity, professionalism, and a strong commitment to client satisfaction, Auscanz Overseas Pvt. Ltd. stands out as one of the best Study visa consultants in Chandigarh, making it the ideal partner for individuals seeking new opportunities abroad

Employee
October 16, 2015

What maven command are you using?

I think the article expects you to install the bundle manually, here are details on adding a profile to install the bundle: https://ericfaerber.wordpress.com/2012/04/06/install-osgi-bundles-using-maven/

Here are details on the maven sling plugin: https://sling.apache.org/documentation/development/sling.html

Ratna_Kumar
New Participant
October 16, 2015

Hi Jai,

Thanks for reaching out to Adobe Community.

As you refer the article, https://helpx.adobe.com/experience-manager/using/first-osgi.html(First OSGI), the command used to install bundle is "mvn clean install", it will be located only in Target folder. You need to install manually to Adobe CQ console(http://localhost:4502/system/console)-->bundles.

Thanks,
Ratna Kumar.

Jai1122
Jai1122Author
New Participant
October 16, 2015

Hi Opkar,

   I am using the maven command mvn clean install -Pautoinstallbundle. This has to install the bundle to the instance automatically (I have done this before).

Also when i try to run the command mvn clean install -Pautoinstallpackage which should install the /apps/.. package, just  says"Request to http://localhost:4506/crx/packmgr/service.jsp failed, response=Internal Server Error"  in the logs and gives a build failure. 

Jai1122
Jai1122Author
New Participant
October 16, 2015

Ratna Kumar wrote...

Hi Jai,

Thanks for reaching out to Adobe Community.

As you refer the article, https://helpx.adobe.com/experience-manager/using/first-osgi.html(First OSGI), the command used to install bundle is "mvn clean install", it will be located only in Target folder. You need to install manually to Adobe CQ console(http://localhost:4502/system/console)-->bundles.

Thanks,
Ratna Kumar.

 

 

There is profile (autoInstallBundle) available in the pom.xml which automatically installs the bundle in the CQ instance on executing the maven command mvn clean install -PautoInstallBundle

Employee
October 16, 2015

Is this the first time you are installing the bundle? If so, try and create the your project folder under /apps in crxde lite and try to deploy again.

Regards,

Opkar

October 16, 2015
Jai1122
Jai1122Author
New Participant
October 16, 2015

No it is not helping. Actually i am getting a build failure.

I am not sure why it is not deploying the OSGI bundles. It simply says that the jar is not an OSGI bundle!!

ogillAccepted solution
Employee
October 16, 2015

What happens when you run the maven command mvn clean install -Pautoinstallbundle inside the bundle folder?