2012-04-11 16 views
3

我試圖使用Maven將我的Javadoc(已成功創建)部署到需要NTLM身份驗證的Sharepoint服務器。我正在使用Maven Wagon插件和WebDAV提供程序來執行此操作。我正在使用m2eclipse來設置一個運行配置來執行特定配置文件中的目標。通過Maven Wagon WebDAV提供程序部署Javadoc到NTLM認證服務器

我基本上把我從這些工具中找到的各種解決方案拼湊在一起。聽起來好像NTLM目前對Maven可能根本不支持,但其他頁面已經建議標籤可以允許這樣做。我也看到了配置管理中指定部署站點的解決方案,與Apache的使用頁面相反。無論如何,我遇到了一些問題。首先,當我從運行配置菜單(它在「發佈」配置文件中執行'clean'和'package')運行時,Wagon插件包含執行'wagon:upload'目標在'包'階段,執行被忽略。它創建項目jar和Javadocs,並附加源代碼,但Wagon插件不執行。

我也嘗試運行「馬車:上傳」曾經的Javadoc已單獨創建目標對自己,但我遇到這個錯誤(調試):

[DEBUG] Configuring mojo org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload 
from plugin realm ClassRealm[plugin>org.codehaus.mojo:wagon-maven-plugin:1.0-bet 
a-3, parent: [email protected]] 
[DEBUG] Configuring mojo 'org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload 
' with basic configurator --> 
[DEBUG] (f) followSymLink = false 
[DEBUG] (f) fromDir = C:\Documents and Settings\c40208\IBM\rationalsdp\CEC\cec 
-diagnostics 
[DEBUG] (f) optimize = false 
[DEBUG] (f) project = MavenProject: com.mycompany.cec:cec-diagnostics:0.5.0-SNAPSH 
OT @ C:\Documents and Settings\c40208\IBM\rationalsdp\CEC\cec-diagnostics\pom.xm 
l 
[DEBUG] (f) serverId = serverId 
[DEBUG] (f) settings = [email protected] 
[DEBUG] (f) skip = false 
[DEBUG] (f) useDefaultExcludes = true 
[DEBUG] -- end configuration -- 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 1.687s 
[INFO] Finished at: Fri Apr 13 08:54:34 EDT 2012 
[INFO] Final Memory: 5M/15M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:u 
pload (default-cli) on project cec-diagnostics: The parameters 'url' for goal or 
g.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload are missing or invalid -> [ 
Help 1] 
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o 
rg.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload (default-cli) on project c 
ec-diagnostics: The parameters 'url' for goal org.codehaus.mojo:wagon-maven-plug 
in:1.0-beta-3:upload are missing or invalid 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor 
.java:221) 
     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.buildProje 
ct(LifecycleModuleBuilder.java:84) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje 
ct(LifecycleModuleBuilder.java:59) 
     at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu 
ild(LifecycleStarter.java:183) 
     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl 
eStarter.java:161) 
     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(DelegatingMethodAcces 
sorImpl.java:25) 
     at java.lang.reflect.Method.invoke(Method.java:597) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun 
cher.java:290) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav 
a:230) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La 
uncher.java:409) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java: 
352) 
Caused by: org.apache.maven.plugin.PluginParameterException: The parameters 'url 
' for goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload are missing or 
invalid 
     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePl 
uginFields(DefaultMavenPluginManager.java:576) 
     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfigu 
redMojo(DefaultMavenPluginManager.java:529) 
     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default 
BuildPluginManager.java:92) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor 
.java:209) 
     ... 19 more 
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please rea 
d the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParamete 
rException 

我知道這是一個加載的問題,但沒有人有任何意見或建議,可能會幫助我一路?

這是我的POM文件:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
<modelVersion>4.0.0</modelVersion> 
<groupId>com.mycompany.cec</groupId> 
<artifactId>cec-diagnostics</artifactId> 
<version>0.5.0-SNAPSHOT</version> 
<packaging>jar</packaging> 
<name>CEC Diagnostics Jar</name> 
<description><![CDATA[Assertion capture and analysis library for Java]]]></description> 
<inceptionYear>2011</inceptionYear> 
<scm> 
    <developerConnection>scm:svn:(FQDN)/(path)</developerConnection> 
    <url>(FQDN)/(path)</url> 
</scm> 
<properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    <spring.framework.version>3.0.5.RELEASE</spring.framework.version> 
    <jar.plugin.version>2.4</jar.plugin.version> 
    <bundle.plugin.version>2.3.6</bundle.plugin.version> 
    <surefire.plugin.version>2.12</surefire.plugin.version> 
    <testng.version>6.3.1</testng.version> 
    <javadoc.plugin.version>2.8.1</javadoc.plugin.version> 
    <source.plugin.version>2.1.2</source.plugin.version> 
    <wagon.plugin.version>1.0-beta-3</wagon.plugin.version> 
    <project.info.reports.plugin.version>2.4</project.info.reports.plugin.version> 
    <site.plugin.version>3.0</site.plugin.version> 
    <pdf.plugin.version>1.2</pdf.plugin.version> 
    <confluence.plugin.version>3.1.3</confluence.plugin.version> 
    <confluence.root>http://confluence.sys.mycompany.com/confluence</confluence.root> 
    <confluence.space>SEI</confluence.space> 
