Maven OSGI error | Adobe Higher Education
Skip to main content
Jai1122
Level 4
October 16, 2015
Répondu

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

Meilleure réponse par ogill

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

24 commentaires

Jai1122
Jai1122Auteur
Level 4
October 16, 2015

Opkar Gill wrote...

after the version element can you add the below elements and run again

    <configuration>

        <failOnError>true</failOnError>

    </configuration>

 

I suspect you have an error earlier in your build, but it does not kill the build process, so please have a look

 

I tried this, but no luck.

You said: I suspect you have an error earlier in your build, but it does not kill the build process, so please have a look

Can you please be more elaborate on this? 

Jai1122
Jai1122Auteur
Level 4
October 16, 2015

Yes opkar. The port is 4506. I do not see any errors in cq logs but the log from maven is as attached. From line number 20 you can see the Error

Adobe Employee
October 16, 2015

you said you are running this from the content folder, can you run it one level up from the content folder?

Jai1122
Jai1122Auteur
Level 4
October 16, 2015

Yeah tried that. Still facing the same issue. Attaching the maven error log

Adobe Employee
October 16, 2015

after the version element can you add the below elements and run again

    <configuration>

        <failOnError>true</failOnError>

    </configuration>

 

I suspect you have an error earlier in your build, but it does not kill the build process, so please have a look

Adobe Employee
October 16, 2015

Can you send the full log for your maven command. Or just do a grep for exception

Adobe Employee
October 16, 2015

You appear to have some misconfiguration with your project. I'd create a new multimodule project from the adobe archetypes and see if it works for you. Then you can add your code to that.

Regards,

Opkar

smacdonald2008
Level 10
October 16, 2015

Why not use mvn clean install and install the bundle manually as described in the article. 

Jai1122
Jai1122Auteur
Level 4
October 16, 2015

smacdonald2008 wrote...

Why not use mvn clean install and install the bundle manually as described in the article. 

 

My requirement is i need to run a maven command that will install the bundle and content packages. I am sure there is a way to achieve this and  I have already done this referring to this link in the past.

As Opkar said there might be some misconfig in my project's pom files. I am trying to figure out that. 

Ratna_Kumar
Level 10
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.