Skip to content

Commit

Permalink
Update Avro to 1.11.4 and override from camel
Browse files Browse the repository at this point in the history
  • Loading branch information
claudio4j committed Oct 4, 2024
1 parent 3e0e4fe commit 3dec6fb
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,13 @@ private void processComponents(org.apache.camel.catalog.CamelCatalog catalog, Ma
.build());
});

// override avro version, as defined in camel-k-runtime-bom/pom.xml
boolean avroArtifact = "camel-quarkus-jackson-avro".equals(definition.getArtifactId()) || "camel-quarkus-avro".equals(definition.getArtifactId())
|| "camel-quarkus-avro-rpc".equals(definition.getArtifactId());
if ("org.apache.camel.quarkus".equals(definition.getGroupId()) && avroArtifact) {
builder.addDependency("org.apache.avro", "avro");
}

return builder.build();
});
}
Expand Down Expand Up @@ -477,6 +484,13 @@ private void processDataFormats(org.apache.camel.catalog.CamelCatalog catalog, M

artifacts.compute(definition.getArtifactId(), (key, artifact) -> {
CamelArtifact.Builder builder = artifactBuilder(artifact, definition);

// override avro version, as defined in camel-k-runtime-bom/pom.xml
boolean avroArtifact = "camel-quarkus-jackson-avro".equals(definition.getArtifactId()) || "camel-quarkus-avro".equals(definition.getArtifactId())
|| "camel-quarkus-avro-rpc".equals(definition.getArtifactId());
if ("org.apache.camel.quarkus".equals(definition.getGroupId()) && avroArtifact) {
builder.addDependency("org.apache.avro", "avro");
}
builder.addDataformat(definition.getName());
builder.addJavaType(definition.getJavaType());

Expand Down
249 changes: 143 additions & 106 deletions support/camel-k-runtime-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
<packaging>pom</packaging>

<properties>
<!-- reproduceable builds: https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
<!-- reproduceable builds:
https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
<project.build.outputTimestamp>1695367183</project.build.outputTimestamp>

<jolokia-version>1.7.1</jolokia-version>
Expand All @@ -43,6 +44,10 @@
<quarkus-platform-version>2.13.9.SP2</quarkus-platform-version>
<!-- The quarkus camel bom may differ from quarkus platfom -->
<quarkus-camel-bom-version>2.13.9.SP2</quarkus-camel-bom-version>
<camel-quarkus-version>2.13.3</camel-quarkus-version>

<!-- Overrides section - as CEQ, Quarkus versions are EOL we can override any version from upstream -->
<avro-version>1.11.4</avro-version>
</properties>

<developers>
Expand Down Expand Up @@ -234,108 +239,140 @@
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin-version}</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>${maven-version}</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>release</id>
<activation>
<property>
<name>release</name>
</property>
</activation>
<build>
<plugins>
<!-- We want to deploy the artifact to a staging location for perusal -->
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0</version>
</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</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<additionalOptions>${javadoc.opts}</additionalOptions>
</configuration>
</plugin>
<!-- We want to sign the artifact, the POM, and all attached artifacts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
<useAgent>${gpg.useagent}</useAgent>
</configuration>
<executions>
<execution>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>doclint-java8-disable</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<javadoc.opts>-Xdoclint:none</javadoc.opts>
</properties>
</profile>
</profiles>
</project>

<!-- override avro due to CVE -->
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jackson-avro</artifactId>
<version>${camel-quarkus-version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-avro</artifactId>
<version>${camel-quarkus-version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>${avro-version}</version>
</dependency>

</dependencies>
</dependencyManagement>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin-version}</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>${maven-version}</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>release</id>
<activation>
<property>
<name>release</name>
</property>
</activation>
<build>
<plugins>
<!-- We want to deploy the artifact to a staging location for perusal -->
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0</version>
</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</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<additionalOptions>${javadoc.opts}</additionalOptions>
</configuration>
</plugin>
<!-- We want to sign the artifact, the POM, and all attached artifacts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
<useAgent>${gpg.useagent}</useAgent>
</configuration>
<executions>
<execution>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>doclint-java8-disable</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<javadoc.opts>-Xdoclint:none</javadoc.opts>
</properties>
</profile>
</profiles>
</project>

0 comments on commit 3dec6fb

Please sign in to comment.