繁体   English   中英

在Windows Jenkins从站上,如何解决“在当前项目和插件组中未找到前缀为'http'的插件”?

[英]On a windows Jenkins slave, how can I solve “No plugin found for prefix 'http' in the current project and in the plugin groups”?

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

当我使用特定的詹金斯奴隶启动一个特定的构建时,就会发生这种情况。

当我直接在该机器上启动该非常好的构建时(也就是说直接使用maven),它可以正常工作。

当我通过詹金斯在此奴隶上启动另一个构建时,它也可以正常工作。

作为记录,我使用-X标志启动了构建,以更好地了解发生了什么,这是正在写入的日志的一部分

[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (C:\Documents and Settings\ndx\.m2\repository)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (C:\Documents and Settings\ndx\.m2\repository)
[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 Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-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 Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-status.properties
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-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 Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-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 Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-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 Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-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 Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-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 Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-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 Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-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 Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-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 Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-status.properties
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-status.properties
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-status.properties
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-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 Settings\ndx\.m2\repository)
[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 Settings\ndx\.m2\repository)
[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 Settings\ndx\.m2\repository), 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 Settings\ndx\.m2\repository), 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 Settings\ndx\.m2\repository), 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)

由于我没有运行任何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 “ http”前缀的命令:发送给从属设备的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

编辑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 );

目标(此处未使用)为//svn.branc.name.hidden时,其prefixhttp 换句话说,maven将-DSVN_URL=http://svn.branc.name.hidden命令行参数视为目标调用。

让我们往上走一点。

首先被调用的是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对maven JAR的第一个调用将各种-D拆分(根据此Stackoverflow答案 ),应该将其设置为系统属性。 我现在完全不解。 我该怎么解决?

编辑2用于启动Java的非常命令行是(由于Process ExplorerC:\\Program Files\\Java\\jdk1.6.0_37\\bin\\java.exe" -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -classpath "C:\\Program Files\\Npackd\\Maven-3.0.5\\boot\\plexus-classworlds-2.4.jar" "-Dclassworlds.conf=C:\\Program Files\\Npackd\\Maven-3.0.5\\bin\\m2.conf" "-Dmaven.home=C:\\Program Files\\Npackd\\Maven-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的不良行为造成的。

我通过更改标签来解决此问题,我只需要使用一个标签,这样可以使命令行足够短以至于不能删除=字符。 比真正的解决方案更多的是变通办法,但是,它确实有效。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM