在 Windows Jenkins 从属服务器上,如何解决"No plugin found for prefix 'http' in the current project and in the



从昨天开始,我的构建由于那个极其奇怪的错误而中断。

当我使用那个特定的jenkins slave启动一个特定的构建时,就会发生这种情况。

当我直接在那台机器上启动这个构建时(也就是说直接使用maven),它可以毫无问题地工作。

当我通过Jenkins在这个slave上启动另一个构建时,它也能正常工作。

为了记录在案,我已经使用-X标志启动了构建,以便更好地了解发生了什么,下面是正在编写的日志的一部分

[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (C:Documents and Settingsndx.m2repository)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (C:Documents and Settingsndx.m2repository)
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://evgeny-goldin.org/artifactory/repo/
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for https://oss.sonatype.org/content/repositories/releases/
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repository.sonatype.org/content/groups/flexgroup/
Downloading: http://evgeny-goldin.org/artifactory/repo/org/apache/maven/plugins/maven-metadata.xml
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/
Downloading: https://oss.sonatype.org/content/repositories/releases/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repository.sonatype.org/content/groups/flexgroup/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/org/apache/maven/plugins/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgapachemavenpluginsresolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/releases
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/releases/org/apache/maven/plugins/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgapachemavenpluginsresolver-status.properties
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgapachemavenpluginsresolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots/org/apache/maven/plugins/maven-metadata.xml
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo.maven.apache.org/maven2
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded: http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots/org/apache/maven/plugins/maven-metadata.xml (225 B at 3.5 KB/sec)
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgapachemavenpluginsresolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repository.sonatype.org/content/groups/flexgroup/
Downloading: http://repository.sonatype.org/content/groups/flexgroup/org/codehaus/mojo/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 200.4 KB/sec)
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgapachemavenpluginsresolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/org/codehaus/mojo/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgcodehausmojoresolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://evgeny-goldin.org/artifactory/repo/
Downloading: http://evgeny-goldin.org/artifactory/repo/org/codehaus/mojo/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgcodehausmojoresolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for https://oss.sonatype.org/content/repositories/releases/
Downloading: https://oss.sonatype.org/content/repositories/releases/org/codehaus/mojo/maven-metadata.xml
Downloaded: http://repository.sonatype.org/content/groups/flexgroup/org/apache/maven/plugins/maven-metadata.xml (228 B at 0.5 KB/sec)
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgapachemavenpluginsresolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/releases
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/releases/org/codehaus/mojo/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgcodehausmojoresolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots/org/codehaus/mojo/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgcodehausmojoresolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo.maven.apache.org/maven2
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (22 KB at 463.4 KB/sec)
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgcodehausmojoresolver-status.properties
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgcodehausmojoresolver-status.properties
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgapachemavenpluginsresolver-status.properties
[DEBUG] Writing resolution tracking file C:Documents and Settingsndx.m2repositoryorgcodehausmojoresolver-status.properties
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in 3rd-party-nexys (http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/)
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in evgenygoldin (http://evgeny-goldin.org/artifactory/repo/)
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in sonatype-oss (https://oss.sonatype.org/content/repositories/releases/)
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in nexus-releases (http://nexus.server.name.hidden:8080/nexus/content/repositories/releases)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in sonatype-flexmojos (http://repository.sonatype.org/content/groups/flexgroup/)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in 3rd-party-nexys (http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in evgenygoldin (http://evgeny-goldin.org/artifactory/repo/)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in sonatype-oss (https://oss.sonatype.org/content/repositories/releases/)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in nexus-releases (http://nexus.server.name.hidden:8080/nexus/content/repositories/releases)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in nexus-snapshots (http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots)
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (C:Documents and Settingsndx.m2repository)
[DEBUG] Skipped remote update check for org.apache.maven.plugins/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.apache.maven.plugins/maven-metadata.xml in http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/ was cached in the local repository, resolution will not be reattempted until the update interval of 3rd-party-nexys has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.apache.maven.plugins/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.apache.maven.plugins/maven-metadata.xml in http://evgeny-goldin.org/artifactory/repo/ was cached in the local repository, resolution will not be reattempted until the update interval of evgenygoldin has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.apache.maven.plugins/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.apache.maven.plugins/maven-metadata.xml in https://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-oss has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.apache.maven.plugins/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.apache.maven.plugins/maven-metadata.xml in http://nexus.server.name.hidden:8080/nexus/content/repositories/releases was cached in the local repository, resolution will not be reattempted until the update interval of nexus-releases has elapsed or updates are forced
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (C:Documents and Settingsndx.m2repository)
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in http://repository.sonatype.org/content/groups/flexgroup/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-flexmojos has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/ was cached in the local repository, resolution will not be reattempted until the update interval of 3rd-party-nexys has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in http://evgeny-goldin.org/artifactory/repo/ was cached in the local repository, resolution will not be reattempted until the update interval of evgenygoldin has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in https://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-oss has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in http://nexus.server.name.hidden:8080/nexus/content/repositories/releases was cached in the local repository, resolution will not be reattempted until the update interval of nexus-releases has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of nexus-snapshots has elapsed or updates are forced
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.703s
[INFO] Finished at: Thu Jan 16 09:11:56 CET 2014
[INFO] Final Memory: 21M/52M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'http' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:Documents and Settingsndx.m2repository), sonatype-flexmojos (http://repository.sonatype.org/content/groups/flexgroup/), 3rd-party-nexys (http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/), evgenygoldin (http://evgeny-goldin.org/artifactory/repo/), sonatype-oss (https://oss.sonatype.org/content/repositories/releases/), nexus-releases (http://nexus.server.name.hidden:8080/nexus/content/repositories/releases), nexus-snapshots (http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'http' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:Documents and Settingsndx.m2repository), sonatype-flexmojos (http://repository.sonatype.org/content/groups/flexgroup/), 3rd-party-nexys (http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/), evgenygoldin (http://evgeny-goldin.org/artifactory/repo/), sonatype-oss (https://oss.sonatype.org/content/repositories/releases/), nexus-releases (http://nexus.server.name.hidden:8080/nexus/content/repositories/releases), nexus-snapshots (http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots), central (http://repo.maven.apache.org/maven2)]
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:94)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:262)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:222)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:98)
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)
[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/NoPluginFoundForPrefixException
Build step 'Invoquer les cibles Maven de haut niveau' marked build as failure

最后一个堆栈跟踪让我特别困惑

org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'http' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:Documents and Settingsndx.m2repository), sonatype-flexmojos (http://repository.sonatype.org/content/groups/flexgroup/), 3rd-party-nexys (http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/), evgenygoldin (http://evgeny-goldin.org/artifactory/repo/), sonatype-oss (https://oss.sonatype.org/content/repositories/releases/), nexus-releases (http://nexus.server.name.hidden:8080/nexus/content/repositories/releases), nexus-snapshots (http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots), central (http://repo.maven.apache.org/maven2)]
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:94)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:262)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:222)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:98)
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)

