1<?xml version="1.0" encoding="UTF-8"?> 2<!-- 3 ~ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 ~ 5 ~ Licensed under the Apache License, Version 2.0 (the "License"). 6 ~ You may not use this file except in compliance with the License. 7 ~ A copy of the License is located at 8 ~ 9 ~ http://aws.amazon.com/apache2.0 10 ~ 11 ~ or in the "license" file accompanying this file. This file is distributed 12 ~ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 ~ express or implied. See the License for the specific language governing 14 ~ permissions and limitations under the License. 15 --> 16 17<project xmlns="http://maven.apache.org/POM/4.0.0" 18 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 20 <parent> 21 <artifactId>archetypes</artifactId> 22 <groupId>software.amazon.awssdk</groupId> 23 <version>2.24.3</version> 24 </parent> 25 <modelVersion>4.0.0</modelVersion> 26 27 <artifactId>archetype-app-quickstart</artifactId> 28 <packaging>maven-archetype</packaging> 29 <name>AWS Java SDK :: Archetype App</name> 30 <description> 31 The AWS SDK for Java - Maven archetype for a sample application using AWS Java SDK 2.x 32 </description> 33 34 <properties> 35 <maven.archetype.version>3.2.0</maven.archetype.version> 36 <maven.resource.plugin.version>3.2.0</maven.resource.plugin.version> 37 <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version> 38 </properties> 39 40 <dependencies> 41 <dependency> 42 <groupId>software.amazon.awssdk</groupId> 43 <artifactId>archetype-tools</artifactId> 44 <version>${awsjavasdk.version}</version> 45 <scope>provided</scope> 46 </dependency> 47 </dependencies> 48 <build> 49 <!-- Filtering the resource properties to get ${project.version} from archetype metadata. 50 See https://stackoverflow.com/a/22300149 --> 51 <resources> 52 <resource> 53 <directory>src/main/resources</directory> 54 <filtering>true</filtering> 55 <includes> 56 <include>META-INF/maven/archetype-metadata.xml</include> 57 </includes> 58 </resource> 59 <resource> 60 <directory>src/main/resources</directory> 61 <filtering>false</filtering> 62 <excludes> 63 <exclude>META-INF/maven/archetype-metadata.xml</exclude> 64 </excludes> 65 </resource> 66 </resources> 67 <extensions> 68 <extension> 69 <groupId>org.apache.maven.archetype</groupId> 70 <artifactId>archetype-packaging</artifactId> 71 <version>${maven.archetype.version}</version> 72 </extension> 73 </extensions> 74 75 <plugins> 76 <plugin> 77 <artifactId>maven-archetype-plugin</artifactId> 78 <version>${maven.archetype.version}</version> 79 <configuration> 80 <noLog>true</noLog> 81 <ignoreEOLStyle>true</ignoreEOLStyle> 82 <skip>${skip.unit.tests}</skip> 83 </configuration> 84 <executions> 85 <execution> 86 <id>integration-test</id> 87 <phase>verify</phase> 88 <goals> 89 <goal>integration-test</goal> 90 </goals> 91 </execution> 92 </executions> 93 </plugin> 94 95 <!-- Copy the global.vm and serviceMapping.vm from archetype-tools --> 96 <plugin> 97 <groupId>org.apache.maven.plugins</groupId> 98 <artifactId>maven-dependency-plugin</artifactId> 99 <version>${maven-dependency-plugin.version}</version> 100 <executions> 101 <execution> 102 <id>unpack-archetype-tools</id> 103 <phase>process-classes</phase> 104 <goals> 105 <goal>unpack</goal> 106 </goals> 107 <configuration> 108 <artifactItems> 109 <artifactItem> 110 <groupId>software.amazon.awssdk</groupId> 111 <artifactId>archetype-tools</artifactId> 112 <version>${project.version}</version> 113 <outputDirectory>${basedir}/target/classes/archetype-resources</outputDirectory> 114 <includes>**/*.vm</includes> 115 </artifactItem> 116 </artifactItems> 117 </configuration> 118 </execution> 119 </executions> 120 </plugin> 121 122 <!-- workaround to copy the global.vm and serviceMapping.vm to the sub folders 123 because global.vm is not so global any more 124 see https://github.com/aws/aws-sdk-java-v2/issues/1981 --> 125 <plugin> 126 <artifactId>maven-resources-plugin</artifactId> 127 <version>${maven.resource.plugin.version}</version> 128 <executions> 129 <execution> 130 <id>copy-resources-to-sub-folder</id> 131 <phase>process-classes</phase> 132 <goals> 133 <goal>copy-resources</goal> 134 </goals> 135 <configuration> 136 <outputDirectory>${basedir}/target/classes/archetype-resources/src/main/java</outputDirectory> 137 <encoding>UTF-8</encoding> 138 <resources> 139 <resource> 140 <directory>${basedir}/target/classes/archetype-resources</directory> 141 <includes> 142 <include>global.vm</include> 143 <include>serviceMapping.vm</include> 144 </includes> 145 </resource> 146 </resources> 147 </configuration> 148 </execution> 149 <execution> 150 <id>copy-resources-to-sub-folder-2</id> 151 <phase>process-classes</phase> 152 <goals> 153 <goal>copy-resources</goal> 154 </goals> 155 <configuration> 156 <outputDirectory>${basedir}/target/classes</outputDirectory> 157 <encoding>UTF-8</encoding> 158 <resources> 159 <resource> 160 <directory>${basedir}/target/classes/archetype-resources</directory> 161 <includes> 162 <include>global.vm</include> 163 <include>serviceMapping.vm</include> 164 </includes> 165 </resource> 166 </resources> 167 </configuration> 168 </execution> 169 </executions> 170 </plugin> 171 </plugins> 172 </build> 173 174</project> 175