Skip to content

Commit

Permalink
Refactor pom (#253)
Browse files Browse the repository at this point in the history
Signed-off-by: Hongxin Liang <[email protected]>
  • Loading branch information
honnix authored Sep 29, 2023
1 parent 8dff1f8 commit c925d99
Show file tree
Hide file tree
Showing 21 changed files with 365 additions and 274 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

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

- name: Release snapshot with Maven
if: ${{ github.ref == 'refs/heads/master' }}
Expand All @@ -50,8 +50,9 @@ jobs:
echo "test" | gpg --batch --clearsign --pinentry-mode loopback || true
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>"
mvn --batch-mode deploy
mvn --batch-mode deploy -Pci
env:
CI: true
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SONATYPE_PASSPHRASE }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ jobs:
mvn --batch-mode release:prepare -DgenerateBackupPoms=false
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>"
mvn --batch-mode release:perform -Prelease
mvn --batch-mode release:perform -Prelease -Pci
env:
CI: true
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SONATYPE_PASSPHRASE }}
Expand Down
47 changes: 2 additions & 45 deletions flyteidl-protos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.21.1:exe:${os.detected.classifier}</protocArtifact>
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
<checkStaleness>true</checkStaleness>
Expand All @@ -70,53 +69,11 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>8</source>
<target>8</target>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<!-- there are lots of deprecation in the protos but we don't want to fail -->
<failOnWarning>false</failOnWarning>
<!-- Generated proto classes produce warnings -->
<!-- The semantics of this option are reversed, see MCOMPILER-209. -->
<useIncrementalCompilation>false</useIncrementalCompilation>
<encoding>utf-8</encoding>
<compilerArgs>
<!-- for AutoValue reflection -->
<arg>-parameters</arg>
<arg>-Xlint:all</arg>
<!-- disable not helpful warnings to fail on warnings -->
<arg>-Xlint:-path</arg>
<arg>-Xlint:-processing</arg>
<!-- we don't care about classes being deserialized with different classpath -->
<arg>-Xlint:-serial</arg>
<arg>-implicit:class</arg>
<!-- see https://stackoverflow.com/a/57004351 -->
<arg>-Xpkginfo:always</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>${auto-value.version}</version>
</path>
<path>
<groupId>com.google.auto.service</groupId>
<artifactId>auto-service</artifactId>
<version>${auto-service.version}</version>
</path>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${error_prone.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
Expand Down
1 change: 1 addition & 0 deletions flytekit-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion flytekit-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-examples-scala</artifactId>
<artifactId>flytekit-examples-scala_2.13</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
34 changes: 29 additions & 5 deletions flytekit-examples-scala/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,47 @@
<version>0.4.25-SNAPSHOT</version>
</parent>

<artifactId>flytekit-examples-scala</artifactId>
<artifactId>flytekit-examples-scala_2.13</artifactId>

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

<properties>
<scala.baseVersion>2.13</scala.baseVersion>
<scala.version>2.13.10</scala.version>

<!-- spotbugs doesn't understand Scala code -->
<spotbugs.skip>true</spotbugs.skip>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala213.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala213.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-scala_${scala.baseVersion}</artifactId>
<artifactId>flytekit-api</artifactId>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-scala_2.13</artifactId>
</dependency>
</dependencies>

Expand Down
14 changes: 6 additions & 8 deletions flytekit-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
<artifactId>auto-service-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<scope>provided</scope>
</dependency>

<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -66,11 +72,6 @@
<artifactId>flytekit-testing</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -100,9 +101,6 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
5 changes: 5 additions & 0 deletions flytekit-jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
<artifactId>jsr305</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<scope>provided</scope>
</dependency>

<!-- test -->
<dependency>
Expand Down
9 changes: 2 additions & 7 deletions flytekit-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
<name>Flytekit Java</name>
<description>Classes used by developers to build Flyte's Tasks, Workflows and Launch plans.</description>

<properties>
<scala.version>2.13.10</scala.version>
</properties>

<dependencies>
<!-- provided -->
<dependency>
Expand Down Expand Up @@ -82,17 +78,16 @@
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala.version}</version>
<version>${scala213.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
<version>${scala213.version}</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public void testStructWorkflow() {
assertEquals(expectedOutput, outputs.get("outputStructData"));
}*/

@SuppressWarnings("LockOnNonEnclosingClassLiteral")
@Test
public void testRetryableTask_completed() {
String workflowName = new RetryableWorkflow().getName();
Expand Down Expand Up @@ -221,6 +222,7 @@ public void testRetryableTask_completed() {
}
}

@SuppressWarnings("LockOnNonEnclosingClassLiteral")
@Test
public void testRetryableTask_failed() {
WorkflowTemplate workflow = new RetryableWorkflow().toIdlTemplate();
Expand Down
54 changes: 49 additions & 5 deletions flytekit-scala-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,50 @@
in the same module.</description>

<properties>
<scala.baseVersion>2.13</scala.baseVersion>
<scala.version>2.13.10</scala.version>

<!-- spotbugs doesn't understand Scala code -->
<spotbugs.skip>true</spotbugs.skip>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala213.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala213.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- test -->
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-examples</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-scala_${scala.baseVersion}</artifactId>
<artifactId>flytekit-scala_2.13</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -81,10 +108,27 @@
<goal>testCompile</goal>
</goals>
</execution>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>doc-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Disabling the default javadoc plugin - we use scala-maven-plugin instead -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
Loading

0 comments on commit c925d99

Please sign in to comment.