由于我没有运行任何以"http"为前缀的命令:发送到slave的mvn命令是mvn.bat -Dos=windows -DSVN_REVISION=7436 -Dsdk=indesign-sdk -DSVN_URL=http://svn.branc.name.hidden "-Dintegration=jenkins -Djava.awt.headless=true" clean deploy -pl :project.name.hidden -am -U -X

EDIT 1我终于放弃了简单的文档阅读,加入了直接代码分析的潮流。这股潮流让我在远程调试模式下运行maven(感谢那篇文章提供了完整的环境变量),这反过来又让我选择了方法MojoDescriptorCreator#getMojoDescriptor。maven 3.0.4的摘录复制到下方

public MojoDescriptor getMojoDescriptor( String task, MavenSession session, MavenProject project )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
PluginVersionResolutionException
{
String goal = null;
Plugin plugin = null;
StringTokenizer tok = new StringTokenizer( task, ":" );
int numTokens = tok.countTokens();
if ( numTokens >= 4 )
{
// We have everything that we need
//
// org.apache.maven.plugins:maven-remote-resources-plugin:1.0:process
//
// groupId
// artifactId
// version
// goal
//
plugin = new Plugin();
plugin.setGroupId( tok.nextToken() );
plugin.setArtifactId( tok.nextToken() );
plugin.setVersion( tok.nextToken() );
goal = tok.nextToken();
// This won't be valid, but it constructs something easy to read in the error message
while ( tok.hasMoreTokens() )
{
goal += ":" + tok.nextToken();
}
}
else if ( numTokens == 3 )
{
// We have everything that we need except the version
//
// org.apache.maven.plugins:maven-remote-resources-plugin:???:process
//
// groupId
// artifactId
// ???
// goal
//
plugin = new Plugin();
plugin.setGroupId( tok.nextToken() );
plugin.setArtifactId( tok.nextToken() );
goal = tok.nextToken();
}
else if ( numTokens <= 2 )
{
// We have a prefix and goal
//
// idea:idea
//
String prefix = tok.nextToken();
if ( numTokens == 2 )
{
goal = tok.nextToken();
}
else
{
// goal was missing - pass through to MojoNotFoundException
goal = "";
}
// This is the case where someone has executed a single goal from the command line
// of the form:
//
// mvn remote-resources:process
//
// From the metadata stored on the server which has been created as part of a standard
// Maven plugin deployment we will find the right PluginDescriptor from the remote
// repository.
plugin = findPluginForPrefix( prefix, session );
}
injectPluginDeclarationFromProject( plugin, project );
// If there is no version to be found then we need to look in the repository metadata for
// this plugin and see what's specified as the latest release.
//
if ( plugin.getVersion() == null )
{
resolvePluginVersion( plugin, session, project );
}
return pluginManager.getMojoDescriptor( plugin, goal, project.getRemotePluginRepositories(),
session.getRepositorySession() );
}

