[ 
https://issues.apache.org/jira/browse/HDDS-1510?focusedWorklogId=253618&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-253618
 ]

ASF GitHub Bot logged work on HDDS-1510:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Jun/19 08:30
            Start Date: 04/Jun/19 08:30
    Worklog Time Spent: 10m 
      Work Description: elek commented on issue #900: HDDS-1510. Classpath 
files are deployed to the maven repository as pom/jar files
URL: https://github.com/apache/hadoop/pull/900#issuecomment-498575508
 
 
   Every file can be an "artifact" in the maven word if they are marked as 
artifact. We use custom classpath descriptors to generate the exact classpath 
and they are installed to the local maven repo + deployed to the maven 
repository during release.
   
   This is a problem in the `build-classpath` goal of the 
`maven-depedency-plugin` which is used to generate the classpath file. With 
using the `<attach>true</attach>` configuration we ask the plugin to mark the 
file as an uploadable artifact.
   
   Unfortunately the plugin doesn't set the _type_ of the artifact and the 
default is a jar. As a result the classpath file (text) is uploaded as a jar 
file, and nexus validation is failed because these fake jars.
   
   See the output of a normal `mvn install`
   
   ```
   [INFO] --- maven-install-plugin:2.5.1:install (default-install) @ 
hadoop-hdds-common ---
   ...
   [INFO] Installing 
/home/elek/projects/hadoop-review/hadoop-hdds/common/target/classpath to 
/home/elek/.m2/repository/org/apache/hadoop/hadoop-hdds-common/0.5.0-SNAPSHOT/hadoop-hdds-common-0.5.0-SNAPSHOT-classpath.jar
   ```
   But the classpath file is a text file:
   
   ```
   head  /home/elek/projects/hadoop-review/hadoop-hdds/common/target/classpath 
to 
/home/elek/.m2/repository/org/apache/hadoop/hadoop-hdds-common/0.5.0-SNAPSHOT/hadoop-hdds-common-0.5.0-SNAPSHOT-classpath.jar
   
classpath=$HDDS_LIB_JARS_DIR/kerb-simplekdc-1.0.1.jar:$HDDS_LIB_JARS_DIR/jackson-core-2.9.5.jar:$HDDS_LIB_JARS_DIR/ratis-netty-0.4.0-fe2b15d-SNAPSHOT.jar:$HDDS_LIB_JARS_DIR/protobuf-java-2.5.0.jar:$HDDS_LIB_JARS_DIR/bcpkix-jdk15on-1.60.jar
   ...
   ```
    
   One easy workaround is to mark the classpath file as an uploadable artifact 
with a separated plugin which has more flexibility (maven-build-helper-plugin).
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 253618)
    Time Spent: 20m  (was: 10m)

> Classpath files are deployed to the maven repository as pom/jar files
> ---------------------------------------------------------------------
>
>                 Key: HDDS-1510
>                 URL: https://issues.apache.org/jira/browse/HDDS-1510
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: build
>            Reporter: Elek, Marton
>            Assignee: Elek, Marton
>            Priority: Blocker
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 1. Classpath files are plain text files which are generatede for each ozone 
> projects. Classpath files are used to defined the classpath of a module (om, 
> scm, etc) based on the maven classpath.
> Example classpath file:
> {code}
> classpath=$HDDS_LIB_JARS_DIR/kerb-simplekdc-1.0.1.jar:$HDDS_LIB_JARS_DIR/hk2-utils-2.5.0.jar:$HDDS_LIB_JARS_DIR/jackson-core-2.9.5.jar:$HDDS_LIB_JARS_DIR/ratis-netty-0.4.0-fe2b15d-SNAPSHOT.jar:$HDDS_LIB_JARS_DIR/protobuf-java-2.5.0.jar:...
>  
> {code}
> Classpath files are maven artifacts and copied to share/ozone/classpath in 
> the distribution
> 2. 0.4.0 was the first release when we deployed the artifacts to the apache 
> nexus. [~ajayydv] reported the problem that the staging repository can't be 
> closed: INFRA-18344
> It turned out that the classpath files are uploaded with jar extension to the 
> repository. We deleted all the classpath files manually and the repository 
> became closable.
> To avoid similar issues we need to fix this problem and make sure that the 
> classpath files are not uploaded to the repository during a 'mvn deploy' or 
> uploaded but with a good extension.
> ps: I don't know the exact solution yet, but I can imagine that bumping the 
> version of maven deploy plugin can help. Seems to be a bug in the plugin.
> ps2: This is blocker as we need to fix it before the next release



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to