You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Roman Korpachyov (JIRA)" <ji...@codehaus.org> on 2015/02/17 17:26:18 UTC

[jira] (MSCMPUB-19) Plugin fails to publish to SCMs whose working copies don't have any kind of private storage

Roman Korpachyov created MSCMPUB-19:
---------------------------------------

             Summary: Plugin fails to publish to SCMs whose working copies don't have any kind of private storage
                 Key: MSCMPUB-19
                 URL: https://jira.codehaus.org/browse/MSCMPUB-19
             Project: Maven SCM Publish Plugin
          Issue Type: Bug
    Affects Versions: 1.1
            Reporter: Roman Korpachyov


I've discovered this problem when tried to use the plugin to check files in to StarTeam server. Running {{scm-publish:publish-scm}} resulted in following message:
{code:title=mvn scm-publish:publish-scm}
[INFO] --- maven-scm-publish-plugin:1.1:publish-scm (default-cli) @ starteam-checkin ---
[WARNING] No output encoding, defaulting to UTF-8.
[INFO] Checking out the pub tree from scm:starteam:<server>:<port>:/<path>/ into ${basedir}\target\scmpublish-checkout
[INFO] Working directory: ${basedir}\target\scmpublish-checkout
[INFO] Command line: cmd.exe /X /C "stcmd co -x -nologo -stop -p "<user>@<server>:<port>/<path>/" -fp ${basedir}/target/scmpublish-checkout -is -eol on"
[INFO] Checked out: ./dummy.txt
[INFO] Updating checkout directory with actual content in ${basedir}\dist
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-publish-plugin:1.1:publish-scm (default-cli) on project starteam-checkin: Execution default-cli of goal org.apache.maven.plugins:maven-scm-publish-plugin:1.1:publish-scm failed: The wildcard must not be null -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-scm-publish-plugin:1.1
:publish-scm (default-cli) on project starteam-checkin: Execution default-cli of goal org.apache.maven.plugins:maven-scm-publish-plugin:1.1:publish-scm failed: The wildcard must not be null
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
        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:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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.PluginExecutionException: Execution default-cli of goal org.apache.maven.plugins:maven-scm-publish-plugin:1.1:publish-scm failed: The wildcard must not be null
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.lang.IllegalArgumentException: The wildcard must not be null
        at org.apache.commons.io.filefilter.NameFileFilter.<init>(NameFileFilter.java:75)
        at org.apache.commons.io.filefilter.NameFileFilter.<init>(NameFileFilter.java:63)
        at org.apache.maven.plugins.scmpublish.ScmPublishPublishScmMojo.update(ScmPublishPublishScmMojo.java:92)
        at org.apache.maven.plugins.scmpublish.ScmPublishPublishScmMojo.scmPublishExecute(ScmPublishPublishScmMojo.java:248)
        at org.apache.maven.plugins.scmpublish.AbstractScmPublishMojo.execute(AbstractScmPublishMojo.java:572)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        ... 20 more
{code}

As it turns out, when plugin determines differences between content to be published and current SCM content, it explicitly excludes private SCM directory (such as {{.hg}}, {{.git}}, {{.svn}}, etc.) from processing, so it asks for its name by calling {{scmProvider.getScmSpecificFilename()}}, which returns {{null}} in this case, as there's no such thing in StarTeam:
{code:title=ScmPublishPublishScmMojo.java}
    private void update( File checkout, File dir, List<String> doNotDeleteDirs )
        throws IOException
    {
        String[] files =
            checkout.list( new NotFileFilter( new NameFileFilter( scmProvider.getScmSpecificFilename() ) ) );
{code}
So {{org.apache.commons.io.filefilter.NameFileFilter}} then throws {{IllegalArgumentException}} and Maven build fails.

Apparently, this bug affects operations not only on StarTeam but on any SCM that doesn't have a notion of private directory in working copy.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)