[ 
https://issues.apache.org/jira/browse/HBASE-16351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sean Busbey updated HBASE-16351:
--------------------------------
    Status: In Progress  (was: Patch Available)

poop. I looked into this some more, and we need to do the same failure check in 
the other places where we bundle dependencies:

{code}
Busbey-MBA:hbase busbey$ git grep license.bundles.dependencies\>true
hbase-assembly/pom.xml:    
<license.bundles.dependencies>true</license.bundles.dependencies>
hbase-shaded/pom.xml:      
<license.bundles.dependencies>true</license.bundles.dependencies>
{code}

it'll only show up in the hbase-shaded submodules when the `release` profile is 
active.

I tried to get an example by removing stuff from supplemental-info, but I got a 
different failure:

{code}
[INFO] --- maven-remote-resources-plugin:1.5:process (aggregate-licenses) @ 
hbase-shaded-server ---
[ERROR] Error invoking method 'get(java.lang.Integer)' in java.util.ArrayList 
at META-INF/LICENSE.vm[line 1553, column 22]
java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
        at 
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
        at 
org.apache.velocity.runtime.parser.node.ASTIndex.execute(ASTIndex.java:149)
        at 
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
        at 
org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReference.java:530)
        at 
org.apache.velocity.runtime.parser.node.ASTOrNode.evaluate(ASTOrNode.java:98)
        at 
org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:62)
        at 
org.apache.velocity.runtime.parser.node.ASTNotNode.evaluate(ASTNotNode.java:63)
        at 
org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:62)
        at 
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:85)
        at 
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at 
org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:420)
        at 
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
        at 
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
        at 
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
        at 
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
        at org.apache.velocity.Template.merge(Template.java:356)
        at org.apache.velocity.Template.merge(Template.java:260)
        at 
org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:354)
        at 
org.apache.maven.plugin.resources.remote.ProcessRemoteResourcesMojo.processResourceBundles(ProcessRemoteResourcesMojo.java:1164)
        at 
org.apache.maven.plugin.resources.remote.ProcessRemoteResourcesMojo.execute(ProcessRemoteResourcesMojo.java:520)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        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:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        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: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        ... 46 more
{code}

looks like my removal of beanutils

{code}
g:commons-beanutils AND a:commons-beanutils AND v:1.7.0

Until hbase-resource-bundle/src/main/resources/supplemental-models.xml
is updated, the build should fail.
{code}

> do dependency license check via enforcer plugin
> -----------------------------------------------
>
>                 Key: HBASE-16351
>                 URL: https://issues.apache.org/jira/browse/HBASE-16351
>             Project: HBase
>          Issue Type: Improvement
>          Components: build, dependencies
>            Reporter: Sean Busbey
>            Assignee: Mike Drob
>             Fix For: 1.4.0, 2.0.0-alpha-2
>
>         Attachments: HBASE-16351.patch
>
>
> As a stop-gap measure we've made our velocity template fail things when we 
> attempt to bundle a cat-x dependency (see HBASE-16318). Unfortunately, the 
> error messages in this case are non-obvious and digging to find the culprit 
> in a partially rendered LICENSE file leaves a lot to be desired.
> The maven enforcer plugin should allow us to fail more gracefully, with 
> output given on the maven console.



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

Reply via email to