title: Deploying Javadocs via the Maven Wagon WebDAV provider to an NTLM-authenticated server
body: <p>I'm attempting to use Maven to deploy my Javadocs (which are created successfully) to a Sharepoint server, which requires NTLM authentication.  I'm using the Maven Wagon plugin with the WebDAV provider to do this.  I am using m2eclipse to set up a run configuration to execute goals within a specific profile.</p>
  
  <p>I've essentially pieced together a solution from various solutions I've found regarding these tools.  It sounds as though NTLM may not be supported at all with Maven currently, but other pages have suggested that the  tag may allow for this.  I've also seen solutions where the deployment site is specified in distribution management, contrary to Apache's usage page for it.  At any rate, I'm encountering a number of problems.</p>
  
  <p>First of all, when I run from the run configuration menu (which executes 'clean' and 'package' within the 'release' profile), the Wagon plugin, which contains an execution of the 'wagon:upload' goal within the 'package' phase, the execution is ignored. It creates the project jar and the Javadocs, and attaches the sources, but the Wagon plugin does not execute.</p>
  
  <p>I've also attempted to run the 'wagon:upload' goal on its own once the Javadocs have been created separately, but I encounter this error (in debug):</p>
  
  <pre><code>[DEBUG] Configuring mojo org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload
  from plugin realm ClassRealm[plugin&gt;org.codehaus.mojo:wagon-maven-plugin:1.0-bet
  a-3, parent: sun.misc.Launcher$AppClassLoader@11b86e7]
  [DEBUG] Configuring mojo 'org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload
  ' with basic configurator --&gt;
  [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 = org.apache.maven.execution.SettingsAdapter@11b86c7
  [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 -&gt; [
  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
  </code></pre>
  
  <p>I know it's a loaded question, but does anyone have any advice or suggestions which might help me along my way?</p>
  
  <p>Here's my POM file:</p>
  
  <pre><code>&lt;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"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.mycompany.cec&lt;/groupId&gt;
  &lt;artifactId&gt;cec-diagnostics&lt;/artifactId&gt;
  &lt;version&gt;0.5.0-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;name&gt;CEC Diagnostics Jar&lt;/name&gt;
  &lt;description&gt;&lt;![CDATA[Assertion capture and analysis library for Java]]]&gt;&lt;/description&gt;
  &lt;inceptionYear&gt;2011&lt;/inceptionYear&gt;
  &lt;scm&gt;
      &lt;developerConnection&gt;scm:svn:(FQDN)/(path)&lt;/developerConnection&gt;
      &lt;url&gt;(FQDN)/(path)&lt;/url&gt;
  &lt;/scm&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;spring.framework.version&gt;3.0.5.RELEASE&lt;/spring.framework.version&gt;
      &lt;jar.plugin.version&gt;2.4&lt;/jar.plugin.version&gt;
      &lt;bundle.plugin.version&gt;2.3.6&lt;/bundle.plugin.version&gt;
      &lt;surefire.plugin.version&gt;2.12&lt;/surefire.plugin.version&gt;
      &lt;testng.version&gt;6.3.1&lt;/testng.version&gt;
      &lt;javadoc.plugin.version&gt;2.8.1&lt;/javadoc.plugin.version&gt;
      &lt;source.plugin.version&gt;2.1.2&lt;/source.plugin.version&gt;
      &lt;wagon.plugin.version&gt;1.0-beta-3&lt;/wagon.plugin.version&gt;
      &lt;project.info.reports.plugin.version&gt;2.4&lt;/project.info.reports.plugin.version&gt;
      &lt;site.plugin.version&gt;3.0&lt;/site.plugin.version&gt;
      &lt;pdf.plugin.version&gt;1.2&lt;/pdf.plugin.version&gt;
      &lt;confluence.plugin.version&gt;3.1.3&lt;/confluence.plugin.version&gt;
      &lt;confluence.root&gt;http://confluence.sys.mycompany.com/confluence&lt;/confluence.root&gt;
      &lt;confluence.space&gt;SEI&lt;/confluence.space&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
          &lt;version&gt;${spring.framework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;${spring.framework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
          &lt;version&gt;${spring.framework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.testng&lt;/groupId&gt;
          &lt;artifactId&gt;testng&lt;/artifactId&gt;
          &lt;version&gt;${testng.version}&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
              &lt;version&gt;${jar.plugin.version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;archive&gt;
                      &lt;index&gt;true&lt;/index&gt;
                      &lt;manifest&gt;
                          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                      &lt;/manifest&gt;
                      &lt;manifestEntries&gt;
                          &lt;Specification-Title&gt;${project.name}&lt;/Specification-Title&gt;
                          &lt;Specification-Version&gt;${project.version}&lt;/Specification-Version&gt;
                          &lt;Specification-Vendor&gt;${project.organization.name}&lt;/Specification-Vendor&gt;
                          &lt;Implementation-Title&gt;${project.name}&lt;/Implementation-Title&gt;
                          &lt;Implementation-Version&gt;${project.version}&lt;/Implementation-Version&gt;
                      &lt;/manifestEntries&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
              &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;
              &lt;version&gt;${bundle.plugin.version}&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;bundle-manifest&lt;/id&gt;
                      &lt;phase&gt;process-classes&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;manifest&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;extensions&gt;
          &lt;extension&gt;
              &lt;groupId&gt;org.apache.maven.wagon&lt;/groupId&gt;
              &lt;artifactId&gt;wagon-webdav-jackrabbit&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
          &lt;/extension&gt;
      &lt;/extensions&gt;
  &lt;/build&gt;
  &lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;release&lt;/id&gt;
          &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${javadoc.plugin.version}&lt;/version&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;id&gt;attach-javadocs&lt;/id&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;jar&lt;/goal&gt;
                              &lt;/goals&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                      &lt;configuration&gt;
                          &lt;additionalJOption&gt;-J-Dhttp.auth.ntlm.domain=dav:https//(domain)&lt;/additionalJOption&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${source.plugin.version}&lt;/version&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;id&gt;attach-sources&lt;/id&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;jar-no-fork&lt;/goal&gt;
                              &lt;/goals&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                      &lt;artifactId&gt;wagon-maven-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${wagon.plugin.version}&lt;/version&gt;
                      &lt;executions&gt;
                          &lt;execution&gt;
                              &lt;id&gt;upload-javadocs&lt;/id&gt;
                              &lt;phase&gt;package&lt;/phase&gt;
                              &lt;goals&gt;
                                  &lt;goal&gt;upload&lt;/goal&gt;
                              &lt;/goals&gt;
                              &lt;configuration&gt;
                                  &lt;serverId&gt;(serverId)&lt;/serverId&gt;
                                  &lt;fromDir&gt;${project.build.directory}/apidocs&lt;/fromDir&gt;
                                  &lt;includes&gt;*&lt;/includes&gt;
                                  &lt;excludes&gt;pom.xml&lt;/excludes&gt;
                                  &lt;url&gt;dav:https://(domain)/(path)&lt;/url&gt;
                                  &lt;toDir&gt;(path)&lt;/toDir&gt;
                                  &lt;optimize&gt;true&lt;/optimize&gt;
                              &lt;/configuration&gt;
                          &lt;/execution&gt;
                      &lt;/executions&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${site.plugin.version}&lt;/version&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  &lt;reporting&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-project-info-reports-plugin&lt;/artifactId&gt;
              &lt;version&gt;${project.info.reports.plugin.version}&lt;/version&gt;
              &lt;reportSets&gt;
                  &lt;reportSet&gt;
                      &lt;reports&gt;
                          &lt;report&gt;summary&lt;/report&gt;
                          &lt;report&gt;project-team&lt;/report&gt;
                          &lt;report&gt;plugins&lt;/report&gt;
                          &lt;report&gt;dependencies&lt;/report&gt;
                          &lt;report&gt;scm&lt;/report&gt;
                          &lt;report&gt;cim&lt;/report&gt;
                          &lt;report&gt;issue-tracking&lt;/report&gt;
                      &lt;/reports&gt;
                  &lt;/reportSet&gt;
              &lt;/reportSets&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
              &lt;version&gt;${javadoc.plugin.version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;show&gt;public&lt;/show&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/reporting&gt;
  &lt;repositories&gt;
      (repositories)
  &lt;/repositories&gt;
  &lt;distributionManagement&gt;
      (repositories)
  &lt;/distributionManagement&gt;
  &lt;developers&gt;
      (developers)
  &lt;/developers&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Hopefully it's understood what's going on despite the fact that I had to censor company-related sites.  Additionally, I added proxy and server configurations to settings.xml, as follows:</p>
  
  <pre><code>&lt;proxy&gt;
      &lt;active&gt;true&lt;/active&gt;
      &lt;protocol&gt;https&lt;/protocol&gt;
      &lt;host&gt;(host address)&lt;/host&gt;
      &lt;port&gt;9090&lt;/port&gt;
      &lt;username&gt;(username)&lt;/username&gt;
      &lt;password&gt;(password)&lt;/password&gt;
      &lt;nonProxyHosts&gt;*.mycompany.com&lt;/nonProxyHosts&gt;
  &lt;/proxy&gt;
  </code></pre>
  
  <p>Server:</p>
  
  <pre><code>&lt;server&gt;
      &lt;id&gt;(the same serverId from the POM)&lt;/id&gt;
      &lt;username&gt;(username)&lt;/username&gt;
      &lt;password&gt;(password)&lt;/password&gt;
  &lt;/server&gt;
  </code></pre>
  
  <p>Thanks a lot.</p>