blob: e10bb1676ae73c13d902d8a70aa90035e612d73a [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2016 Open Networking Laboratory
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onosproject</groupId>
<artifactId>onos-dependencies</artifactId>
<version>1.8.0</version>
<relativePath/><!-- parent is remote -->
</parent>
<groupId>org.onosproject</groupId>
<artifactId>mef-sca-api</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<description>ONOS MEF SCA API application for Carrier Ethernet app</description>
<url>http://onosproject.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<onos.version>1.8.0</onos.version>
<carrierethernet.version>1.8.0-SNAPSHOT</carrierethernet.version>
<onos.app.requires>org.onosproject.ecord.carrierethernet</onos.app.requires>
<api.version>1.0.0</api.version>
<onos.app.name>org.onosproject.mefscaapi</onos.app.name>
<onos.app.title>MEF SCA REST API</onos.app.title>
<onos.app.category>default</onos.app.category>
<api.description>MEF SCA REST API for Carrier Ethernet app</api.description>
<web.context>/onos/mef-sca-api</web.context>
<api.title>MEF SCA REST API</api.title>
<onos.app.url>http://onosproject.org</onos.app.url>
<api.package>org.onosproject.mefscaapi</api.package>
<onos.app.readme>MEF SCA REST API for Carrier Ethernet app</onos.app.readme>
<!-- Extra properties due to MEF SCA API -->
<swagger-core-version>1.5.10</swagger-core-version>
<servlet-api-version>2.5</servlet-api-version>
<jersey2-version>2.22.2</jersey2-version>
<!-- End of extra properties due to MEF SCA API -->
</properties>
<dependencies>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-api</artifactId>
<version>${onos.version}</version>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onlab-osgi</artifactId>
<version>${onos.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-api</artifactId>
<version>${onos.version}</version>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-rest</artifactId>
<version>${onos.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf.shell</groupId>
<artifactId>org.apache.karaf.shell.console</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-cli</artifactId>
<version>${onos.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onlab-rest</artifactId>
<version>${onos.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.onosproject</groupId>
<artifactId>onos-app-carrierethernet</artifactId>
<version>${carrierethernet.version}</version>
<scope>provided</scope>
</dependency>
<!-- Extra dependencies due to MEF SCA API code -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jersey2-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api-version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
</dependency>
<!-- End of extra dependencies due to MEF SCA API code -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<excludes>org/onosproject/mefscaapi/api/factories/**.java</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<niceManifest>true</niceManifest>
<instructions>
<_wab>src/main/webapp/</_wab>
<Include-Resource>WEB-INF/classes/apidoc/swagger.json=src/main/resources/sca.json,
{maven-resources}</Include-Resource>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Import-Package>
*,
org.glassfish.jersey.servlet
</Import-Package>
<Web-ContextPath>${web.context}</Web-ContextPath>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<excludes>
<exclude>**/exclude/*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
<executions>
<execution>
<id>generate-scr-srcdescriptor</id>
<goals>
<goal>scr</goal>
</goals>
</execution>
</executions>
<configuration>
<scanClasses>true</scanClasses>
<supportedProjectTypes>
<supportedProjectType>bundle</supportedProjectType>
<supportedProjectType>war</supportedProjectType>
</supportedProjectTypes>
</configuration>
</plugin>
<plugin>
<groupId>org.onosproject</groupId>
<artifactId>onos-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${basedir}/src/main/resources/sca.json</inputSpec>
<language>jaxrs</language>
<library>jersey2</library>
<!-- will selectively add sourceFolder by build-helper-maven-plugin -->
<addCompileSourceRoot>false</addCompileSourceRoot>
<output>${project.build.directory}/swagger/</output>
<configOptions>
<title>MEF SCA REST Application</title>
<!-- This adds dependency to jersey1 classes -->
<!-- <dateLibrary>java8</dateLibrary> -->
<apiPackage>org.onosproject.mefscaapi.api</apiPackage>
<modelPackage>org.onosproject.mefscaapi.api.model</modelPackage>
<!-- workaround for StringUtil package location -->
<invokerPackage>org.onosproject.mefscaapi.api</invokerPackage>
<sourceFolder>src/main/java</sourceFolder>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<implFolder>impl/main/java/exclude</implFolder>
<library>jersey2</library>
<!-- Workaround until swagger-code-gen 2.2.2 is released.
https://github.com/swagger-api/swagger-codegen/issues/3509
-->
<additional-properties>jackson=true</additional-properties>
</configOptions>
<!-- Workaround until swagger-code-gen 2.2.2 is released.
https://github.com/swagger-api/swagger-codegen/issues/3509
-->
<templateDirectory>${basedir}/swaggergen/template</templateDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.11</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<!-- only import generated sourceFolder -->
<source>${project.build.directory}/swagger/src/main/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>