Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bom module #247

Merged
merged 5 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
303 changes: 303 additions & 0 deletions flytekit-bom/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,303 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2023 Flyte Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.flyte</groupId>
<artifactId>flytekit-bom</artifactId>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we should not use parent for a bom module because that will result in leaking dependencies that are declared in the parent dependencyManagement section.

<version>0.4.24-SNAPSHOT</version>

<packaging>pom</packaging>

<name>Flytekit - Bill of Materials</name>
<description>Flytekit Java is the Java/Scala SDK built on top of Flyte.</description>
<url>https://github.com/flyteorg/flytekit-java</url>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>

<developers>
<developer>
<name>flytekit</name>
<email>[email protected]</email>
<organization>Flyte</organization>
<organizationUrl>https://flyte.org</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:https://github.com/flyteorg/flytekit-java.git</connection>
<developerConnection>scm:git:https://github.com/flyteorg/flytekit-java.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/flyteorg/flytekit-java</url>
</scm>

<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-jackson</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-java</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-scala_2.12</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-scala_2.13</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-scala-tests</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-testing</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-examples</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-examples-scala</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flytekit-local-engine</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>flyteidl-protos</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>jflyte-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>jflyte-aws</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>jflyte-google-cloud</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>jflyte-utils</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>jflyte</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.flyte</groupId>
<artifactId>integration-tests</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<pluginManagement>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly we need to configure this again because bom has no parent so it cannot inherit.

<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.21.0</version>
<configuration>
<pom>
<licenseHeader>
<content><![CDATA[<!--
Copyright $YEAR Flyte Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->]]></content>
<delimiter><![CDATA[<project]]></delimiter>
</licenseHeader>

<sortPom>
<encoding>UTF-8</encoding>
<lineSeparator>${line.separator}</lineSeparator>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
<keepBlankLines>true</keepBlankLines>
<nrOfIndentSpace>2</nrOfIndentSpace>
<indentBlankLines>false</indentBlankLines>
<indentSchemaLocation>false</indentSchemaLocation>
<predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
<sortProperties>false</sortProperties>
<sortModules>false</sortModules>
<sortExecutions>false</sortExecutions>
</sortPom>
</pom>

<formats>
<format>
<includes>
<include>**/src/**.xml</include>
</includes>
<!-- Files must end with a newline -->
<endWithNewline />
</format>
</formats>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<!-- Based on: https://central.sonatype.org/pages/apache-maven.html-->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
<configuration>
<gpgArguments>
<arg>--batch</arg>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<source>8</source>
<doclint>all,-missing</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
1 change: 0 additions & 1 deletion flytekit-examples-scala/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<scala.baseVersion>2.13</scala.baseVersion>
<scala.version>2.13.10</scala.version>

<maven.deploy.skip>true</maven.deploy.skip>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property doesn't make much sense because we do not use mvn deploy to publish artifacts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this property is not set consistently across the entire code code. For example integration-tests module should have had it.

<!-- spotbugs doesn't understand Scala code -->
<spotbugs.skip>true</spotbugs.skip>
</properties>
Expand Down
4 changes: 0 additions & 4 deletions flytekit-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
<name>Flytekit Java Examples</name>
<description>Examples of Tasks, Workflows and Launch plans written in Java.</description>

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>

<dependencies>
<!-- compile -->
<dependency>
Expand Down
1 change: 0 additions & 1 deletion flytekit-scala-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<scala.baseVersion>2.13</scala.baseVersion>
<scala.version>2.13.10</scala.version>

<maven.deploy.skip>true</maven.deploy.skip>
<!-- spotbugs doesn't understand Scala code -->
<spotbugs.skip>true</spotbugs.skip>
</properties>
Expand Down
1 change: 0 additions & 1 deletion jflyte/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
<properties>
<docker.image>ghcr.io/flyteorg/flytekit-java</docker.image>
<docker.tag>${project.version}</docker.tag>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>

<dependencies>
Expand Down
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
</developers>

<modules>
<module>flytekit-bom</module>
<module>flytekit-api</module>
<module>flytekit-jackson</module>
<module>flytekit-java</module>
Expand Down Expand Up @@ -94,6 +95,7 @@
<picocli.version>4.7.2</picocli.version>
<protobuf.version>3.21.12</protobuf.version>
<sl4j.version>1.7.36</sl4j.version>
<!-- also remember to bump the version in flytekit-bom module -->
<spotless.version>2.21.0</spotless.version>
<spotbugs.excludeFilterFile>spotbugs-exclude.xml</spotbugs.excludeFilterFile>
<error_prone.version>2.19.1</error_prone.version>
Expand Down Expand Up @@ -749,6 +751,7 @@
<profile>
<id>release</id>
<!-- Based on: https://central.sonatype.org/pages/apache-maven.html-->
<!-- Please also update the same profile in flytekit-bom module if needed -->
<build>
<plugins>
<plugin>
Expand Down
Loading