571 lines
17 KiB
XML
571 lines
17 KiB
XML
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>com.inteligr8.alfresco</groupId>
|
|
<artifactId>acs-public-rest-api</artifactId>
|
|
<version>1.1.8</version>
|
|
<name>Alfresco Content Services ReST API Client for Java</name>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
|
|
<maven.compiler.source>8</maven.compiler.source>
|
|
<maven.compiler.target>8</maven.compiler.target>
|
|
|
|
<!-- If you want to build for your specific version, point to your own
|
|
installation -->
|
|
<acs.baseUrl>http://localhost:8080/api-explorer</acs.baseUrl>
|
|
<acs.platform.tag>acs6</acs.platform.tag>
|
|
<swagger.basePackage>com.inteligr8.alfresco.acs</swagger.basePackage>
|
|
<it.directory>src/test/none</it.directory>
|
|
|
|
<junit.version>5.7.2</junit.version>
|
|
<spring.version>5.2.14.RELEASE</spring.version>
|
|
<jersey.version>2.34</jersey.version>
|
|
<cxf.version>3.3.2</cxf.version>
|
|
|
|
<api.model.disabled>true</api.model.disabled>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.inteligr8</groupId>
|
|
<artifactId>common-rest-api</artifactId>
|
|
<version>1.1.6</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>io.swagger</groupId>
|
|
<artifactId>swagger-jaxrs</artifactId>
|
|
<version>1.6.2</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>javax.ws.rs</groupId>
|
|
<artifactId>jsr311-api</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jersey.ext</groupId>
|
|
<artifactId>jersey-proxy-client</artifactId>
|
|
<version>${jersey.version}</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jersey.media</groupId>
|
|
<artifactId>jersey-media-multipart</artifactId>
|
|
<version>${jersey.version}</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.cxf</groupId>
|
|
<artifactId>cxf-rt-rs-client</artifactId>
|
|
<version>${cxf.version}</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jersey.core</groupId>
|
|
<artifactId>jersey-client</artifactId>
|
|
<version>${jersey.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jersey.inject</groupId>
|
|
<artifactId>jersey-hk2</artifactId>
|
|
<version>${jersey.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jersey.media</groupId>
|
|
<artifactId>jersey-media-json-jackson</artifactId>
|
|
<version>${jersey.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-api</artifactId>
|
|
<version>${junit.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework</groupId>
|
|
<artifactId>spring-test</artifactId>
|
|
<version>${spring.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.httpcomponents</groupId>
|
|
<artifactId>httpclient</artifactId>
|
|
<version>4.5.9</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.logging.log4j</groupId>
|
|
<artifactId>log4j-slf4j-impl</artifactId>
|
|
<version>2.16.0</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
<version>3.2.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>add-gensrc</id>
|
|
<phase>initialize</phase>
|
|
<goals>
|
|
<goal>add-source</goal>
|
|
</goals>
|
|
<configuration>
|
|
<sources>
|
|
<source>src/gen/java</source>
|
|
</sources>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>add-services</id>
|
|
<phase>process-test-resources</phase>
|
|
<goals>
|
|
<goal>add-test-resource</goal>
|
|
</goals>
|
|
<configuration>
|
|
<resources>
|
|
<resource>
|
|
<directory>${it.directory}</directory>
|
|
<filtering>false</filtering>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<configuration>
|
|
<classifier>${acs.platform.tag}</classifier>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>3.0.0-M5</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-engine</artifactId>
|
|
<version>${junit.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>**/*Jersey*</exclude>
|
|
<exclude>**/*Cxf*</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
<version>3.0.0-M5</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-engine</artifactId>
|
|
<version>${junit.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>**/*Jersey*</exclude>
|
|
<exclude>**/*Cxf*</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>javadoc</id>
|
|
<phase>package</phase>
|
|
<goals><goal>jar</goal></goals>
|
|
<configuration>
|
|
<show>public</show>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>it-jersey</id>
|
|
<properties>
|
|
<it.directory>src/test/jersey</it.directory>
|
|
</properties>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>3.0.0-M5</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-engine</artifactId>
|
|
<version>${junit.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<configuration>
|
|
<includes>
|
|
<include>**/*Jersey*</include>
|
|
</includes>
|
|
<excludes>
|
|
<exclude>**/*IT.java</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
<version>3.0.0-M5</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-engine</artifactId>
|
|
<version>${junit.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<configuration>
|
|
<includes>
|
|
<include>**/*Jersey*IT.java</include>
|
|
</includes>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>it-cxf</id>
|
|
<properties>
|
|
<it.directory>src/test/cxf</it.directory>
|
|
</properties>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>3.0.0-M5</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-engine</artifactId>
|
|
<version>${junit.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<configuration>
|
|
<includes>
|
|
<include>**/*Cxf*</include>
|
|
</includes>
|
|
<excludes>
|
|
<exclude>**/*IT.java</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
<version>3.0.0-M5</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-engine</artifactId>
|
|
<version>${junit.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<configuration>
|
|
<includes>
|
|
<include>**/*Cxf*IT.java</include>
|
|
</includes>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<!-- Implement when descriptor is available -->
|
|
<profile>
|
|
<id>swagger-codegen</id>
|
|
<properties>
|
|
<acs.defs.baseUrl>${acs.baseUrl}/definitions</acs.defs.baseUrl>
|
|
</properties>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<artifactId>maven-clean-plugin</artifactId>
|
|
<version>3.1.0</version>
|
|
<configuration>
|
|
<filesets>
|
|
<fileset>
|
|
<directory>src/gen/java</directory>
|
|
<includes>
|
|
<include>com/inteligr8/alfresco/acs/**/*</include>
|
|
</includes>
|
|
</fileset>
|
|
</filesets>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.googlecode.maven-download-plugin</groupId>
|
|
<artifactId>download-maven-plugin</artifactId>
|
|
<version>1.6.3</version>
|
|
<executions>
|
|
<execution>
|
|
<id>download-acs-core-defs</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>wget</goal>
|
|
</goals>
|
|
<configuration>
|
|
<url>${acs.defs.baseUrl}/alfresco-core.yaml</url>
|
|
<outputDirectory>${project.build.directory}/downloads</outputDirectory>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>download-acs-search-defs</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>wget</goal>
|
|
</goals>
|
|
<configuration>
|
|
<url>${acs.defs.baseUrl}/alfresco-search.yaml</url>
|
|
<outputDirectory>${project.build.directory}/downloads</outputDirectory>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>download-acs-auth-defs</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>wget</goal>
|
|
</goals>
|
|
<configuration>
|
|
<url>${acs.defs.baseUrl}/alfresco-auth.yaml</url>
|
|
<outputDirectory>${project.build.directory}/downloads</outputDirectory>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>download-acs-discovery-defs</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>wget</goal>
|
|
</goals>
|
|
<configuration>
|
|
<url>${acs.defs.baseUrl}/alfresco-discovery.yaml</url>
|
|
<outputDirectory>${project.build.directory}/downloads</outputDirectory>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>download-acs-model-defs</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>wget</goal>
|
|
</goals>
|
|
<configuration>
|
|
<url>${acs.defs.baseUrl}/alfresco-model.yaml</url>
|
|
<outputDirectory>${project.build.directory}/downloads</outputDirectory>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>io.swagger</groupId>
|
|
<artifactId>swagger-codegen-maven-plugin</artifactId>
|
|
<version>2.4.21</version>
|
|
<configuration>
|
|
<language>jaxrs-cxf-client</language>
|
|
<output>${basedir}</output>
|
|
<apiPackage>${swagger.basePackage}.api</apiPackage>
|
|
<modelPackage>${swagger.basePackage}.model</modelPackage>
|
|
<invokerPackage>${swagger.basePackage}.invoker</invokerPackage>
|
|
<generateApiTests>false</generateApiTests>
|
|
<generateApiDocumentation>false</generateApiDocumentation>
|
|
<generateModelTests>false</generateModelTests>
|
|
<generateModelDocumentation>false</generateModelDocumentation>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>swagger-core-codegen</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>generate</goal>
|
|
</goals>
|
|
<configuration>
|
|
<inputSpec>${project.build.directory}/downloads/alfresco-core.yaml</inputSpec>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>swagger-search-codegen</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>generate</goal>
|
|
</goals>
|
|
<configuration>
|
|
<inputSpec>${project.build.directory}/downloads/alfresco-search.yaml</inputSpec>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>swagger-auth-codegen</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>generate</goal>
|
|
</goals>
|
|
<configuration>
|
|
<inputSpec>${project.build.directory}/downloads/alfresco-auth.yaml</inputSpec>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>swagger-discovery-codegen</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>generate</goal>
|
|
</goals>
|
|
<configuration>
|
|
<inputSpec>${project.build.directory}/downloads/alfresco-discovery.yaml</inputSpec>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>swagger-model-codegen</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>generate</goal>
|
|
</goals>
|
|
<configuration>
|
|
<skip>${api.model.disabled}</skip>
|
|
<inputSpec>${project.build.directory}/downloads/alfresco-model.yaml</inputSpec>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.inteligr8</groupId>
|
|
<artifactId>regex-maven-plugin</artifactId>
|
|
<version>1.0.3</version>
|
|
<executions>
|
|
<execution>
|
|
<id>fix-baseUrl</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>replace-file</goal>
|
|
</goals>
|
|
<configuration>
|
|
<filesets>
|
|
<fileset>
|
|
<directory>${basedir}/src/gen/java/com/inteligr8/alfresco/acs/api</directory>
|
|
<outputDirectory>${basedir}/src/gen/java/com/inteligr8/alfresco/acs/api</outputDirectory>
|
|
</fileset>
|
|
</filesets>
|
|
<allowMultiLineMatch>true</allowMultiLineMatch>
|
|
<regexes>
|
|
<regex>
|
|
<pattern>import org\.apache\.cxf\.jaxrs\.ext\.multipart\.\*;.*</pattern>
|
|
<replacement></replacement>
|
|
</regex>
|
|
<regex>
|
|
<pattern>(\*\*Core API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
|
|
<replacement>$1@Path("/api/-default-/public/alfresco/versions/1")$2@Api(value = "/api/-default-/public/alfresco/versions/1"</replacement>
|
|
</regex>
|
|
<regex>
|
|
<pattern>(\*\*Search API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
|
|
<replacement>$1@Path("/api/-default-/public/search/versions/1")$2@Api(value = "/api/-default-/public/search/versions/1"</replacement>
|
|
</regex>
|
|
<regex>
|
|
<pattern>(\*\*Model API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
|
|
<replacement>$1@Path("/api/-default-/public/alfresco/versions/1")$2@Api(value = "/api/-default-/public/alfresco/versions/1"</replacement>
|
|
</regex>
|
|
<regex>
|
|
<pattern>(\*\*Authentication API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
|
|
<replacement>$1@Path("/api/-default-/public/authentication/versions/1")$2@Api(value = "/api/-default-/public/authentication/versions/1"</replacement>
|
|
</regex>
|
|
<regex>
|
|
<pattern>(\*\*Discovery API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
|
|
<replacement>$1@Path("/api")$2@Api(value = "/api"</replacement>
|
|
</regex>
|
|
</regexes>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>add-ignoreUnknown</id>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>replace-file</goal>
|
|
</goals>
|
|
<configuration>
|
|
<filesets>
|
|
<fileset>
|
|
<directory>${basedir}/src/gen/java/com/inteligr8/alfresco/acs/model</directory>
|
|
<outputDirectory>${basedir}/src/gen/java/com/inteligr8/alfresco/acs/model</outputDirectory>
|
|
</fileset>
|
|
</filesets>
|
|
<allowMultiLineMatch>true</allowMultiLineMatch>
|
|
<regexes>
|
|
<regex>
|
|
<pattern>(\npublic class [A-Za-z][A-Za-z0-9]* \{)</pattern>
|
|
<replacement>@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)$1</replacement>
|
|
</regex>
|
|
</regexes>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>net.revelc.code</groupId>
|
|
<artifactId>impsort-maven-plugin</artifactId>
|
|
<version>1.6.2</version>
|
|
<executions>
|
|
<execution>
|
|
<id>organize-imports</id>
|
|
<phase>process-sources</phase>
|
|
<goals><goal>sort</goal></goals>
|
|
<configuration>
|
|
<directories>
|
|
<directory>${basedir}/src/gen/java</directory>
|
|
</directories>
|
|
<includes>
|
|
<include>**/*.java</include>
|
|
</includes>
|
|
<removeUnused>true</removeUnused>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
|
|
<repositories>
|
|
<repository>
|
|
<id>inteligr8-public</id>
|
|
<url>https://repos.inteligr8.com/nexus/repository/inteligr8-public</url>
|
|
</repository>
|
|
</repositories>
|
|
|
|
<pluginRepositories>
|
|
<pluginRepository>
|
|
<id>mulesoft-releases</id>
|
|
<url>https://repository.mulesoft.org/releases</url>
|
|
</pluginRepository>
|
|
<pluginRepository>
|
|
<id>inteligr8-public</id>
|
|
<url>https://repos.inteligr8.com/nexus/repository/inteligr8-public</url>
|
|
</pluginRepository>
|
|
</pluginRepositories>
|
|
|
|
<distributionManagement>
|
|
<repository>
|
|
<id>inteligr8-releases</id>
|
|
<url>https://repos.inteligr8.com/nexus/repository/inteligr8-public</url>
|
|
</repository>
|
|
<snapshotRepository>
|
|
<id>inteligr8-snapshots</id>
|
|
<url>https://repos.inteligr8.com/nexus/repository/inteligr8-snapshots</url>
|
|
</snapshotRepository>
|
|
</distributionManagement>
|
|
</project>
|