Skip to content

Commit

Permalink
Fix maven build from different directories (apache#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafael-telles authored and vfraga committed Apr 20, 2022
1 parent e8a7d5c commit 890c81c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 43 deletions.
2 changes: 1 addition & 1 deletion java/flight/flight-grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<artifactId>arrow-flight</artifactId>
<groupId>org.apache.arrow</groupId>
<version>8.0.0-SNAPSHOT</version>
<version>6.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
28 changes: 18 additions & 10 deletions java/flight/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<properties>
<dep.grpc.version>1.30.2</dep.grpc.version>
<dep.protobuf.version>3.7.1</dep.protobuf.version>
<dep.protobuf.version>3.17.3</dep.protobuf.version>
</properties>

<modules>
Expand All @@ -38,14 +38,22 @@
</modules>

<build>
<extensions>
<!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64) property -->
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.5.0.Final</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<protocArtifact>
com.google.protobuf:protoc:${dep.protobuf.version}:exe:${os.detected.classifier}
</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${dep.grpc.version}:exe:${os.detected.classifier}
</pluginArtifact>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
32 changes: 0 additions & 32 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -506,38 +506,6 @@
</lifecycleMappingMetadata>
</configuration>
</plugin>

<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${dep.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${dep.grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
<id>proto-compile</id>
<phase>generate-sources</phase>
<configuration>
<protoSourceRoot>${basedir}/../format/</protoSourceRoot>
</configuration>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
<execution>
<id>proto-test-compile</id>
<phase>generate-test-sources</phase>
<goals>
<goal>test-compile</goal>
<goal>test-compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down

0 comments on commit 890c81c

Please sign in to comment.