Skip to content

Commit 952e9f0

Browse files
committed
Copying the global.vm to archetype resources folder because it's no longer global
1 parent 8ccf8ac commit 952e9f0

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "AWS Lambda Maven Archetype",
3+
"type": "bugfix",
4+
"description": "Fixed an issue where archetype generation failed with latest maven-archetype-plugin. See [#1981](https://github.com/aws/aws-sdk-java-v2/issues/1981)"
5+
}

archetypes/archetype-lambda/pom.xml

+52-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
</description>
3232

3333
<properties>
34-
<maven.archetype.version>3.1.2</maven.archetype.version>
34+
<maven.archetype.version>3.2.0</maven.archetype.version>
35+
<maven.resource.plugin.version>3.2.0</maven.resource.plugin.version>
3536
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
3637
</properties>
3738

@@ -118,6 +119,56 @@
118119
<skip>true</skip>
119120
</configuration>
120121
</plugin>
122+
123+
<!-- workaround to copy the global.vm and serviceMapping.vm to the sub folders
124+
because gloabl.vm is not so global any more
125+
see https://github.com/aws/aws-sdk-java-v2/issues/1981 -->
126+
<plugin>
127+
<artifactId>maven-resources-plugin</artifactId>
128+
<version>${maven.resource.plugin.version}</version>
129+
<executions>
130+
<execution>
131+
<id>copy-resources</id>
132+
<phase>process-classes</phase>
133+
<goals>
134+
<goal>copy-resources</goal>
135+
</goals>
136+
<configuration>
137+
<outputDirectory>${basedir}/target/classes/archetype-resources</outputDirectory>
138+
<encoding>UTF-8</encoding>
139+
<resources>
140+
<resource>
141+
<directory>${basedir}/target/classes/</directory>
142+
<includes>
143+
<include>global.vm</include>
144+
<include>serviceMapping.vm</include>
145+
</includes>
146+
</resource>
147+
</resources>
148+
</configuration>
149+
</execution>
150+
<execution>
151+
<id>copy-resources-to-sub-folder</id>
152+
<phase>process-classes</phase>
153+
<goals>
154+
<goal>copy-resources</goal>
155+
</goals>
156+
<configuration>
157+
<outputDirectory>${basedir}/target/classes/archetype-resources/src/main/java</outputDirectory>
158+
<encoding>UTF-8</encoding>
159+
<resources>
160+
<resource>
161+
<directory>${basedir}/target/classes/</directory>
162+
<includes>
163+
<include>global.vm</include>
164+
<include>serviceMapping.vm</include>
165+
</includes>
166+
</resource>
167+
</resources>
168+
</configuration>
169+
</execution>
170+
</executions>
171+
</plugin>
121172
</plugins>
122173
</build>
123174
</project>

0 commit comments

Comments
 (0)