[
https://issues.apache.org/jira/browse/HADOOP-15908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Akira Ajisaka updated HADOOP-15908:
-----------------------------------
Component/s: build
> hadoop-build-tools jar is downloaded from remote repository instead of using
> from local
> ---------------------------------------------------------------------------------------
>
> Key: HADOOP-15908
> URL: https://issues.apache.org/jira/browse/HADOOP-15908
> Project: Hadoop Common
> Issue Type: Bug
> Components: build
> Reporter: Oleksandr Shevchenko
> Assignee: Oleksandr Shevchenko
> Priority: Minor
> Attachments: HADOOP-15908.001.patch, HADOOP-15908.002.patch
>
>
> HADOOP-12893 added "maven-remote-resources-plugin" to hadoop-project/pom.xml
> to verify LICENSE.txt and NOTICE.txt files which includes
> "hadoop-build-tools" remote resource bundles.
> {code}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-remote-resources-plugin</artifactId>
> <version>${maven-remote-resources-plugin.version}</version>
> <configuration>
> <resourceBundles>
>
> <resourceBundle>org.apache.hadoop:hadoop-build-tools:${hadoop.version}</resourceBundle>
> </resourceBundles>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.apache.hadoop</groupId>
> <artifactId>hadoop-build-tools</artifactId>
> <version>${hadoop.version}</version>
> </dependency>
> </dependencies>
> <executions>
> <execution>
> <goals>
> <goal>process</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> {code}
> If we build only some module we always download " hadoop-build-tools" from
> maven repository.
> For example run:
> cd hadoop-common-project/
> mvn test
> Then we will get the following output:
> {noformat}
> [INFO] --- maven-remote-resources-plugin:1.5:process (default) @
> hadoop-annotations ---
> Downloading from apache.snapshots:
> http://repository.apache.org/snapshots/org/apache/hadoop/hadoop-build-tools/3.3.0-SNAPSHOT/maven-metadata.xml
> Downloaded from apache.snapshots:
> http://repository.apache.org/snapshots/org/apache/hadoop/hadoop-build-tools/3.3.0-SNAPSHOT/maven-metadata.xml
> (791 B at 684 B/s)
> Downloading from apache.snapshots:
> http://repository.apache.org/snapshots/org/apache/hadoop/hadoop-main/3.3.0-SNAPSHOT/maven-metadata.xml
> Downloaded from apache.snapshots:
> http://repository.apache.org/snapshots/org/apache/hadoop/hadoop-main/3.3.0-SNAPSHOT/maven-metadata.xml
> (609 B at 547 B/s)
> Downloading from apache.snapshots.https:
> https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-build-tools/3.3.0-SNAPSHOT/maven-metadata.xml
> Downloaded from apache.snapshots.https:
> https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-build-tools/3.3.0-SNAPSHOT/maven-metadata.xml
> (791 B at 343 B/s)
> Downloading from apache.snapshots.https:
> https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-build-tools/3.3.0-SNAPSHOT/hadoop-build-tools-3.3.0-20181022.232020-179.jar
> Downloaded from apache.snapshots.https:
> https://repository.apache.org/content/repositories/snapshots/org/apache/hadoop/hadoop-build-tools/3.3.0-SNAPSHOT/hadoop-build-tools-3.3.0-20181022.232020-179.jar
> (0 B at 0 B/s)
> {noformat}
> If "hadoop-build-tools" jar doesn't exist in maven repository (for example we
> try to build new version locally before repository will be created ) we can't
> build some module:
> For example run:
> cd hadoop-common-project/
> mvn test
> Then we will get the following output:
> {noformat}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process (default)
> on project hadoop-annotations: Execution default of goal
> org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process failed:
> Plugin org.apache.maven.plugins:maven-remote-resources-plugin:1.5 or one of
> its dependencies could not be resolved: Failure to find
> org.apache.hadoop:hadoop-build-tools:jar:3.2.0 in
> https://repo.maven.apache.org/maven2 was cached in the local repository,
> resolution will not be reattempted until the update interval of central has
> elapsed or updates are forced -> [Help 1]
> {noformat}
> Therefore, we need to limit execution of the Remote Resources Plugin only in
> the root directory in which the build was run.
> To accomplish this, we can use the "runOnlyAtExecutionRoot parameter"
> From maven documentation
> http://maven.apache.org/plugins/maven-remote-resources-plugin/usage.html
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]