I pulled those parts out and replaced them with "..." to make the example
smaller. I didn't think those parts relevant, but apparently they are since the
following suggested by Stuart McCulloch does work:
<Include-Resource>{maven-resources},
META-INF/persistence.xml=target/classes/META-INF/persistence.xml</Include-Resource>
I didn't know that the bundle-plugin affected jar:ing. I thought it just
packaged things correctly under target and then the maven-jar-plugin did the
rest.
I'm starting to realize that just assuming is probably a bad idea ...
/Tommy
12 aug 2012 kl. 03:54 skrev Martin Gainty <[email protected]>:
>
> http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
>
> I didnt see your
> Export-Package
> Private-Package
> Bundle-Activator
> At execution time you will need to config the maven-bundle-plugin with
> configuration instructions such as what is here:
> <build>
> <plugins>
> <plugin> <!-- (2) START -->
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <extensions>true</extensions>
> <configuration>
> <instructions>
> <Export-Package>com.my.company.api</Export-Package>
> <Private-Package>com.my.company.*</Private-Package>
> <Bundle-Activator>com.my.company.Activator</Bundle-Activator>
> </instructions>
> </configuration>
> </plugin> <!-- (2) END -->
> </plugins>
> </build> The Export-Package of com.my.company.api indicates
> the plugin will copy the Log Service package into the resulting bundle JAR
> file and export to other bundles
> The Private-Package of com.my.company.* indicates
> the available package(s) to copy into the bundle but NOT export to other
> bundles
>
> But if you really want total control of your bundle you'll want to learn BND
> The *best* example of BND configuration and an explanation of BND supported
> attributes are located here
> http://www.aqute.biz/Bnd/Bnd
>
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich
> dem Austausch von Informationen und entfaltet keine rechtliche
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci
> est interdite. Ce message sert à l'information seulement et n'aura pas
> n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
>> From: [email protected]
>> Subject: Re: maven-jar-plugin refuses to include META-INF/persistence.xml !
>> - Problem solved
>> Date: Sat, 11 Aug 2012 18:56:43 +0200
>> To: [email protected]
>>
>> I finally found the source of this problem! Or close to it at least. I have
>> managed to get my META-INF/persistence.xml included in the jar, but I'm
>> unsure what is to blame :-).
>>
>> I'm also using the Apache Felix bundle-plugin which allows for:
>>
>> <packaging>bundle</packaging>
>>
>> This due to the following configuration:
>>
>> <plugin>
>> <groupId>org.apache.felix</groupId>
>> <artifactId>maven-bundle-plugin</artifactId>
>> <version>2.3.5</version>
>> <extensions>true</extensions>
>> ...
>> <configuration>
>> <supportedProjectTypes>
>> <supportedProjectType>jar</supportedProjectType>
>> <supportedProjectType>bundle</supportedProjectType>
>> </supportedProjectTypes>
>> ...
>> </configuration>
>> </plugin>
>>
>> That is, I can use either or of "bundle" or "jar" for packaging. However
>> when i use:
>>
>> <packaging>bundle</packaging>
>>
>> I don't get the META-INF/persistence.xml file in the jar.
>>
>> But when I change to:
>>
>> <packaging>jar</packaging>
>>
>> It is included! So my guess is that the maven-jar-plugin is affected by the
>> packaging. The Felix bundle-plugin still works OK with packaging "jar" so
>> I'll stick with that for now on.
>>
>> /Tommy
>>
>> 22 jul 2012 kl. 18:27 skrev Wayne Fay <[email protected]>:
>>
>>>> I was hoping for a "Well, thats easy, just do ..." :-). But you are of
>>>> course right
>>>> Wayne, I need to isolate what is causing this. Thanks.
>>>
>>> If META-INF/persistence.xml was not even showing up in target, then we
>>> might be able to provide a simple "recipe" to solve it. But that is
>>> not the case here. Come back and let us know when you solve it.
>>>
>>> Wayne
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]