You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2021/03/29 04:39:14 UTC

[orc] branch master updated: ORC-776: Include source jars during publishing snapshot (#673)

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/master by this push:
     new 08bdb86  ORC-776: Include source jars during publishing snapshot (#673)
08bdb86 is described below

commit 08bdb8661c568159afe9e0c6a209dadd338e336d
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Sun Mar 28 21:39:06 2021 -0700

    ORC-776: Include source jars during publishing snapshot (#673)
    
    ### What changes were proposed in this pull request?
    
    This PR aims to include `source` jars at snapshots. We need this patch for all branches (master/branch-1.6/branch-1.5).
    - https://repository.apache.org/content/repositories/snapshots/org/apache/orc/orc-core/
    
    ### Why are the changes needed?
    
    Currently, snapshot artifacts doesn't have source jars while the release artifacts have them.
    `source` jars are crucial during debugging with snapshot jars.
    
    ### How was this patch tested?
    
    Manually.
    
    **BEFORE**
    ```
    $ mvn install -DskipTests
    $ ls -al ~/.m2/repository/org/apache/orc/orc-core/1.7.0-SNAPSHOT
    total 2800
    drwxrwxr-x 2 dongjoon dongjoon    4096 Mar 27 18:59 .
    drwxrwxr-x 3 dongjoon dongjoon    4096 Mar 27 18:59 ..
    -rw-rw-r-- 1 dongjoon dongjoon     912 Mar 27 18:59 maven-metadata-local.xml
    -rw-rw-r-- 1 dongjoon dongjoon 1029565 Mar 27 18:59 orc-core-1.7.0-SNAPSHOT.jar
    -rw-rw-r-- 1 dongjoon dongjoon 1808265 Mar 27 18:59 orc-core-1.7.0-SNAPSHOT-nohive.jar
    -rw-rw-r-- 1 dongjoon dongjoon    5210 Mar 23 15:47 orc-core-1.7.0-SNAPSHOT.pom
    -rw-rw-r-- 1 dongjoon dongjoon     237 Mar 27 18:59 _remote.repositories
    ```
    
    **AFTER**
    ```
    $ mvn install -DskipTests
    $ ls -al ~/.m2/repository/org/apache/orc/orc-core/1.7.0-SNAPSHOT
    total 6872
    drwxr-xr-x  9 dongjoon  dongjoon      288 Mar 27 19:00 .
    drwxr-xr-x  4 dongjoon  dongjoon      128 Mar 27 19:00 ..
    -rw-r--r--  1 dongjoon  dongjoon      318 Mar 27 19:00 _remote.repositories
    -rw-r--r--  1 dongjoon  dongjoon     1327 Mar 27 19:00 maven-metadata-local.xml
    -rw-r--r--  1 dongjoon  dongjoon  1808265 Mar 27 19:00 orc-core-1.7.0-SNAPSHOT-nohive.jar
    -rw-r--r--  1 dongjoon  dongjoon   443706 Mar 27 19:00 orc-core-1.7.0-SNAPSHOT-sources.jar
    -rw-r--r--  1 dongjoon  dongjoon   210828 Mar 27 19:00 orc-core-1.7.0-SNAPSHOT-test-sources.jar
    -rw-r--r--  1 dongjoon  dongjoon  1029565 Mar 27 19:00 orc-core-1.7.0-SNAPSHOT.jar
    -rw-r--r--  1 dongjoon  dongjoon     5210 Mar 25 22:49 orc-core-1.7.0-SNAPSHOT.pom
    ```
---
 java/pom.xml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/java/pom.xml b/java/pom.xml
index e152124..c61e808 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -149,6 +149,23 @@
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>3.2.1</version>
+        <configuration>
+          <attach>true</attach>
+        </configuration>
+        <executions>
+          <execution>
+            <id>create-source-jar</id>
+            <goals>
+              <goal>jar-no-fork</goal>
+              <goal>test-jar-no-fork</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <version>3.0.0-M5</version>
         <configuration>