Skip to content

Commit c925d99

Browse files
authored
Refactor pom (#253)
Signed-off-by: Hongxin Liang <[email protected]>
1 parent 8dff1f8 commit c925d99

File tree

21 files changed

+365
-274
lines changed

21 files changed

+365
-274
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Verify with Maven
4040
if: ${{ github.ref != 'refs/heads/master' }}
41-
run: mvn --batch-mode verify
41+
run: mvn --batch-mode verify -Pci
4242

4343
- name: Release snapshot with Maven
4444
if: ${{ github.ref == 'refs/heads/master' }}
@@ -50,8 +50,9 @@ jobs:
5050
echo "test" | gpg --batch --clearsign --pinentry-mode loopback || true
5151
5252
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>"
53-
mvn --batch-mode deploy
53+
mvn --batch-mode deploy -Pci
5454
env:
55+
CI: true
5556
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
5657
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
5758
MAVEN_GPG_PASSPHRASE: ${{ secrets.SONATYPE_PASSPHRASE }}

.github/workflows/release.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ jobs:
5151
5252
mvn --batch-mode release:prepare -DgenerateBackupPoms=false
5353
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>"
54-
mvn --batch-mode release:perform -Prelease
54+
mvn --batch-mode release:perform -Prelease -Pci
5555
5656
env:
57+
CI: true
5758
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
5859
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
5960
MAVEN_GPG_PASSPHRASE: ${{ secrets.SONATYPE_PASSPHRASE }}

flyteidl-protos/pom.xml

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@
5252
<plugin>
5353
<groupId>org.xolstice.maven.plugins</groupId>
5454
<artifactId>protobuf-maven-plugin</artifactId>
55-
<version>0.6.1</version>
5655
<configuration>
57-
<protocArtifact>com.google.protobuf:protoc:3.21.1:exe:${os.detected.classifier}</protocArtifact>
56+
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
5857
<pluginId>grpc-java</pluginId>
5958
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
6059
<checkStaleness>true</checkStaleness>
@@ -70,53 +69,11 @@
7069
</plugin>
7170
<plugin>
7271
<artifactId>maven-compiler-plugin</artifactId>
73-
<version>3.8.1</version>
7472
<configuration>
75-
<source>8</source>
76-
<target>8</target>
77-
<showWarnings>true</showWarnings>
78-
<showDeprecation>true</showDeprecation>
79-
<forceJavacCompilerUse>true</forceJavacCompilerUse>
73+
<!-- there are lots of deprecation in the protos but we don't want to fail -->
8074
<failOnWarning>false</failOnWarning>
81-
<!-- Generated proto classes produce warnings -->
82-
<!-- The semantics of this option are reversed, see MCOMPILER-209. -->
83-
<useIncrementalCompilation>false</useIncrementalCompilation>
84-
<encoding>utf-8</encoding>
85-
<compilerArgs>
86-
<!-- for AutoValue reflection -->
87-
<arg>-parameters</arg>
88-
<arg>-Xlint:all</arg>
89-
<!-- disable not helpful warnings to fail on warnings -->
90-
<arg>-Xlint:-path</arg>
91-
<arg>-Xlint:-processing</arg>
92-
<!-- we don't care about classes being deserialized with different classpath -->
93-
<arg>-Xlint:-serial</arg>
94-
<arg>-implicit:class</arg>
95-
<!-- see https://stackoverflow.com/a/57004351 -->
96-
<arg>-Xpkginfo:always</arg>
97-
</compilerArgs>
98-
<annotationProcessorPaths>
99-
<path>
100-
<groupId>com.google.auto.value</groupId>
101-
<artifactId>auto-value</artifactId>
102-
<version>${auto-value.version}</version>
103-
</path>
104-
<path>
105-
<groupId>com.google.auto.service</groupId>
106-
<artifactId>auto-service</artifactId>
107-
<version>${auto-service.version}</version>
108-
</path>
109-
<path>
110-
<groupId>com.google.errorprone</groupId>
111-
<artifactId>error_prone_core</artifactId>
112-
<version>${error_prone.version}</version>
113-
</path>
114-
</annotationProcessorPaths>
11575
</configuration>
11676
</plugin>
117-
<plugin>
118-
<artifactId>maven-jar-plugin</artifactId>
119-
</plugin>
12077
<plugin>
12178
<artifactId>maven-dependency-plugin</artifactId>
12279
</plugin>

flytekit-api/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<dependency>
4545
<groupId>com.google.errorprone</groupId>
4646
<artifactId>error_prone_annotations</artifactId>
47+
<scope>provided</scope>
4748
</dependency>
4849
</dependencies>
4950
</project>

flytekit-bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
</dependency>
108108
<dependency>
109109
<groupId>org.flyte</groupId>
110-
<artifactId>flytekit-examples-scala</artifactId>
110+
<artifactId>flytekit-examples-scala_2.13</artifactId>
111111
<version>${project.version}</version>
112112
</dependency>
113113
<dependency>

flytekit-examples-scala/pom.xml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,47 @@
2424
<version>0.4.25-SNAPSHOT</version>
2525
</parent>
2626

27-
<artifactId>flytekit-examples-scala</artifactId>
27+
<artifactId>flytekit-examples-scala_2.13</artifactId>
2828

2929
<name>Flytekit Java Examples in Scala</name>
3030
<description>Examples of Tasks, Workflows and Launch plans written in Scala.</description>
3131

3232
<properties>
33-
<scala.baseVersion>2.13</scala.baseVersion>
34-
<scala.version>2.13.10</scala.version>
35-
3633
<!-- spotbugs doesn't understand Scala code -->
3734
<spotbugs.skip>true</spotbugs.skip>
3835
</properties>
3936

37+
<dependencyManagement>
38+
<dependencies>
39+
<dependency>
40+
<groupId>org.scala-lang</groupId>
41+
<artifactId>scala-library</artifactId>
42+
<version>${scala213.version}</version>
43+
</dependency>
44+
<dependency>
45+
<groupId>org.scala-lang</groupId>
46+
<artifactId>scala-reflect</artifactId>
47+
<version>${scala213.version}</version>
48+
</dependency>
49+
</dependencies>
50+
</dependencyManagement>
51+
4052
<dependencies>
4153
<dependency>
4254
<groupId>org.flyte</groupId>
43-
<artifactId>flytekit-scala_${scala.baseVersion}</artifactId>
55+
<artifactId>flytekit-api</artifactId>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.scala-lang</groupId>
59+
<artifactId>scala-library</artifactId>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.scala-lang</groupId>
63+
<artifactId>scala-reflect</artifactId>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.flyte</groupId>
67+
<artifactId>flytekit-scala_2.13</artifactId>
4468
</dependency>
4569
</dependencies>
4670

flytekit-examples/pom.xml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
<artifactId>auto-service-annotations</artifactId>
5656
<scope>provided</scope>
5757
</dependency>
58+
<dependency>
59+
<groupId>com.google.errorprone</groupId>
60+
<artifactId>error_prone_annotations</artifactId>
61+
<scope>provided</scope>
62+
</dependency>
63+
5864
<!-- test -->
5965
<dependency>
6066
<groupId>org.junit.jupiter</groupId>
@@ -66,11 +72,6 @@
6672
<artifactId>flytekit-testing</artifactId>
6773
<scope>test</scope>
6874
</dependency>
69-
<dependency>
70-
<groupId>com.google.errorprone</groupId>
71-
<artifactId>error_prone_annotations</artifactId>
72-
<scope>provided</scope>
73-
</dependency>
7475
</dependencies>
7576

7677
<build>
@@ -100,9 +101,6 @@
100101
</execution>
101102
</executions>
102103
</plugin>
103-
<plugin>
104-
<artifactId>maven-compiler-plugin</artifactId>
105-
</plugin>
106104
</plugins>
107105
</build>
108106
</project>

flytekit-jackson/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@
6868
<artifactId>jsr305</artifactId>
6969
<scope>provided</scope>
7070
</dependency>
71+
<dependency>
72+
<groupId>com.google.errorprone</groupId>
73+
<artifactId>error_prone_annotations</artifactId>
74+
<scope>provided</scope>
75+
</dependency>
7176

7277
<!-- test -->
7378
<dependency>

flytekit-java/pom.xml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
<name>Flytekit Java</name>
3030
<description>Classes used by developers to build Flyte's Tasks, Workflows and Launch plans.</description>
3131

32-
<properties>
33-
<scala.version>2.13.10</scala.version>
34-
</properties>
35-
3632
<dependencies>
3733
<!-- provided -->
3834
<dependency>
@@ -82,17 +78,16 @@
8278
<artifactId>mockito-junit-jupiter</artifactId>
8379
<scope>test</scope>
8480
</dependency>
85-
8681
<dependency>
8782
<groupId>org.scala-lang</groupId>
8883
<artifactId>scala-reflect</artifactId>
89-
<version>${scala.version}</version>
84+
<version>${scala213.version}</version>
9085
<scope>test</scope>
9186
</dependency>
9287
<dependency>
9388
<groupId>org.scala-lang</groupId>
9489
<artifactId>scala-library</artifactId>
95-
<version>${scala.version}</version>
90+
<version>${scala213.version}</version>
9691
<scope>test</scope>
9792
</dependency>
9893

flytekit-local-engine/src/test/java/org/flyte/localengine/LocalEngineTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ public void testStructWorkflow() {
185185
assertEquals(expectedOutput, outputs.get("outputStructData"));
186186
}*/
187187

188+
@SuppressWarnings("LockOnNonEnclosingClassLiteral")
188189
@Test
189190
public void testRetryableTask_completed() {
190191
String workflowName = new RetryableWorkflow().getName();
@@ -221,6 +222,7 @@ public void testRetryableTask_completed() {
221222
}
222223
}
223224

225+
@SuppressWarnings("LockOnNonEnclosingClassLiteral")
224226
@Test
225227
public void testRetryableTask_failed() {
226228
WorkflowTemplate workflow = new RetryableWorkflow().toIdlTemplate();

0 commit comments

Comments
 (0)