[ https://issues.apache.org/jira/browse/MSCMPUB-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14513120#comment-14513120 ]
ASF GitHub Bot commented on MSCMPUB-19: --------------------------------------- GitHub user rkorpachyov opened a pull request: https://github.com/apache/maven-plugins/pull/51 fixed issue MSCMPUB-19 It's been quite a while since I discovered this bug, please see: https://issues.apache.org/jira/browse/MSCMPUB-19 You can merge this pull request into a Git repository by running: $ git pull https://github.com/rkorpachyov/maven-plugins MSCMPUB-19 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven-plugins/pull/51.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #51 ---- commit a240552a7ba82d5cbb71723927e9a8eda3235f8d Author: Roman Korpachyov <rkorpach...@rkorpachyov.ru> Date: 2015-02-17T16:33:04Z fixed issue MSCMPUB-19 ---- > Plugin fails to publish to SCMs whose working copies don't have any kind of > private storage > ------------------------------------------------------------------------------------------- > > Key: MSCMPUB-19 > URL: https://issues.apache.org/jira/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}} goal 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.3.4#6332)