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