Skip to content

Commit e35de90

Browse files
authored
maven deploy configuration (skip in tests and examples) (#1388)
1 parent 8d03249 commit e35de90

File tree

13 files changed

+401
-311
lines changed

13 files changed

+401
-311
lines changed

examples/pom.xml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,17 @@
4141
<module>powertools-examples-cloudformation</module>
4242
</modules>
4343

44-
<!-- Don't deploy the examples -->
45-
<properties>
46-
<maven.deploy.skip>true</maven.deploy.skip>
47-
</properties>
44+
<build>
45+
<plugins>
46+
<!-- Don't deploy the examples -->
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-deploy-plugin</artifactId>
50+
<configuration>
51+
<skip>true</skip>
52+
</configuration>
53+
</plugin>
54+
</plugins>
55+
</build>
4856

4957
</project>

examples/powertools-examples-batch/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<log4j.version>2.20.0</log4j.version>
1515
<maven.compiler.source>1.8</maven.compiler.source>
1616
<maven.compiler.target>1.8</maven.compiler.target>
17-
<maven.deploy.skip>true</maven.deploy.skip>
1817
<sdk.version>2.20.133</sdk.version>
1918
</properties>
2019

@@ -120,6 +119,14 @@
120119
</dependency>
121120
</dependencies>
122121
</plugin>
122+
<!-- Don't deploy the example -->
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-deploy-plugin</artifactId>
126+
<configuration>
127+
<skip>true</skip>
128+
</configuration>
129+
</plugin>
123130
</plugins>
124131
</build>
125132
<profiles>

examples/powertools-examples-cloudformation/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<log4j.version>2.20.0</log4j.version>
1414
<maven.compiler.source>1.8</maven.compiler.source>
1515
<maven.compiler.target>1.8</maven.compiler.target>
16-
<maven.deploy.skip>true</maven.deploy.skip>
1716
<lambda.core.version>1.2.3</lambda.core.version>
1817
<lambda.events.version>3.11.2</lambda.events.version>
1918
<aws.sdk.version>2.20.133</aws.sdk.version>
@@ -145,6 +144,14 @@
145144
</dependency>
146145
</dependencies>
147146
</plugin>
147+
<!-- Don't deploy the example -->
148+
<plugin>
149+
<groupId>org.apache.maven.plugins</groupId>
150+
<artifactId>maven-deploy-plugin</artifactId>
151+
<configuration>
152+
<skip>true</skip>
153+
</configuration>
154+
</plugin>
148155
</plugins>
149156
</build>
150157
<profiles>

examples/powertools-examples-core/cdk/app/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<log4j.version>2.20.0</log4j.version>
1414
<maven.compiler.source>1.8</maven.compiler.source>
1515
<maven.compiler.target>1.8</maven.compiler.target>
16-
<maven.deploy.skip>true</maven.deploy.skip>
1716
</properties>
1817

1918
<dependencies>
@@ -120,6 +119,14 @@
120119
</dependency>
121120
</dependencies>
122121
</plugin>
122+
<!-- Don't deploy the example -->
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-deploy-plugin</artifactId>
126+
<configuration>
127+
<skip>true</skip>
128+
</configuration>
129+
</plugin>
123130
</plugins>
124131
</build>
125132
<profiles>

examples/powertools-examples-core/cdk/infra/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<cdk.version>2.92.0</cdk.version>
1111
<constructs.version>[10.0.0,11.0.0)</constructs.version>
1212
<junit.version>5.10.0</junit.version>
13-
<maven.deploy.skip>true</maven.deploy.skip>
1413
</properties>
1514
<build>
1615
<plugins>
@@ -31,6 +30,14 @@
3130
<mainClass>cdk.CdkApp</mainClass>
3231
</configuration>
3332
</plugin>
33+
<!-- Don't deploy the example -->
34+
<plugin>
35+
<groupId>org.apache.maven.plugins</groupId>
36+
<artifactId>maven-deploy-plugin</artifactId>
37+
<configuration>
38+
<skip>true</skip>
39+
</configuration>
40+
</plugin>
3441
</plugins>
3542
</build>
3643
<dependencies>

examples/powertools-examples-core/sam/pom.xml

Lines changed: 76 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44

55
<groupId>software.amazon.lambda.examples</groupId>
66
<version>1.18.0-SNAPSHOT</version>
77
<artifactId>powertools-examples-core-sam</artifactId>
88
<packaging>jar</packaging>
9-
9+
1010
<name>Powertools for AWS Lambda (Java) library Examples - Core</name>
1111

1212
<properties>
1313
<log4j.version>2.20.0</log4j.version>
1414
<maven.compiler.source>1.8</maven.compiler.source>
1515
<maven.compiler.target>1.8</maven.compiler.target>
16-
<maven.deploy.skip>true</maven.deploy.skip>
1716
</properties>
1817

1918
<dependencies>
@@ -38,9 +37,9 @@
3837
<version>1.2.3</version>
3938
</dependency>
4039
<dependency>
41-
<groupId>com.amazonaws</groupId>
42-
<artifactId>aws-lambda-java-events</artifactId>
43-
<version>3.11.2</version>
40+
<groupId>com.amazonaws</groupId>
41+
<artifactId>aws-lambda-java-events</artifactId>
42+
<version>3.11.2</version>
4443
</dependency>
4544
<dependency>
4645
<groupId>org.apache.logging.log4j</groupId>
@@ -54,72 +53,81 @@
5453
</dependency>
5554

5655
<dependency>
57-
<groupId>junit</groupId>
58-
<artifactId>junit</artifactId>
59-
<version>4.13.2</version>
60-
<scope>test</scope>
56+
<groupId>junit</groupId>
57+
<artifactId>junit</artifactId>
58+
<version>4.13.2</version>
59+
<scope>test</scope>
6160
</dependency>
6261
</dependencies>
6362

6463
<build>
65-
<plugins>
66-
<plugin>
67-
<groupId>dev.aspectj</groupId>
68-
<artifactId>aspectj-maven-plugin</artifactId>
69-
<version>1.13.1</version>
70-
<configuration>
71-
<source>${maven.compiler.source}</source>
72-
<target>${maven.compiler.target}</target>
73-
<complianceLevel>${maven.compiler.target}</complianceLevel>
74-
<aspectLibraries>
75-
<aspectLibrary>
76-
<groupId>software.amazon.lambda</groupId>
77-
<artifactId>powertools-tracing</artifactId>
78-
</aspectLibrary>
79-
<aspectLibrary>
80-
<groupId>software.amazon.lambda</groupId>
81-
<artifactId>powertools-logging</artifactId>
82-
</aspectLibrary>
83-
<aspectLibrary>
84-
<groupId>software.amazon.lambda</groupId>
85-
<artifactId>powertools-metrics</artifactId>
86-
</aspectLibrary>
87-
</aspectLibraries>
88-
</configuration>
89-
<executions>
90-
<execution>
91-
<goals>
92-
<goal>compile</goal>
93-
</goals>
94-
</execution>
95-
</executions>
96-
</plugin>
97-
<plugin>
98-
<groupId>org.apache.maven.plugins</groupId>
99-
<artifactId>maven-shade-plugin</artifactId>
100-
<version>3.5.0</version>
101-
<executions>
102-
<execution>
103-
<phase>package</phase>
104-
<goals>
105-
<goal>shade</goal>
106-
</goals>
107-
<configuration>
108-
<transformers>
109-
<transformer implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
110-
</transformers>
111-
</configuration>
112-
</execution>
113-
</executions>
114-
<dependencies>
115-
<dependency>
116-
<groupId>org.apache.logging.log4j</groupId>
117-
<artifactId>log4j-transform-maven-shade-plugin-extensions</artifactId>
118-
<version>0.1.0</version>
119-
</dependency>
120-
</dependencies>
121-
</plugin>
122-
</plugins>
64+
<plugins>
65+
<plugin>
66+
<groupId>dev.aspectj</groupId>
67+
<artifactId>aspectj-maven-plugin</artifactId>
68+
<version>1.13.1</version>
69+
<configuration>
70+
<source>${maven.compiler.source}</source>
71+
<target>${maven.compiler.target}</target>
72+
<complianceLevel>${maven.compiler.target}</complianceLevel>
73+
<aspectLibraries>
74+
<aspectLibrary>
75+
<groupId>software.amazon.lambda</groupId>
76+
<artifactId>powertools-tracing</artifactId>
77+
</aspectLibrary>
78+
<aspectLibrary>
79+
<groupId>software.amazon.lambda</groupId>
80+
<artifactId>powertools-logging</artifactId>
81+
</aspectLibrary>
82+
<aspectLibrary>
83+
<groupId>software.amazon.lambda</groupId>
84+
<artifactId>powertools-metrics</artifactId>
85+
</aspectLibrary>
86+
</aspectLibraries>
87+
</configuration>
88+
<executions>
89+
<execution>
90+
<goals>
91+
<goal>compile</goal>
92+
</goals>
93+
</execution>
94+
</executions>
95+
</plugin>
96+
<plugin>
97+
<groupId>org.apache.maven.plugins</groupId>
98+
<artifactId>maven-shade-plugin</artifactId>
99+
<version>3.5.0</version>
100+
<executions>
101+
<execution>
102+
<phase>package</phase>
103+
<goals>
104+
<goal>shade</goal>
105+
</goals>
106+
<configuration>
107+
<transformers>
108+
<transformer
109+
implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
110+
</transformers>
111+
</configuration>
112+
</execution>
113+
</executions>
114+
<dependencies>
115+
<dependency>
116+
<groupId>org.apache.logging.log4j</groupId>
117+
<artifactId>log4j-transform-maven-shade-plugin-extensions</artifactId>
118+
<version>0.1.0</version>
119+
</dependency>
120+
</dependencies>
121+
</plugin>
122+
<!-- Don't deploy the examples -->
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-deploy-plugin</artifactId>
126+
<configuration>
127+
<skip>true</skip>
128+
</configuration>
129+
</plugin>
130+
</plugins>
123131
</build>
124132
<profiles>
125133
<!-- Use a profile to enforce AspectJ version 1.9.7 if we are Java 1.8 otherwise we'll get class

0 commit comments

Comments
 (0)