You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/06/30 09:51:52 UTC

[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #1133: HDDS-3875. Package classpath files to the jar files instead of uploading them as artifacts

adoroszlai commented on a change in pull request #1133:
URL: https://github.com/apache/hadoop-ozone/pull/1133#discussion_r447559058



##########
File path: hadoop-ozone/dist/pom.xml
##########
@@ -41,103 +41,13 @@
             <id>copy-classpath-files</id>
             <phase>prepare-package</phase>
             <goals>
-              <goal>copy</goal>
+              <goal>unpack-dependencies</goal>
             </goals>
             <configuration>
               <outputDirectory>
                 target/ozone-${ozone.version}/share/ozone/classpath
               </outputDirectory>
-              <artifactItems>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-hdds-server-scm</artifactId>
-                  <version>${hdds.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-hdds-server-scm.classpath</destFileName>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-hdds-tools</artifactId>
-                  <version>${hdds.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-hdds-tools.classpath</destFileName>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-ozone-s3gateway</artifactId>
-                  <version>${ozone.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-ozone-s3gateway.classpath</destFileName>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-ozone-csi</artifactId>
-                  <version>${ozone.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-ozone-csi.classpath</destFileName>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-ozone-ozone-manager</artifactId>
-                  <version>${ozone.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-ozone-ozone-manager.classpath
-                  </destFileName>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-ozone-tools</artifactId>
-                  <version>${ozone.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-ozone-tools.classpath</destFileName>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-ozone-filesystem</artifactId>
-                  <version>${ozone.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-ozone-filesystem.classpath</destFileName>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-ozone-common</artifactId>
-                  <version>${ozone.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-ozone-common.classpath</destFileName>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-ozone-datanode</artifactId>
-                  <version>${ozone.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-ozone-datanode.classpath</destFileName>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-ozone-upgrade</artifactId>
-                  <version>${ozone.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-ozone-upgrade.classpath</destFileName>
-                </artifactItem>
-                <artifactItem>
-                  <groupId>org.apache.hadoop</groupId>
-                  <artifactId>hadoop-ozone-insight</artifactId>
-                  <version>${ozone.version}</version>
-                  <classifier>classpath</classifier>
-                  <type>cp</type>
-                  <destFileName>hadoop-ozone-insight.classpath</destFileName>
-                </artifactItem>
-              </artifactItems>
+              <includes>*.classpath</includes>

Review comment:
       Fix me if I'm wrong, but `ozone classpath` now lists several modules that were previously omitted.
   
   Previously:
   
   ```
   $ ozone classpath
   Usage: ozone classpath <ARTIFACTNAME>
   Where the artifact name is one of:
   
   hadoop-hdds-server-scm
   hadoop-hdds-tools
   hadoop-ozone-common
   hadoop-ozone-csi
   hadoop-ozone-datanode
   hadoop-ozone-filesystem
   hadoop-ozone-insight
   hadoop-ozone-ozone-manager
   hadoop-ozone-recon
   hadoop-ozone-s3gateway
   hadoop-ozone-tools
   hadoop-ozone-upgrade
   ```
   
   With patch:
   
   ```
   $ ozone classpath
   Usage: ozone classpath <ARTIFACTNAME>
   Where the artifact name is one of:
   
   hadoop-hdds-client
   hadoop-hdds-common
   hadoop-hdds-config
   hadoop-hdds-container-service
   hadoop-hdds-docs
   hadoop-hdds-hadoop-dependency-client
   hadoop-hdds-hadoop-dependency-server
   hadoop-hdds-interface-admin
   hadoop-hdds-interface-client
   hadoop-hdds-interface-server
   hadoop-hdds-server-framework
   hadoop-hdds-server-scm
   hadoop-hdds-tools
   hadoop-ozone-client
   hadoop-ozone-common
   hadoop-ozone-csi
   hadoop-ozone-datanode
   hadoop-ozone-filesystem-common
   hadoop-ozone-filesystem
   hadoop-ozone-insight
   hadoop-ozone-interface-client
   hadoop-ozone-ozone-manager
   hadoop-ozone-recon
   hadoop-ozone-reconcodegen
   hadoop-ozone-s3gateway
   hadoop-ozone-tools
   hadoop-ozone-upgrade
   ```
   
   Invoking `ozone classpath` for the extra modules results in an error (which is the same on `master`):
   
   ```
   $ ozone classpath hadoop-hdds-config
   Error: Could not find or load main class org.apache.hadoop.util.Classpath
   Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.Classpath
   ```

##########
File path: hadoop-hdds/pom.xml
##########
@@ -279,41 +279,19 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
         <executions>
           <execution>
             <id>add-classpath-descriptor</id>
-            <phase>package</phase>
+            <phase>prepare-package</phase>
             <goals>
               <goal>build-classpath</goal>
             </goals>
             <configuration>
-              <outputFile>${project.build.directory}/classpath</outputFile>
+              <outputFile>${project.build.outputDirectory}/${pom.artifactId}.classpath</outputFile>

Review comment:
       Maven outputs a warning for each submodule:
   
   ```
   The expression ${pom.artifactId} is deprecated. Please use ${project.artifactId} instead.
   ```
   
   ```suggestion
                 <outputFile>${project.build.outputDirectory}/${project.artifactId}.classpath</outputFile>
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org