1 package org.apache.maven.artifact.ant;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23 import java.util.ArrayList;
24 import java.util.List;
25
26 import org.apache.maven.artifact.repository.ArtifactRepository;
27
28
29
30
31
32
33
34 public abstract class InstallDeployTaskSupport
35 extends AbstractArtifactTask
36 {
37
38
39
40 protected File file;
41
42
43
44
45 protected List<AttachedArtifact> attachedArtifacts = new ArrayList<AttachedArtifact>();
46
47 public File getFile()
48 {
49 return file;
50 }
51
52 public void setFile( File file )
53 {
54 this.file = file;
55 }
56
57 public Pom initializePom( ArtifactRepository localArtifactRepository )
58 {
59 Pom pom = super.initializePom( localArtifactRepository );
60
61
62 if ( attachedArtifacts != null )
63 {
64 for ( AttachedArtifact attached : attachedArtifacts )
65 {
66 pom.attach( attached );
67 }
68 }
69
70 return pom;
71 }
72
73 public AttachedArtifact createAttach()
74 {
75 AttachedArtifact attach = new AttachedArtifact();
76 attachedArtifacts.add( attach );
77
78 return attach;
79 }
80 }