Skip to content

Commit

Permalink
Fix shading for ahc-default.properties file (apache#10007)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari authored Mar 22, 2021
1 parent cdd87fb commit 26bdf59
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 159 deletions.
48 changes: 48 additions & 0 deletions pulsar-broker-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,54 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>${asynchttpclient.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<includes>org/asynchttpclient/config/ahc-default.properties</includes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>shade-ahc-properties</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- shade the AsyncHttpClient ahc-default.properties files -->
<replace token= "org.asynchttpclient."
value="org.apache.pulsar.shade.org.asynchttpclient."
file="${project.build.directory}/classes/org/asynchttpclient/config/ahc-default.properties"/>
</target>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
48 changes: 48 additions & 0 deletions pulsar-client-admin-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,54 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>${asynchttpclient.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<includes>org/asynchttpclient/config/ahc-default.properties</includes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>shade-ahc-properties</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- shade the AsyncHttpClient ahc-default.properties files -->
<replace token= "org.asynchttpclient."
value="org.apache.pulsar.shade.org.asynchttpclient."
file="${project.build.directory}/classes/org/asynchttpclient/config/ahc-default.properties"/>
</target>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down

This file was deleted.

This file was deleted.

30 changes: 30 additions & 0 deletions pulsar-client-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,42 @@
<includes>**/ProtobufSchema.class</includes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>${asynchttpclient.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<includes>org/asynchttpclient/config/ahc-default.properties</includes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>shade-ahc-properties</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- shade the AsyncHttpClient ahc-default.properties files -->
<replace token= "org.asynchttpclient."
value="org.apache.pulsar.shade.org.asynchttpclient."
file="${project.build.directory}/classes/org/asynchttpclient/config/ahc-default.properties"/>
</target>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<!-- Shade all the dependencies to avoid conflicts -->
<groupId>org.apache.maven.plugins</groupId>
Expand Down
31 changes: 26 additions & 5 deletions pulsar-client-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,41 @@
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-client-original</artifactId>
<version>${project.version}</version>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>${asynchttpclient.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<includes>**/ahc.properties</includes>
<outputDirectory>${project.build.directory}/classes/org/asynchttpclient/config</outputDirectory>
<includes>org/asynchttpclient/config/ahc-default.properties</includes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>shade-ahc-properties</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- shade the AsyncHttpClient ahc-default.properties files -->
<replace token= "org.asynchttpclient."
value="org.apache.pulsar.shade.org.asynchttpclient."
file="${project.build.directory}/classes/org/asynchttpclient/config/ahc-default.properties"/>
</target>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<!-- Shade all the dependencies to avoid conflicts -->
<groupId>org.apache.maven.plugins</groupId>
Expand Down
76 changes: 0 additions & 76 deletions pulsar-client/src/main/resources/ahc.properties

This file was deleted.

Loading

0 comments on commit 26bdf59

Please sign in to comment.