Skip to content

Commit

Permalink
Clean apache-release profile usage
Browse files Browse the repository at this point in the history
Newer versions of javadoc and sources plugins do not allow attaching
multiple times the "same" artifact, which causes issues with the
`ci/scripts/java_full_build.sh`

Update the script to remove the standalone assembly:single
sources:jar and javadoc:jar which are already managed by
`org.apache:apache` parent/`apache-release` profile

Also remove the unnecessary copy of sources and javadoc jars from the
projects as they are also installed into the local maven repository and
copied from there as well

Disable source-release zipfile generation in maven and bom directories
as the main artifact generated by java-root will also contains both
directories
  • Loading branch information
laurentgo committed Jun 4, 2024
1 parent 41f9616 commit 7fbe800
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 29 deletions.
7 changes: 0 additions & 7 deletions ci/scripts/java_full_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ fi
# build the entire project
mvn clean \
install \
assembly:single \
source:jar \
javadoc:jar \
-Papache-release \
-Parrow-c-data \
-Parrow-jni \
Expand All @@ -60,10 +57,6 @@ mvn clean \
-DdescriptorId=source-release

# copy all jar, zip and pom files to the distribution folder
find . \
"(" -name "*-javadoc.jar" -o -name "*-sources.jar" ")" \
-exec echo {} ";" \
-exec cp {} $dist_dir ";"
find ~/.m2/repository/org/apache/arrow \
"(" \
-name "*.jar" -o \
Expand Down
23 changes: 23 additions & 0 deletions java/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,27 @@
</plugin>
</plugins>
</reporting>

<profiles>
<profile>
<id>apache-release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>source-release-assembly</id>
<configuration>
<!-- source release assembly is managed at the root of the project. -->
<skipAssembly>true</skipAssembly>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
45 changes: 23 additions & 22 deletions java/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -283,28 +283,6 @@
</execution>
</executions>
</plugin>
<!--
Generate custom Arrow Java Maven Plugin for module-info.java compiler.
Needed to pass GitHub CI validation `$ mvn assembly:single`
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>src</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
Expand Down Expand Up @@ -345,4 +323,27 @@
</plugin>
</plugins>
</reporting>

<profiles>
<profile>
<id>apache-release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>source-release-assembly</id>
<configuration>
<!-- source release assembly is managed at the root of the project. -->
<skipAssembly>true</skipAssembly>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 7fbe800

Please sign in to comment.