2012-04-11 8 views
3

Ich versuche, Maven zu verwenden, um meine Javadocs (die erfolgreich erstellt wurden) auf einem Sharepoint-Server bereitzustellen, der NTLM-Authentifizierung erfordert. Ich benutze das Maven Wagon-Plugin mit dem WebDAV-Provider, um dies zu tun. Ich verwende m2eclipse, um eine Laufkonfiguration einzurichten, um Ziele innerhalb eines bestimmten Profils auszuführen.Bereitstellen von Javadocs über den Maven Wagon WebDAV-Provider an einen NTLM-authentifizierten Server

Ich habe im Wesentlichen eine Lösung aus verschiedenen Lösungen zusammengestellt, die ich in Bezug auf diese Tools gefunden habe. Es klingt so, als ob NTLM derzeit überhaupt nicht mit Maven unterstützt wird, aber andere Seiten haben vorgeschlagen, dass das Tag dies zulässt. Ich habe auch Lösungen gesehen, bei denen die Deployment-Site in der Distributionsverwaltung angegeben ist, im Gegensatz zur Apache-Verwendungsseite dafür. Jedenfalls habe ich eine Reihe von Problemen.

Zunächst einmal, wenn ich aus dem Lauf-Konfigurationsmenü (das "sauber" und "Paket" innerhalb der "Release" -Profil ausführt) ausführen, das Wagon-Plugin, das eine Ausführung des Ziels "Wagon: Upload" enthält In der Phase 'Paket' wird die Ausführung ignoriert. Es erstellt das Projekt-Jar und die Javadocs und fügt die Quellen an, aber das Wagon-Plugin wird nicht ausgeführt.

Ich habe auch versucht, die ‚Wagen: upload‘ laufen Ziel auf seine eigene, sobald die Javadocs separat erstellt wurden, aber ich begegnet diesen Fehler (in debug):

[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 

Ich weiß, dass es eine ist geladene Frage, aber hat jemand irgendwelche Ratschläge oder Vorschläge, die mir auf meinem Weg helfen könnten?

Hier ist meine POM-Datei:

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

Hoffentlich hat es verstanden, was trotz der Tatsache vor sich geht, dass ich unternehmensbezogenen Websites zu zensieren hatte. Darüber hinaus habe ich Proxy und Server-Konfigurationen zu settings.xml, wie folgt:

<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:

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

Vielen Dank.

Antwort

0

Ihre URL sollte so aussehen: <url>dav:http://...</url>.

Zuerst beta-4 ausprobieren und dann per Befehl wie -Dwagon.url = setzen. Wenn es immer noch nicht funktioniert, müssen Sie ein Ticket bei Codehaus JIRA einreichen. Die source code scheint in Ordnung. Dies ist ein Injektionsproblem. Kannst du eine andere Maven-Version ausprobieren?

+0

Danke. Ich habe das korrigiert, aber es gibt immer noch den gleichen Fehler. –

+0

Probieren Sie das Debug-Flag '-X'! –

+0

Bearbeitete die Frage, um Debug-Details aufzunehmen, aber es deutet mich nicht in einer ganzen Menge an. –

Verwandte Themen