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

Nihal Jain commented on HBASE-21135:
------------------------------------

With patch on Windows:
{noformat}
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache HBase ....................................... SUCCESS [  3.441 s]
[INFO] Apache HBase - Checkstyle .......................... SUCCESS [  1.043 s]
[INFO] Apache HBase - Build Support ....................... SUCCESS [  0.057 s]
[INFO] Apache HBase - Error Prone Rules ................... SUCCESS [  1.385 s]
[INFO] Apache HBase - Annotations ......................... SUCCESS [  0.614 s]
[INFO] Apache HBase - Build Configuration ................. SUCCESS [  0.128 s]
[INFO] Apache HBase - Shaded Protocol ..................... SUCCESS [ 34.409 s]
[INFO] Apache HBase - Common .............................. SUCCESS [ 24.600 s]
[INFO] Apache HBase - Metrics API ......................... SUCCESS [  2.099 s]
[INFO] Apache HBase - Hadoop Compatibility ................ SUCCESS [  2.799 s]
[INFO] Apache HBase - Metrics Implementation .............. SUCCESS [  2.513 s]
[INFO] Apache HBase - Hadoop Two Compatibility ............ SUCCESS [  3.540 s]
[INFO] Apache HBase - Protocol ............................ SUCCESS [ 11.765 s]
[INFO] Apache HBase - Client .............................. SUCCESS [ 12.878 s]
[INFO] Apache HBase - Zookeeper ........................... SUCCESS [  3.142 s]
[INFO] Apache HBase - Replication ......................... SUCCESS [  3.655 s]
[INFO] Apache HBase - Resource Bundle ..................... SUCCESS [  0.328 s]
[INFO] Apache HBase - HTTP ................................ SUCCESS [  6.054 s]
[INFO] Apache HBase - Procedure ........................... SUCCESS [  3.555 s]
[INFO] Apache HBase - Server .............................. SUCCESS [ 41.261 s]
[INFO] Apache HBase - MapReduce ........................... SUCCESS [ 10.958 s]
[INFO] Apache HBase - Testing Util ........................ SUCCESS [  4.142 s]
[INFO] Apache HBase - Thrift .............................. SUCCESS [ 12.591 s]
[INFO] Apache HBase - RSGroup ............................. SUCCESS [  7.119 s]
[INFO] Apache HBase - Shell ............................... SUCCESS [  4.232 s]
[INFO] Apache HBase - Coprocessor Endpoint ................ SUCCESS [  7.678 s]
[INFO] Apache HBase - Integration Tests ................... SUCCESS [  6.985 s]
[INFO] Apache HBase - Rest ................................ SUCCESS [  9.629 s]
[INFO] Apache HBase - Examples ............................ SUCCESS [  6.832 s]
[INFO] Apache HBase - Shaded .............................. SUCCESS [  0.272 s]
[INFO] Apache HBase - Shaded - Client (with Hadoop bundled) SUCCESS [  1.451 s]
[INFO] Apache HBase - Shaded - Client ..................... SUCCESS [  1.466 s]
[INFO] Apache HBase - Shaded - MapReduce .................. SUCCESS [  4.534 s]
[INFO] Apache HBase - External Block Cache ................ SUCCESS [  2.963 s]
[INFO] Apache HBase - Assembly ............................ SUCCESS [ 13.044 s]
[INFO] Apache HBase Shaded Packaging Invariants ........... SUCCESS [ 14.888 s]
[INFO] Apache HBase Shaded Packaging Invariants (with Hadoop bundled) SUCCESS [ 
12.077 s]
[INFO] Apache HBase - Archetypes .......................... SUCCESS [  0.121 s]
[INFO] Apache HBase - Exemplar for hbase-client archetype . SUCCESS [  3.492 s]
[INFO] Apache HBase - Exemplar for hbase-shaded-client archetype SUCCESS [  
1.708 s]
[INFO] Apache HBase - Archetype builder ................... SUCCESS [  0.665 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:48 min
[INFO] Finished at: 2018-08-31T16:11:25+05:30
[INFO] Final Memory: 229M/1474M
[INFO] ------------------------------------------------------------------------
{noformat}



> Build fails on windows as it fails to parse windows path during license check
> -----------------------------------------------------------------------------
>
>                 Key: HBASE-21135
>                 URL: https://issues.apache.org/jira/browse/HBASE-21135
>             Project: HBase
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 3.0.0, 2.1.1
>            Reporter: Nihal Jain
>            Assignee: Nihal Jain
>            Priority: Major
>             Fix For: 3.0.0
>
>         Attachments: HBASE-21135.master.001.patch
>
>
> License check via enforce plugin throws following error during build on 
> windows:
> {code:java}
> Sourced file: inline evaluation of: ``File license = new 
> File("D:\DS\HBase_2\hbase\hbase-shaded\target/maven-shared-ar . . . '' Token 
> Parsing Error: Lexical error at line 1, column 29.  Encountered: "D" (68), 
> after : "\"D:\\": <at unknown location>{code}
> Complete stacktrace with command
> {code:java}
> mvn clean install -DskipTests -X
> {code}
> is as follows:
> {noformat}
> [INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (check-aggregate-license) @ 
> hbase-shaded ---
> [DEBUG] Configuring mojo 
> org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce from plugin 
> realm 
> ClassRealm[plugin>org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1, 
> parent: sun.misc.Launcher$AppClassLoader@55f96302]
> [DEBUG] Configuring mojo 
> 'org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce' with basic 
> configurator -->
> [DEBUG]   (s) fail = true
> [DEBUG]   (s) failFast = false
> [DEBUG]   (f) ignoreCache = false
> [DEBUG]   (f) mojoExecution = 
> org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce {execution: 
> check-aggregate-license}
> [DEBUG]   (s) project = MavenProject: 
> org.apache.hbase:hbase-shaded:2.1.1-SNAPSHOT @ 
> D:\DS\HBase_2\hbase\hbase-shaded\pom.xml
> [DEBUG]   (s) condition = File license = new 
> File("D:\DS\HBase_2\hbase\hbase-shaded\target/maven-shared-archive-resources/META-INF/LICENSE");
>                     // Beanshell does not support try-with-resources,
>                     // so we must close this scanner manually
>                     Scanner scanner = new Scanner(license);
>                     while (scanner.hasNextLine()) {
>                       if (scanner.nextLine().startsWith("ERROR:")) {
>                         scanner.close();
>                         return false;
>                       }
>                     }
>                     scanner.close();
>                     return true;
> [DEBUG]   (s) message = License errors detected, for more detail find ERROR in
>                     
> D:\DS\HBase_2\hbase\hbase-shaded\target/maven-shared-archive-resources/META-INF/LICENSE
> [DEBUG]   (s) rules = 
> [org.apache.maven.plugins.enforcer.EvaluateBeanshell@7e307087]
> [DEBUG]   (s) session = org.apache.maven.execution.MavenSession@5e1218b4
> [DEBUG]   (s) skip = false
> [DEBUG] -- end configuration --
> [DEBUG] Executing rule: org.apache.maven.plugins.enforcer.EvaluateBeanshell
> [DEBUG] Echo condition : File license = new 
> File("D:\DS\HBase_2\hbase\hbase-shaded\target/maven-shared-archive-resources/META-INF/LICENSE");
>                     // Beanshell does not support try-with-resources,
>                     // so we must close this scanner manually
>                     Scanner scanner = new Scanner(license);
>                     while (scanner.hasNextLine()) {
>                       if (scanner.nextLine().startsWith("ERROR:")) {
>                         scanner.close();
>                         return false;
>                       }
>                     }
>                     scanner.close();
>                     return true;
> [DEBUG] Echo script : File license = new 
> File("D:\DS\HBase_2\hbase\hbase-shaded\target/maven-shared-archive-resources/META-INF/LICENSE");
>                     // Beanshell does not support try-with-resources,
>                     // so we must close this scanner manually
>                     Scanner scanner = new Scanner(license);
>                     while (scanner.hasNextLine()) {
>                       if (scanner.nextLine().startsWith("ERROR:")) {
>                         scanner.close();
>                         return false;
>                       }
>                     }
>                     scanner.close();
>                     return true;
> [DEBUG] Adding failure due to exception
> org.apache.maven.enforcer.rule.api.EnforcerRuleException: Couldn't evaluate 
> condition: File license = new 
> File("D:\DS\HBase_2\hbase\hbase-shaded\target/maven-shared-archive-resources/META-INF/LICENSE");
>                     // Beanshell does not support try-with-resources,
>                     // so we must close this scanner manually
>                     Scanner scanner = new Scanner(license);
>                     while (scanner.hasNextLine()) {
>                       if (scanner.nextLine().startsWith("ERROR:")) {
>                         scanner.close();
>                         return false;
>                       }
>                     }
>                     scanner.close();
>                     return true;
>         at 
> org.apache.maven.plugins.enforcer.EvaluateBeanshell.evaluateCondition(EvaluateBeanshell.java:107)
>         at 
> org.apache.maven.plugins.enforcer.EvaluateBeanshell.execute(EvaluateBeanshell.java:72)
>         at 
> org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:202)
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
>         at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: Sourced file: inline evaluation of: ``File license = new 
> File("D:\DS\HBase_2\hbase\hbase-shaded\target/maven-shared-ar . . . '' Token 
> Parsing Error: Lexical error at line 1, column 29.  Encountered: "D" (68), 
> after : "\"D:\\": <at unknown location>
>         at bsh.Interpreter.eval(Unknown Source)
>         at bsh.Interpreter.eval(Unknown Source)
>         at bsh.Interpreter.eval(Unknown Source)
>         at 
> org.apache.maven.plugins.enforcer.EvaluateBeanshell.evaluateCondition(EvaluateBeanshell.java:102)
>         ... 24 more
> [WARNING] Rule 0: org.apache.maven.plugins.enforcer.EvaluateBeanshell failed 
> with message:
> Couldn't evaluate condition: File license = new 
> File("D:\DS\HBase_2\hbase\hbase-shaded\target/maven-shared-archive-resources/META-INF/LICENSE");
>                     // Beanshell does not support try-with-resources,
>                     // so we must close this scanner manually
>                     Scanner scanner = new Scanner(license);
>                     while (scanner.hasNextLine()) {
>                       if (scanner.nextLine().startsWith("ERROR:")) {
>                         scanner.close();
>                         return false;
>                       }
>                     }
>                     scanner.close();
>                     return true;
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Apache HBase - Shaded .............................. FAILURE [  2.388 
> s]
> [INFO] Apache HBase - Shaded - Client (with Hadoop bundled) SKIPPED
> [INFO] Apache HBase - Shaded - Client ..................... SKIPPED
> [INFO] Apache HBase - Shaded - MapReduce .................. SKIPPED
> [INFO] Apache HBase - External Block Cache ................ SKIPPED
> [INFO] Apache HBase - Assembly ............................ SKIPPED
> [INFO] Apache HBase Shaded Packaging Invariants ........... SKIPPED
> [INFO] Apache HBase Shaded Packaging Invariants (with Hadoop bundled) SKIPPED
> [INFO] Apache HBase - Archetypes .......................... SKIPPED
> [INFO] Apache HBase - Exemplar for hbase-client archetype . SKIPPED
> [INFO] Apache HBase - Exemplar for hbase-shaded-client archetype SKIPPED
> [INFO] Apache HBase - Archetype builder ................... SKIPPED
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 4.822 s
> [INFO] Finished at: 2018-08-31T15:39:00+05:30
> [INFO] Final Memory: 41M/421M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce 
> (check-aggregate-license) on project hbase-shaded: Some Enforcer rules have 
> failed. Look above for specific messages explaining why the rule failed. -> 
> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce 
> (check-aggregate-license) on project hbase-shaded: Some Enforcer rules have 
> failed. Look above for specific messages explaining why the rule failed.
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
>         at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>         at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>         at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Some Enforcer 
> rules have failed. Look above for specific messages explaining why the rule 
> failed.
>         at 
> org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:243)
>         at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>         ... 20 more
> [ERROR]
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {noformat}
>  



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

Reply via email to