maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: maven-jar-plugin refuses to include META-INF/persistence.xml ! - Problem solved
Date Sun, 12 Aug 2012 01:54:55 GMT

I didnt see your  
At execution time you will need to config the maven-bundle-plugin with configuration instructions
such as what is here:
      <plugin>    <!-- (2) START -->
      </plugin>    <!-- (2) END -->
  </build> The Export-Package of indicates
the plugin will copy the Log Service package into the resulting bundle JAR file and export
to other bundles
The Private-Package of* 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

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:
> Subject: Re: maven-jar-plugin refuses to include META-INF/persistence.xml ! - Problem
> Date: Sat, 11 Aug 2012 18:56:43 +0200
> To:
> 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
> /Tommy
> 22 jul 2012 kl. 18:27 skrev Wayne Fay <>:
> >> I was hoping for a "Well, thats easy, just do ..." :-). But you are of course
> >> 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:
> > For additional commands, e-mail:
> > 
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message