You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by to...@quarendon.net on 2017/06/22 12:52:10 UTC

Using maven bundle plugin to compile and bundle code not in src/main/java

Forgive my maven ignorance, but I’d like to retrofit some source with a maven build that uses the felix maven bundle plugin, it’s just my source isn’t in src/main/java.
Can I do that?

If so, can someone provide a simple example?
It’s not clear how the source even gets compiled to me. I’ve used the karaf-bundle-archetype maven archetype but no where is there anything that says "go compile this code", so I have no handle on what to modify. I'm vaguely guessing I need another "plugin" section but I'm shooting wildly in the dark there.

Thanks.

Re: Using maven bundle plugin to compile and bundle code not in src/main/java

Posted by Markus Rathgeb <ma...@gmail.com>.
Hi,

never changed the source directory myself, but it should be able to
change it using the "sourceDirectory" element inside the "build"
section.
===
<project>
   ...
    <build>
        <sourceDirectory>...</sourceDirectory>
===

Regards,
Markus

Antw: Using maven bundle plugin to compile and bundle code not in src/main/java

Posted by al...@brodos.de.
Hello Tom.

It's nothing to do with the bundle plugin at all.
All you have to do is to set the sourceDirectory tag in the pom file (as subnode of build node).
Please have a look here: https://maven.apache.org/guides/mini/guide-using-one-source-directory.html