~ubuntu-branches/ubuntu/wily/maven-antrun-plugin/wily

« back to all changes in this revision

Viewing changes to src/site/apt/tasks/dependencyFilesets.apt.vm

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Landaeta
  • Date: 2011-07-19 19:38:53 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110719193853-4umqiv4uwqcbrdd0
Tags: 1.6-1
* Team upload.
* New upstream release.
* Bump Standards-Version to 3.9.2. No changes were required.
* Migrate to source package format 3.0 (quilt).
* Allow package to build twice in a row.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 ------
 
2
 DependencyFileSets Task
 
3
 ------
 
4
 Paul Gier
 
5
 ------
 
6
 March 2010
 
7
 ------
 
8
 
 
9
 ~~ Licensed to the Apache Software Foundation (ASF) under one
 
10
 ~~ or more contributor license agreements.  See the NOTICE file
 
11
 ~~ distributed with this work for additional information
 
12
 ~~ regarding copyright ownership.  The ASF licenses this file
 
13
 ~~ to you under the Apache License, Version 2.0 (the
 
14
 ~~ "License"); you may not use this file except in compliance
 
15
 ~~ with the License.  You may obtain a copy of the License at
 
16
 ~~
 
17
 ~~   http://www.apache.org/licenses/LICENSE-2.0
 
18
 ~~
 
19
 ~~ Unless required by applicable law or agreed to in writing,
 
20
 ~~ software distributed under the License is distributed on an
 
21
 ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
22
 ~~ KIND, either express or implied.  See the License for the
 
23
 ~~ specific language governing permissions and limitations
 
24
 ~~ under the License.
 
25
 
 
26
 ~~ NOTE: For help with the syntax of this file, see:
 
27
 ~~ http://maven.apache.org/doxia/references/apt-format.html
 
28
 
 
29
DependencyFilesets Task
 
30
 
 
31
  This task will create fileset objects containing the Maven project dependencies.  This can be used access
 
32
  specific dependency artifacts, or to operate on a set of dependency artifacts.  Each artifact will be assigned 
 
33
  a fileset ID in the form <<<[prefix]groupId:artifactId:[classifier]:type>>>.  A dependency on a junit jar would be
 
34
  given a fileset ID of <<<junit:junit:jar>>>.
 
35
  
 
36
  In addition, a single fileset containing all the project dependencies will be created using the default ID
 
37
  maven.project.dependencies
 
38
 
 
39
* Task Parameters
 
40
 
 
41
*---------------+--------------------------------------------------------+-----------------------------------*
 
42
|| Attribute    || Description                                           || Required                          |
 
43
*---------------+--------------------------------------------------------+-----------------------------------*
 
44
| prefix        | String to prepend to all fileset IDs                   | No, defaults to empty string      |
 
45
*---------------+--------------------------------------------------------+-----------------------------------*
 
46
| projectDependenciesId  | RefId for the fileset containing all project dependencies  | No, defaults to "maven.project.dependencies     |
 
47
*---------------+--------------------------------------------------------+-----------------------------------*
 
48
| scopes        | Comma separated list of artifact scopes to include     | No, defaults to all artifacts     |
 
49
*---------------+--------------------------------------------------------+-----------------------------------*
 
50
| types         | Comma separated list of artifact types to include      | No, defaults to all artifacts     |
 
51
*---------------+--------------------------------------------------------+-----------------------------------*
 
52
 
 
53
 
 
54
* Example
 
55
 
 
56
  This example shows how to access individual dependencies and the combined dependency fileset.
 
57
  
 
58
------
 
59
      <plugin>
 
60
        <groupId>org.apache.maven.plugins</groupId>
 
61
        <artifactId>maven-antrun-plugin</artifactId>
 
62
        <version>${project.version}</version>
 
63
        <executions>
 
64
          <execution>
 
65
            <id>copy-dependencies</id>
 
66
            <phase>package</phase>
 
67
            <goals>
 
68
              <goal>run</goal>
 
69
            </goals>
 
70
            <configuration>
 
71
              <target>
 
72
        
 
73
                <dependencyfilesets prefix="mydeps."/>
 
74
                <mkdir dir="target/dependencies"/>
 
75
                <copy todir="target/dependencies">
 
76
                  <fileset refid="mydeps.junit:junit:jar"/>
 
77
                  <fileset refid="mydeps.org.apache.ant:ant:jar"/>
 
78
                </copy>
 
79
                
 
80
                <mkdir dir="target/dependencies2"/>
 
81
                <copy todir="target/dependencies2" flatten="true">
 
82
                  <fileset refid="mydeps.maven.project.dependencies"/>
 
83
                </copy>
 
84
        
 
85
              </target>
 
86
            </configuration>
 
87
          </execution>
 
88
        </executions>
 
89
      </plugin>
 
90
------
 
91