blob: a8cde16c1db55af28c3efe9d2acedcbaf58ab736 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>sahoo</groupId>
<artifactId>hybridapp.example1</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Our first hybrid (OSGi + Java EE) application</name>
<packaging>war</packaging>
<build>
<finalName>hybridapp1</finalName>
<plugins>
<plugin> <!-- Need to set source level 1.5 to use annotations like @EJB -->
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin> <!-- Need to use this plugin to build war files -->
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<configuration>
<archive>
<!-- add bundle plugin generated manifest to the war -->
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<!-- For some reason, adding Bundle-ClassPath in maven-bundle-plugin
confuses that plugin and it generates wrong Import-Package, etc.
So, we generate it here.
-->
<manifestEntries>
<Bundle-ClassPath>WEB-INF/classes/</Bundle-ClassPath>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<supportedProjectTypes>
<supportedProjectType>jar</supportedProjectType>
<supportedProjectType>bundle</supportedProjectType>
<supportedProjectType>war</supportedProjectType>
</supportedProjectTypes>
<instructions>
<Bundle-Activator>sahoo.hybridapp.example1.impl.Activator</Bundle-Activator>
<Export-Package>sahoo.hybridapp.example1</Export-Package>
<!-- This is the context root of this application -->
<Web-ContextPath>/hybridapp1</Web-ContextPath>
<!-- Bundle-ClassPath without "." confuses bundle plugin.
So, leave it unspecified (i.e., default to ".") and
we shall generate it using war-plugin's manifest customization
<Bundle-ClassPath>WEB-INF/classes/</Bundle-ClassPath>
-->
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.ejb</artifactId>
<version>3.0-Preview</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi_R4_core</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>