Thanks Karl for the patience for descriptions,

Wondering how to see in which phase a plug-in bound to? For example, in the
below plug-in, it does not have any phase element.

<plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
        <source>1.5</source>
        <target>1.5</target>
    </configuration>
</plugin>

regards,
Lin

On Sun, Apr 5, 2015 at 7:04 AM, Karl Heinz Marbaise <[email protected]>
wrote:

> Hi,
>
> On 4/5/15 1:52 AM, Lin Ma wrote:
>
>> Hi Karl,
>>
>> I am testing below plug-in, for example, I tried put it as the first/last
>> element of "<plugins>", and the same results,
>>
>
> The change in the position does not influence the execution order. This is
> defined by the phase you have bound the plugin to which in this case is the
> package phase.
>
> The two executions you have here will running on the order of definition
> in the pom (copy-dependencies, copy-source)...
>
>
> The question is what you like to achieve with the
> maven-dependency-plugin....It looks like you are trying to create an
> distribution archive (like tar.gz / zip etc.) ...Than you should go an
> other path instead of maven-dependency-plugin....
>
>
> ?
>
> Kind regards
> Karl Heinz Marbaise
>
>
>> <plugin>
>>      <groupId>org.apache.maven.plugins</groupId>
>>      <artifactId>maven-dependency-plugin</artifactId>
>>      <version>2.5</version>
>>      <executions>
>>          <execution>
>>              <id>copy-dependencies</id>
>>              <phase>package</phase>
>>              <goals>
>>                  <goal>copy-dependencies</goal>
>>              </goals>
>>              <configuration>
>>                  <outputDirectory>${project.basedir}/../lib/</
>> outputDirectory>
>>                  <overWriteReleases>false</overWriteReleases>
>>                  <overWriteSnapshots>false</overWriteSnapshots>
>>                  <overWriteIfNewer>true</overWriteIfNewer>
>>                  <useSubDirectoryPerScope>true</useSubDirectoryPerScope>
>>              </configuration>
>>          </execution>
>>          <execution>
>>              <id>copy-sources</id>
>>              <phase>package</phase>
>>              <goals>
>>                  <goal>copy-dependencies</goal>
>>              </goals>
>>              <configuration>
>>
>> <outputDirectory>${project.basedir}/../lib/source</outputDirectory>
>>                  <overWriteReleases>false</overWriteReleases>
>>                  <overWriteSnapshots>false</overWriteSnapshots>
>>                  <overWriteIfNewer>true</overWriteIfNewer>
>>                  <useSubDirectoryPerScope>true</useSubDirectoryPerScope>
>>                  <classifier>sources</classifier>
>>              </configuration>
>>          </execution>
>>
>>      </executions>
>>
>> </plugin>
>>
>> regards,
>> Lin
>>
>> On Sat, Apr 4, 2015 at 4:23 PM, Karl Heinz Marbaise <[email protected]>
>> wrote:
>>
>>  Hi,
>>>
>>> On 4/5/15 1:09 AM, Lin Ma wrote:
>>>
>>>  Hello everyone,
>>>>
>>>> I tried to manipulate orders of plug-in in pom.xml and always get the
>>>> same
>>>> results.
>>>>
>>>>
>>> Of which plugins would you like to change the execution order? And for
>>> what purpose?
>>>
>>>
>>>    Wondering if any impact for order or plug-in, and any best
>>>>
>>>
>>>  practices? Thanks.
>>>>
>>>>
>>> So the order of executions is defined by the binding to the appropriate
>>> life cycle .... as you can see here:
>>>
>>> http://maven.apache.org/ref/3.3.1/maven-core/default-bindings.html
>>>
>>>
>>> Or are you talking about execution order within the same life cycle
>>> phase?
>>>
>>>
>>> Kind regards
>>> Karl Heinz Marbaise
>>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to