maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From B Smith-Mannschott <bsmith.o...@gmail.com>
Subject Re: How to generate javadoc jar only during deploy?
Date Mon, 13 Apr 2009 17:29:46 GMT
Move the configuration into a profile. Only runs when the profile is
activated explicitly

<project>
    ... mumble ...
    <profiles>
        <profile>
            <id>generate-javadocs</id>
            ...mumble...

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

           ... mumble ...
</profile>
</profiles>
</project>

$ mvn -Pgenerate-javadocs deploy   <---- instally/deploy with javadocs
$ mvn deploy <------ install/deploy without javadocs


// ben

On Mon, Apr 13, 2009 at 18:16, David Hoffer <dhoffer6@gmail.com> wrote:
> Attaching to the install phase doesn't accomplish what I was looking for.
> This still generates javadocs for install goal it just doesn't publish it to
> the local repo.
>
> I suppose its better than no change but the problem is that this still
> causes javadocs to be generated and then the IDE sees these and has to
> reindex, etc, its a slow process and we really don't need new javadocs for
> every developer build.
>
> -Dave
>
> On Mon, Apr 13, 2009 at 9:52 AM, David Hoffer <dhoffer6@gmail.com> wrote:
>
>> Okay, i will try install phase.
>>
>> thanks,
>> -Dave
>>
>>
>> On Mon, Apr 13, 2009 at 9:42 AM, Stephen Connolly <
>> stephen.alan.connolly@gmail.com> wrote:
>>
>>> nope as attaching to the deploy phase means that it gets to run after the
>>> lifecycle plugins (ie after deploy:deploy) therefore you need to attach it
>>> to an earlier phase (and the latest earlier phase available is install)
>>>
>>> Sent from my [rhymes with myPod] ;-)
>>>
>>>
>>> On 13 Apr 2009, at 15:09, David Hoffer <dhoffer6@gmail.com> wrote:
>>>
>>>  Thanks much, I think you intended to say <phase>deploy</phase>.
>>>>
>>>> -Dave
>>>>
>>>> On Sat, Apr 11, 2009 at 12:08 PM, Stephen Connolly <
>>>> stephen.alan.connolly@gmail.com> wrote:
>>>>
>>>>  2009/4/10 David Hoffer <dhoffer6@gmail.com>
>>>>>
>>>>>  My project currently creates javadocs during the install goal, see
pom
>>>>>> below.  How can I configure this to run only if deploy goal is run
>>>>>>
>>>>> instead?
>>>>>
>>>>>>
>>>>>> Alternatively, is there a way this can be externalized so that
>>>>>> individual
>>>>>> developers can turn this feature off when they do an install?
>>>>>>
>>>>>> <plugin>
>>>>>>              <groupId>org.apache.maven.plugins</groupId>
>>>>>>              <artifactId>maven-javadoc-plugin</artifactId>
>>>>>>              <version>2.5</version>
>>>>>>              <executions>
>>>>>>                  <execution>
>>>>>>                      <id>attach-javadocs</id>
>>>>>>
>>>>>
>>>>> <phase>install</phase>
>>>>>
>>>>>
>>>>>>                      <goals>
>>>>>>                          <goal>jar</goal>
>>>>>>                      </goals>
>>>>>>                  </execution>
>>>>>>              </executions>
>>>>>> </plugin>
>>>>>>
>>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message