1 package org.apache.felix.bundleplugin;
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.io.IOException;
24 import java.util.LinkedHashSet;
25 import java.util.Set;
26
27 import org.apache.maven.artifact.Artifact;
28
29
30
31
32 @SuppressWarnings( { "rawtypes", "unchecked" } )
33 class ArtifactStubFactory extends org.apache.maven.plugin.testing.ArtifactStubFactory
34 {
35
36 public ArtifactStubFactory( File workingDir, boolean createFiles )
37 {
38 super( workingDir, createFiles );
39 }
40
41 @Override
42 public Set getClassifiedArtifacts() throws IOException
43 {
44 Set set = new LinkedHashSet();
45 set.add( createArtifact( "g", "a", "1.0", Artifact.SCOPE_COMPILE, "jar", "one" ) );
46 set.add( createArtifact( "g", "b", "1.0", Artifact.SCOPE_COMPILE, "jar", "two" ) );
47 set.add( createArtifact( "g", "c", "1.0", Artifact.SCOPE_COMPILE, "jar", "three" ) );
48 set.add( createArtifact( "g", "d", "1.0", Artifact.SCOPE_COMPILE, "jar", "four" ) );
49 return set;
50 }
51
52 @Override
53 public Set getScopedArtifacts() throws IOException
54 {
55 Set set = new LinkedHashSet();
56 set.add( createArtifact( "g", "compile", "1.0", Artifact.SCOPE_COMPILE ) );
57 set.add( createArtifact( "g", "provided", "1.0", Artifact.SCOPE_PROVIDED ) );
58 set.add( createArtifact( "g", "test", "1.0", Artifact.SCOPE_TEST ) );
59 set.add( createArtifact( "g", "runtime", "1.0", Artifact.SCOPE_RUNTIME ) );
60 set.add( createArtifact( "g", "system", "1.0", Artifact.SCOPE_SYSTEM ) );
61 return set;
62 }
63
64 @Override
65 public Set getTypedArtifacts() throws IOException
66 {
67 Set set = new LinkedHashSet();
68 set.add( createArtifact( "g", "a", "1.0", Artifact.SCOPE_COMPILE, "war", null ) );
69 set.add( createArtifact( "g", "b", "1.0", Artifact.SCOPE_COMPILE, "jar", null ) );
70 set.add( createArtifact( "g", "c", "1.0", Artifact.SCOPE_COMPILE, "sources", null ) );
71 set.add( createArtifact( "g", "d", "1.0", Artifact.SCOPE_COMPILE, "zip", null ) );
72 set.add( createArtifact( "g", "e", "1.0", Artifact.SCOPE_COMPILE, "rar", null ) );
73 return set;
74 }
75
76 }