| <!-- |
| ~ Copyright (c) 2017 CEA. |
| ~ All rights reserved. This program and the accompanying materials |
| ~ are made available under the terms of the Eclipse Public License v1.0 |
| ~ which accompanies this distribution, and is available at |
| ~ http://www.eclipse.org/legal/epl-v10.html |
| ~ |
| ~ Contributors: |
| ~ CEA - initial API and implementation |
| --> |
| |
| <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/maven-v4_0_0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.eclipse.sensinact.gateway.tools</groupId> |
| <artifactId>platform.tools</artifactId> |
| <version>2.0-SNAPSHOT</version> |
| </parent> |
| |
| <artifactId>swagger</artifactId> |
| <name>sensiNact IoT Gateway - Swagger API</name> |
| <packaging>bundle</packaging> |
| |
| <properties> |
| <swagger.url>https://codeload.github.com/swagger-api/swagger-ui/zip/v2.1.4</swagger.url> |
| </properties> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>com.googlecode.maven-download-plugin</groupId> |
| <artifactId>download-maven-plugin</artifactId> |
| <version>1.3.0</version> |
| <executions> |
| <execution> |
| <!-- the wget goal actually binds itself to this phase by default --> |
| <phase>validate</phase> |
| <goals> |
| <goal>wget</goal> |
| </goals> |
| <configuration> |
| <url>${swagger.url}</url> |
| <outputFileName>swagger-ui.zip</outputFileName> |
| <!-- default target location, just to demonstrate the parameter --> |
| <outputDirectory>${project.build.directory}</outputDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <version>1.6</version> |
| <executions> |
| <execution> |
| <id>prepare</id> |
| <phase>validate</phase> |
| <configuration> |
| <tasks> |
| <unzip src="${project.build.directory}/swagger-ui.zip" dest="${project.build.directory}/swagger-ui/" /> |
| </tasks> |
| </configuration> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-resources-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>copy-swagger-ui-dist</id> |
| <phase>validate</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/swagger-api/dist</outputDirectory> |
| <resources> |
| <resource> |
| <directory>${project.build.directory}/swagger-ui/swagger-ui-2.1.4/dist</directory> |
| <filtering>true</filtering> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-resources-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>copy-schemas</id> |
| <phase>validate</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/swagger-api/dist/schemas</outputDirectory> |
| <overwrite>true</overwrite> |
| <resources> |
| <resource> |
| <directory>src/client/schemas</directory> |
| <filtering>true</filtering> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-resources-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>copy-images</id> |
| <phase>validate</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/swagger-api/dist/images</outputDirectory> |
| <overwrite>true</overwrite> |
| <resources> |
| <resource> |
| <directory>src/client/images</directory> |
| <filtering>true</filtering> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-resources-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>copy-html</id> |
| <phase>validate</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/swagger-api/dist</outputDirectory> |
| <overwrite>true</overwrite> |
| <resources> |
| <resource> |
| <directory>src/client</directory> |
| <includes> |
| <include>*.html</include> |
| <include>*.yaml</include> |
| </includes> |
| <filtering>true</filtering> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.felix</groupId> |
| <artifactId>maven-bundle-plugin</artifactId> |
| <extensions>true</extensions> |
| <configuration> |
| <instructions> |
| <Bundle-Activator>org.eclipse.sensinact.web.swagger.Activator</Bundle-Activator> |
| <Include-Resource> |
| swagger-api=${project.build.directory}/swagger-api/dist, |
| about.html |
| </Include-Resource> |
| </instructions> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| <version>1.7.7</version> |
| </dependency> |
| <dependency> |
| <groupId>javax.servlet</groupId> |
| <artifactId>javax.servlet-api</artifactId> |
| <version>3.1.0</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.sensinact.gateway</groupId> |
| <artifactId>sensinact-utils</artifactId> |
| <version>${project.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.felix</groupId> |
| <artifactId>org.apache.felix.http.jetty</artifactId> |
| <version>3.0.0</version> |
| <scope>provided</scope> |
| </dependency> |
| </dependencies> |
| </project> |