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

Jai1122
Jai1122Author
New Participant
October 16, 2015

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>

Employee
October 16, 2015

Do you have a profile for "autoinstallPackage"

Regards,

Opkar

Jai1122
Jai1122Author
New Participant
October 16, 2015

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>
Employee
October 16, 2015

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?

Jai1122
Jai1122Author
New Participant
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

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
Jai1122Author
New Participant
October 16, 2015

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

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

Employee
October 16, 2015

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

Jai1122
Jai1122Author
New Participant
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?