1 package org.apache.maven.artifact.deployer;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.artifact.AbstractArtifactComponentTestCase;
23 import org.apache.maven.artifact.Artifact;
24
25 import java.io.File;
26
27
28
29
30
31 public class ArtifactDeployerTest
32 extends AbstractArtifactComponentTestCase
33 {
34 private ArtifactDeployer artifactDeployer;
35
36 protected void setUp()
37 throws Exception
38 {
39 super.setUp();
40
41 artifactDeployer = (ArtifactDeployer) lookup( ArtifactDeployer.ROLE );
42 }
43
44 protected String component()
45 {
46 return "deployer";
47 }
48
49 public void testArtifactInstallation()
50 throws Exception
51 {
52 String artifactBasedir = new File( getBasedir(), "src/test/resources/artifact-install" ).getAbsolutePath();
53
54 Artifact artifact = createArtifact( "artifact", "1.0" );
55
56 File file = new File( artifactBasedir, "artifact-1.0.jar" );
57
58 artifactDeployer.deploy( file, artifact, remoteRepository(), localRepository() );
59
60 assertRemoteArtifactPresent( artifact );
61 }
62 }