簡體   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