</properties> 
<dependencies> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-core</artifactId> 
     <version>${spring.framework.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-context</artifactId> 
     <version>${spring.framework.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-context-support</artifactId> 
     <version>${spring.framework.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.testng</groupId> 
     <artifactId>testng</artifactId> 
     <version>${testng.version}</version> 
    </dependency> 
</dependencies> 
<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-jar-plugin</artifactId> 
      <version>${jar.plugin.version}</version> 
      <configuration> 
       <archive> 
        <index>true</index> 
        <manifest> 
         <addClasspath>true</addClasspath> 
        </manifest> 
        <manifestEntries> 
         <Specification-Title>${project.name}</Specification-Title> 
         <Specification-Version>${project.version}</Specification-Version> 
         <Specification-Vendor>${project.organization.name}</Specification-Vendor> 
         <Implementation-Title>${project.name}</Implementation-Title> 
         <Implementation-Version>${project.version}</Implementation-Version> 
        </manifestEntries> 
       </archive> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.felix</groupId> 
      <artifactId>maven-bundle-plugin</artifactId> 
      <version>${bundle.plugin.version}</version> 
      <executions> 
       <execution> 
        <id>bundle-manifest</id> 
        <phase>process-classes</phase> 
        <goals> 
         <goal>manifest</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
    </plugins> 
    <extensions> 
     <extension> 
      <groupId>org.apache.maven.wagon</groupId> 
      <artifactId>wagon-webdav-jackrabbit</artifactId> 
      <version>2.2</version> 
     </extension> 
    </extensions> 
</build> 
<profiles> 
    <profile> 
     <id>release</id> 
     <build> 
      <plugins> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-javadoc-plugin</artifactId> 
        <version>${javadoc.plugin.version}</version> 
        <executions> 
         <execution> 
          <id>attach-javadocs</id> 
          <goals> 
           <goal>jar</goal> 
          </goals> 
         </execution> 
        </executions> 
        <configuration> 
         <additionalJOption>-J-Dhttp.auth.ntlm.domain=dav:https//(domain)</additionalJOption> 
        </configuration> 
       </plugin> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-source-plugin</artifactId> 
        <version>${source.plugin.version}</version> 
        <executions> 
         <execution> 
          <id>attach-sources</id> 
          <goals> 
           <goal>jar-no-fork</goal> 
          </goals> 
         </execution> 
        </executions> 
       </plugin> 
       <plugin> 
        <groupId>org.codehaus.mojo</groupId> 
        <artifactId>wagon-maven-plugin</artifactId> 
        <version>${wagon.plugin.version}</version> 
        <executions> 
         <execution> 
          <id>upload-javadocs</id> 
          <phase>package</phase> 
          <goals> 
           <goal>upload</goal> 
          </goals> 
          <configuration> 
           <serverId>(serverId)</serverId> 
           <fromDir>${project.build.directory}/apidocs</fromDir> 
           <includes>*</includes> 
           <excludes>pom.xml</excludes> 
           <url>dav:https://(domain)/(path)</url> 
           <toDir>(path)</toDir> 
           <optimize>true</optimize> 
          </configuration> 
         </execution> 
        </executions> 
       </plugin> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-site-plugin</artifactId> 
        <version>${site.plugin.version}</version> 
       </plugin> 
      </plugins> 
     </build> 
    </profile> 
</profiles> 
<reporting> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-project-info-reports-plugin</artifactId> 
      <version>${project.info.reports.plugin.version}</version> 
      <reportSets> 
       <reportSet> 
        <reports> 
         <report>summary</report> 
         <report>project-team</report> 
         <report>plugins</report> 
         <report>dependencies</report> 
         <report>scm</report> 
         <report>cim</report> 
         <report>issue-tracking</report> 
        </reports> 
       </reportSet> 
      </reportSets> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-javadoc-plugin</artifactId> 
      <version>${javadoc.plugin.version}</version> 
      <configuration> 
       <show>public</show> 
      </configuration> 
     </plugin> 
    </plugins> 
</reporting> 
<repositories> 
    (repositories) 
</repositories> 
<distributionManagement> 
    (repositories) 
</distributionManagement> 
<developers> 
    (developers) 
</developers> 
</project> 

希望它理解儘管我不得不審查公司相關的網站發生了什麼事情。此外,我添加的代理和服務器的配置,以settings.xml中,如下所示:

<proxy> 
    <active>true</active> 
    <protocol>https</protocol> 
    <host>(host address)</host> 
    <port>9090</port> 
    <username>(username)</username> 
    <password>(password)</password> 
    <nonProxyHosts>*.mycompany.com</nonProxyHosts> 
</proxy> 

服務器:

<server> 
    <id>(the same serverId from the POM)</id> 
    <username>(username)</username> 
    <password>(password)</password> 
</server> 

非常感謝。

回答

0

你的URL應該看起來像這樣<url>dav:http://...</url>

首先嚐試beta-4,然後像每個命令一樣設置-Dwagon.url =。如果它仍然不起作用,你必須在Codehaus的JIRA上提交一張票。 source code似乎很好。這是一個注射問題。你可以嘗試另一個Maven版本嗎?

+0

謝謝。我糾正了這一點,但它仍然會拋出同樣的錯誤。 – 2012-04-12 12:29:59

+0

嘗試調試標誌'-X'! – 2012-04-12 18:59:51

+0

編輯了這個問題以包含調試細節,但它並不能爲我提供很多幫助。 – 2012-04-13 16:53:46

相關問題