[ 
https://issues.apache.org/jira/browse/HBASE-19780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16323444#comment-16323444
 ] 

Appy commented on HBASE-19780:
------------------------------

It's a result of multiple reasons:
# Recent changes to few modules to ensure Zero checkstyle errors (which is 
good). However, default phase for maven-checkstyle-plugin is 'verify' where the 
patches changed it to 'vaildate'. As a result, i saw that checkstyle was 
getting executed as part of {{maven-site-plugin:3.4:site}} goal. Removing the 
{{<phase>}} tag fixed that.
{noformat}
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <executions>
          <execution>
            <id>checkstyle</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <failOnViolation>true</failOnViolation>
            </configuration>
          </execution>
        </executions>
      </plugin>
{noformat}
# maven-checkstyle-plugin has dependency on {{hbase-checkstyle}} package. 
However, that's not built yet when maven-site-plugin:site runs as part of top 
level module. {{master}} build started fetching it from apache repo and hence 
didn't fail. Where as there are no corresponding artifacts for 2.0.0-beta1 
(since it's still in RC), so branch-2 build was failing.
{noformat}
--- maven-checkstyle-plugin:2.17:check (checkstyle) @ hbase-error-prone ---
Downloading: 
http://repository.apache.org/snapshots/org/apache/hbase/hbase-checkstyle/3.0.0-SNAPSHOT/maven-metadata.xml
Downloaded: 
http://repository.apache.org/snapshots/org/apache/hbase/hbase-checkstyle/3.0.0-SNAPSHOT/maven-metadata.xml
 (2 KB at 2.6 KB/sec)
Downloading: 
http://repository.apache.org/snapshots/org/apache/hbase/hbase-checkstyle/3.0.0-SNAPSHOT/hbase-checkstyle-3.0.0-20180109.153919-2.jar
Downloaded: 
http://repository.apache.org/snapshots/org/apache/hbase/hbase-checkstyle/3.0.0-SNAPSHOT/hbase-checkstyle-3.0.0-20180109.153919-2.jar
 (10 KB at 28.2 KB/sec)
{noformat}

My suggestion here is, current setup is a bit complicated.
We have *.xml  in a separate hbase-checkstyle module as resources. They are 
first packaged and then included by adding the module as depending for the 
plugin.
The thing is, all good if everything is working (which it is most times). But 
if something's break, it's hard to figure out things.
The simplification would be, move the *.xml files to a folder in dev-support 
(after all, they are for development support) and simply refer the files.

> Fix build in branch-2
> ---------------------
>
>                 Key: HBASE-19780
>                 URL: https://issues.apache.org/jira/browse/HBASE-19780
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Appy
>
> Not able to run following command successfully:
> {{mvn -DskipTests install site 
> -Dmaven.repo.local=/Users/appy/Desktop/temp_repo}}
> Use a clean separate repo so that existing packages don't pollute the build.
> Error is following.
> {noformat}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site) on project 
> hbase: failed to get report for 
> org.apache.maven.plugins:maven-javadoc-plugin: Failed to execute goal 
> org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (checkstyle) on 
> project hbase-error-prone: Execution checkstyle of goal 
> org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check failed: Plugin 
> org.apache.maven.plugins:maven-checkstyle-plugin:2.17 or one of its 
> dependencies could not be resolved: Failure to find 
> org.apache.hbase:hbase-checkstyle:jar:2.0.0-beta-1 in 
> http://repository.apache.org/snapshots/ was cached in the local repository, 
> resolution will not be reattempted until the update interval of 
> apache.snapshots has elapsed or updates are forced -> [Help 1]
> {noformat}
> Note that master build goes pass this point.
> Need to figure out what's the difference and fix the overall build.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to