Hi,

> Anyone run into the desire to deploy javadoc and sources artifacts for
> snapshots, in a similar fashion as done by the release-profile? If so,
> how are you handling that?

Add the following configuration to build>>plugins in your pom.xml:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-javadoc-plugin</artifactId>
  <version>2.8.1</version>
  <executions>
    <execution>
      <id>attach-javadocs</id>
      <goals>
        <goal>jar</goal>
      </goals>
    </execution>
  </executions>
</plugin>

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-source-plugin</artifactId>
  <version>2.1.2</version>
  <executions>
    <execution>
      <id>attach-sources</id>
      <phase>verify</phase>
      <goals>
        <goal>jar-no-fork</goal>
      </goals>
    </execution>
  </executions>
</plugin>


This is what I'm doing in a pluginManagement section in my parent pom.


See:
http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html#How_to_deploy_Javadoc_jar_file
http://maven.apache.org/plugins/maven-source-plugin/usage.html


HTH

Thorsten

Reply via email to