Skip to main content
Jai1122
Level 4
Oct 16, 2015 2:28 AM UTC
Solved

Maven OSGI error

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ogillAccepted solution
Adobe Employee
Oct 16, 2015 2:28 AM UTC

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

24 replies

Adobe Employee
Oct 16, 2015 2:28 AM UTC

and your server is running on port 4506? Did you see any exceptions in error.log when you try to deploy the package via maven?

Translate
Jai1122
Jai1122Author
Level 4
Oct 16, 2015 2:28 AM UTC

Yes Opkar. The profile is as follows, 

<profile> <id>autoInstallPackage</id> <build> <plugins> <plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <version>0.0.24</version> <executions> <execution> <id>install-content-package</id> <phase>install</phase> <goals> <goal>install</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile>
Translate
Adobe Employee
Oct 16, 2015 2:28 AM UTC

Do you have a profile for "autoinstallPackage"

Regards,

Opkar

Translate
Jai1122
Jai1122Author
Level 4
Oct 16, 2015 2:28 AM UTC

My bad.. Bundle installation is happening. I just executed the command from the wrong folder,sorry for that Opkar.

I tried running mvn clean install -PautoinstallPackage from the content folder but still struck with the same error. I also created the folders in CRXDE Lite and configured filter.xml as

        <workspaceFilter version="1.0">
            <filter root="/apps/test/components"></filter>
            <filter root="/apps/test/templates"></filter>
            <filter root="/apps/test/config"></filter>
        </workspaceFilter>

Translate
ogillAdobe EmployeeAccepted solution
Adobe Employee
Oct 16, 2015 2:28 AM UTC

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

Translate
Jai1122
Jai1122Author
Level 4
Oct 16, 2015 2:28 AM UTC

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!!

Translate
Oct 16, 2015 2:28 AM UTC
Adobe Employee
Oct 16, 2015 2:28 AM UTC

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

Translate
Jai1122
Jai1122Author
Level 4
Oct 16, 2015 2:28 AM UTC

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

Translate
Jai1122
Jai1122Author
Level 4
Oct 16, 2015 2:28 AM UTC

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. 

Translate