Sculptor - M2 Plugins: Checksum Plugin should ignore non-existent directories

瀏覽次數:32 次
跳到第一則未讀訊息

Torsten Juergeleit

未讀,
2011年7月18日 上午9:32:552011/7/18
收件者:fornax-...@googlegroups.com
The Checksum Maven Plugin insists of checking all directories specified in "checksumDirs".  If one of these directories isn't available (maybe because the project is created from scratch manually and consists initially only of "src/main/resources/") then the plugin aborts as shown in the following console log:


INFO] --- fornax-checksum-m2-plugin:1.0.0:run (after generate) @ interface ---
[DEBUG] Configuring mojo org.fornax.toolsupport:fornax-checksum-m2-plugin:1.0.0:run from plugin realm ClassRealm[plugin>org.fornax.toolsupport:fornax-checksum-m2-plugin:1.0.0, parent: sun.misc.Launcher$AppClassLoader@11b86e7]
[DEBUG] Configuring mojo 'org.fornax.toolsupport:fornax-checksum-m2-plugin:1.0.0:run' with basic configurator -->
[DEBUG]   (f) action = after-generate
[DEBUG]   (f) checksumAlgorithm = SHA-1
[DEBUG]   (f) checksumDirs = src/main/java,src/main/resources,src/test/java,src/test/resources
[DEBUG]   (f) checksumFile = .checksum.txt
[DEBUG]   (f) ignoreChecksumFile = .ignore-checksum.txt
[DEBUG]   (f) ignoreDirectories = .svn
[DEBUG]   (s) project = MavenProject: de.deka.vk.base:interface:11.2.0-SNAPSHOT @ C:\DriveD\vk\relaunch-domain\base\interface\pom.xml
[DEBUG] -- end configuration --
[INFO] Ignoring directories: [.svn]
[INFO] ChecksumValidator: GENERATE CHECKSUMS
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.921s
[INFO] Finished at: Mon Jul 18 15:22:22 CEST 2011
[INFO] Final Memory: 4M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.fornax.toolsupport:fornax-checksum-m2-plugin:1.0.0:run (after generate) on project interface: Can't checksum file: src\main\java -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.fornax.toolsupport:fornax-checksum-m2-plugin:1.0.0:run (after generate) on project interface: Can't checksum file: src\main\java
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        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:319)
        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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can't checksum file: src\main\java
        at org.fornax.toolsupport.ChecksumValidatorMojo.makeRecursiveChecksums(ChecksumValidatorMojo.java:319)
        at org.fornax.toolsupport.ChecksumValidatorMojo.generate(ChecksumValidatorMojo.java:281)
        at org.fornax.toolsupport.ChecksumValidatorMojo.execute(ChecksumValidatorMojo.java:138)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 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


Here it would be helpful if the checksum silently ignores these non-existent folders and continues checking the other folders.

/Torsten

Pavel Tavoda

未讀,
2011年7月18日 下午5:02:012011/7/18
收件者:Fornax-Platform
You can define set of directories by -D or by specifying parameter in
pom.xml. Parameter name is "checksumDirs" and default value is "src/
main/java,src/main/resources,src/test/java,src/test/resources".

Regards

Pavel

Torsten Juergeleit

未讀,
2011年7月18日 下午5:29:052011/7/18
收件者:fornax-...@googlegroups.com
Yes, one could redefine the set of checked directories in every single project which differs from the standard set of directories checked by the checksum plugin, e.g. one without test code.
Why not letting the checksum plugin skip non-existent directories? From my point of view the plugin should log a warning of skipping defined but non-existent directories but it must not abort the build.

/Torsten
回覆所有人
回覆作者
轉寄
0 則新訊息