Travis created Bug MOJO-1980
Issue Type: Bug Bug
Affects Versions: extra-enforcer-rules-1.0-beta-1
Assignee: Unassigned
Components: extra-enforcer-rules
Created: 23/Sep/13 10:47 AM
Description:

We have a situation where someone tries to build our project but have corrupted files in their maven repo. In these case the EnforceBytecodeVersion.isBadArtifact(Artifact a) method throws an assertion like:

assert read != 8;

It would be nice if this assertion contained a message such that it was easier to find the bad jar. The aforementioned assertion could just be changed to:

assert read != 8 : "The file: " + f + " is corrupt or invalid";

This would then be more explicit that the build isn't broken but the person's local environment is bad in some way.

The following is a stacktrace that represents this issue in our project.

Exception in thread "main" java.lang.AssertionError
       at org.apache.maven.plugins.enforcer.EnforceBytecodeVersion.isBadArtifact(EnforceBytecodeVersion.java:195)
       at org.apache.maven.plugins.enforcer.EnforceBytecodeVersion.checkDependencies(EnforceBytecodeVersion.java:161)
       at org.apache.maven.plugins.enforcer.EnforceBytecodeVersion.handleArtifacts(EnforceBytecodeVersion.java:94)
       at org.apache.maven.plugins.enforcer.AbstractResolveDependencies.execute(AbstractResolveDependencies.java:77)
       at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:177)
       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
       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.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
       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:84)
       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
       at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
       at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
       at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Project: Mojo
Priority: Minor Minor
Reporter: Travis
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to