felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kriens <peter.kri...@aqute.biz>
Subject Re: A better life: quick webapp deploy
Date Fri, 06 May 2011 14:47:16 GMT
I am not sure I understand where you're going ....

The -wab/-wablib facility is ONLY for people that want to make a WAR that also runs on OSGi.
Your use case seems to be standard vanilla OSGi. Just make it a WAB, i.e. set the Web-ContextPath
header and you're done with any compliant OSGi Web container. The -wab option is just a convenience
that moves the classes from the root to WEB-INF/classes. So start from zero and just create
a bundle. I have NO idea what will happen when you try to build a JAR with all these different
packagers in maven.

Did you try to make a simple "hello world" servlet?

Kind regards,

	Peter Kriens




On 21 apr 2011, at 10:48, Daniele Dellafiore wrote:

> I thank you all for the information. I need to make it run from the
> maven-bundle-plugin 2.2.0.
> With the configuration (pasted in the end of the email) and instructing the
> maven-war-plugin to where the MANIFEST file is, the module with packaging =
> war has the osgi info but still has the /lib folder with all the jars and
> the MANIFEST file is not even populated with the OSGI info (while for all
> the other jar it is)
> 
> I think I still need to add something like
> 
>   <Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
> 
> Just for the war project.
> 
> I'm confused about two things now:
> 1. how do I instruct the maven plugin NOT to copy dependency? Is this enough
> for the bundle to look for dependency in the container rather than in it's
> own /lib folder?
> 2. How do I instruct the container to run the bundle as a webapp? So to make
> the jetty that's active on Karaf to read the web.xml of my bundle?
> 
> Or maybe I can skip the web.xml at all, in this way I've to figure out how
> to run a Wicket application without it...
> 
>> 
>>        <plugin>
>          <groupId>org.apache.felix</groupId>
>          <artifactId>maven-bundle-plugin</artifactId>
>          <version>2.2.0</version>
>          <extensions>true</extensions>
>          <executions>
>            <execution>
>              <id>bundle-manifest</id>
>              <phase>process-classes</phase>
>              <goals>
>                <goal>manifest</goal>
>              </goals>
>            </execution>
>          </executions>
>          <configuration>
>            <supportedProjectTypes>
>              <supportedProjectType>jar</supportedProjectType>
>              <supportedProjectType>bundle</supportedProjectType>
>              <supportedProjectType>war</supportedProjectType>
>            </supportedProjectTypes>
>            <instructions>
> 
> <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
>              <_versionpolicy>${osgi.version.policy}</_versionpolicy>
>              <Export-Package>${osgi.export.package}</Export-Package>
>              <Import-Package>${osgi.import.package}</Import-Package>
>              <_wab>src/main/webapp/</_wab>
>            </instructions>
>          </configuration>
>        </plugin>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message