You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Charles Moulliard <cm...@gmail.com> on 2011/01/07 16:49:57 UTC

<_wab/> instruction ??

Hi,

In the pom.xml file of Aries Trader sample blog web, there is a special 
instruction <_wab/> added at the end of the configuration of the felix 
maven plugin

<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Web-ContextPath>/blog</Web-ContextPath>
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
<Private-Package>org.apache.aries.samples.blog.web.*</Private-Package>
<Export-Package>!org.apache.aries.samples.blog.web.*</Export-Package>
<Import-Package>
                             javax.servlet*;version=2.5,
                             *
</Import-Package>
<_wab/>
</instructions>
</configuration>

I have digged into the code of Aries but haven't found info about what 
is this command supposed to do. Can someone provide info about this 
command ? Is this instrcution used to generated the content of the 
bundle or WAR ?

Regards,

Charles

Re: <_wab/> instruction ??

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

See http://www.aqute.biz/Bnd/Format#wab

Regards
Felix

Am Freitag, den 07.01.2011, 16:49 +0100 schrieb Charles Moulliard: 
> Hi,
> 
> In the pom.xml file of Aries Trader sample blog web, there is a special 
> instruction <_wab/> added at the end of the configuration of the felix 
> maven plugin
> 
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <configuration>
> <instructions>
> <Web-ContextPath>/blog</Web-ContextPath>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Private-Package>org.apache.aries.samples.blog.web.*</Private-Package>
> <Export-Package>!org.apache.aries.samples.blog.web.*</Export-Package>
> <Import-Package>
>                              javax.servlet*;version=2.5,
>                              *
> </Import-Package>
> <_wab/>
> </instructions>
> </configuration>
> 
> I have digged into the code of Aries but haven't found info about what 
> is this command supposed to do. Can someone provide info about this 
> command ? Is this instrcution used to generated the content of the 
> bundle or WAR ?
> 
> Regards,
> 
> Charles

-- 
fmeschbe@adobe.com
+41 61 226 98 44


Re: <_wab/> instruction ??

Posted by Alasdair Nottingham <no...@apache.org>.
As you say it is an instruction to the maven-bundle-plugin to generate
a wab. In fact you are quoting an older copy of the pom. It should
look like this:

<_wab>src/main/webapp</_webapp>

now, with the web content that goes into the root being in the
src/main/webapp directory rather than in the src/main/resources.

This will result in a good WAB being created. Before hand everything
was packaged in the root of the WAB which means that .class files were
servable, this is a bad practice.

Setting <_wab> moves everything on the Bundle-ClassPath into the
WEB-INF/classes directory. Assuming you put your static content in
src/main/resources This includes all the static content (and jsps)
which isn't what we want. So to fix this we put the static content in
src/main/webapp and that causes everything to go into the right place.

Alasdair

On 7 January 2011 15:49, Charles Moulliard <cm...@gmail.com> wrote:
> Hi,
>
> In the pom.xml file of Aries Trader sample blog web, there is a special
> instruction <_wab/> added at the end of the configuration of the felix maven
> plugin
>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <configuration>
> <instructions>
> <Web-ContextPath>/blog</Web-ContextPath>
> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
> <Private-Package>org.apache.aries.samples.blog.web.*</Private-Package>
> <Export-Package>!org.apache.aries.samples.blog.web.*</Export-Package>
> <Import-Package>
>                            javax.servlet*;version=2.5,
>                            *
> </Import-Package>
> <_wab/>
> </instructions>
> </configuration>
>
> I have digged into the code of Aries but haven't found info about what is
> this command supposed to do. Can someone provide info about this command ?
> Is this instrcution used to generated the content of the bundle or WAR ?
>
> Regards,
>
> Charles
>



-- 
Alasdair Nottingham
not@apache.org