| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you 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.apache.syncope</groupId> |
| <artifactId>syncope-ext</artifactId> |
| <version>2.0.0-M4</version> |
| </parent> |
| |
| <name>Apache Syncope Extensions: Swagger UI</name> |
| <description>Apache Syncope Extensions: Swagger UI</description> |
| <groupId>org.apache.syncope.ext</groupId> |
| <artifactId>syncope-ext-swagger-ui</artifactId> |
| <packaging>jar</packaging> |
| |
| <properties> |
| <rootpom.basedir>${basedir}/../..</rootpom.basedir> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>io.swagger</groupId> |
| <artifactId>swagger-jaxrs</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.dataformat</groupId> |
| <artifactId>jackson-dataformat-yaml</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.dataformat</groupId> |
| <artifactId>jackson-dataformat-xml</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.datatype</groupId> |
| <artifactId>jackson-datatype-joda</artifactId> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <inherited>true</inherited> |
| <executions> |
| <execution> |
| <phase>generate-resources</phase> |
| <goals> |
| <goal>unpack</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>org.webjars</groupId> |
| <artifactId>swagger-ui</artifactId> |
| <version>${swagger-ui.version}</version> |
| <overWrite>true</overWrite> |
| <outputDirectory>${project.build.directory}/swagger-ui</outputDirectory> |
| <excludes>**/*.gz</excludes> |
| </artifactItem> |
| </artifactItems> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-resources-plugin</artifactId> |
| <inherited>true</inherited> |
| <executions> |
| <execution> |
| <id>copy-swagger-resources-in-place</id> |
| <phase>process-resources</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/classes/META-INF/resources/swagger</outputDirectory> |
| <resources> |
| <resource> |
| <directory>${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}</directory> |
| <excludes> |
| <exclude>index.html</exclude> |
| <exclude>swagger-ui.min.js</exclude> |
| </excludes> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <inherited>true</inherited> |
| <executions> |
| <execution> |
| <id>addMatrixParamSupport</id> |
| <phase>process-resources</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <replace file="${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}/swagger-ui.js" token="return url + requestUrl + querystring;" value="
var matrixstring = '';
 for (var i = 0; i < this.parameters.length; i++) {
 var param = this.parameters[i];
 
 if (param.in === 'matrix') {
 matrixstring += ';' + this.encodeQueryParam(param.name) + '=' + this.encodeQueryParam(args[param.name]);
 }
 }
 
 var url = this.scheme + '://' + this.host;
 
 if (this.basePath !== '/') {
 url += this.basePath;
 }
 return url + requestUrl + matrixstring + querystring;" /> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-checkstyle-plugin</artifactId> |
| </plugin> |
| </plugins> |
| |
| <resources> |
| <resource> |
| <directory>src/main/resources</directory> |
| <filtering>true</filtering> |
| </resource> |
| </resources> |
| </build> |
| </project> |