根据调试器会话,当这个方法被调用时,numToken是2,这将导致我进入第222行,在那里,正如它所写的,下面的代码被称为

plugin = findPluginForPrefix( prefix, session );

其中CCD_ 3是CCD_。换句话说,maven将-DSVN_URL=http://svn.branc.name.hidden命令行参数视为目标调用。。。什么鬼东西?

让我们往上走一点。

第一个被调用的calss是org.codehaus.plexus.classworlds.launcher.Launcher,该主方法被赋予以下参数数组(多亏了Eclipse调试器):

args    java.lang.String[19]  (id=6596) 
[0] "-Dos" (id=6597)    
[1] "windows" (id=6598) 
[2] "-DSVN_REVISION" (id=6599)  
[3] "7436" (id=6600)    
[4] "-Dsdk" (id=6601)   
[5] "indesign-sdk" (id=6602)    
[6] "-DSVN_URL" (id=6610)   
[7] "http://svn.branc.name.hidden" (id=6583)    
[8] "-Djava.awt.headless" (id=6611) 
[9] "true" (id=6612)    
[10]    "-Dintegration" (id=6613)   
[11]    "jenkins" (id=6614) 
[12]    "clean" (id=6615)   
[13]    "deploy" (id=6621)  
[14]    "-pl" (id=6622) 
[15]    ":project.name.hidden" (id=6623)    
[16]    "-am" (id=6624) 
[17]    "-U" (id=6625)  
[18]    "-X" (id=6627)  

因此,JVM对mavenJAR的第一个调用似乎会拆分各种-D,这些CCD_8(根据这个Stackoverflow的答案)应该被设置为系统属性。我现在完全困惑了。我该怎么办?

EDIT 2用于启动Java的命令行是(多亏了Process Explorer)C:Program FilesJavajdk1.6.0_37binjava.exe" -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -classpath "C:Program FilesNpackdMaven-3.0.5bootplexus-classworlds-2.4.jar" "-Dclassworlds.conf=C:Program FilesNpackdMaven-3.0.5binm2.conf" "-Dmaven.home=C:Program FilesNpackdMaven-3.0.5" org.codehaus.plexus.classworlds.launcher.Launcher -Dos windows -DSVN_REVISION 7436 -Dsdk indesign-sdk -DSVN_URL http://achille.perigee.fr/svn16/autocat/autocat-java/branches/1.3.0 -Djava.awt.headless true -Dintegration jenkins clean deploy -pl :project.name.hidden -am -U -X等等,我的=在哪里?嗯,我想我在那里有一条很好的路!

看起来这实际上是Jenkins/Windows最令人惊讶的不匹配之一。

事实上,这更多是由于Windows cmd.exe的不良行为。。。

我通过更改标签来解决这个问题,我必须只使用一个标签,这使命令行足够短,不会删除=字符。与其说是真正的解决方案,不如说是一个变通方法,但它确实有效。

相关内容

最新更新