use file wagon for install, and improve output

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@154227 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett committed 2005-02-18 02:03:09 +00:00
1 parent 3be18bef2e
commit aaab7f48aa
3 files changed
+29 -24

No files matched your search

@@ -244,17 +244,11 @@ public class DefaultArtifactDeployer
{
try
{
// TODO: swap for file wagon
File destFile = new File( getLocalRepository( project ),
handler.constructRepositoryFullPath( type, project, version ) );
if ( !destFile.getParentFile().exists() )
{
destFile.getParentFile().mkdirs();
}
LOG.info( "Copying: from '" + file + "' to: '" + destFile + "'" );
FileUtils.copyFile( file, destFile );
Repository repository = new Repository( "local", "file:" + project.getContext().getMavenRepoLocal() );
String repositoryPath = handler.constructRepositoryFullPath( type, project, version );
deployFiles( repository, Collections.singletonList( file ), Collections.singletonList( repositoryPath ) );
}
catch ( IOException e )
catch ( Exception e )
{
String msg = "Cannot install file: '" + file + "'. Reason: " + e.getMessage();
throw new MavenException( msg, e );
@@ -442,17 +436,6 @@ public class DefaultArtifactDeployer
}
}
/**
* Return the local repository path form given project
*
* @param project
* @return The path to local repoository in local file system
*/
private String getLocalRepository( Project project )
{
return project.getContext().getMavenRepoLocal();
}
/**
* @return
*/
@@ -55,7 +55,7 @@ public class UploadMeter implements TransferListener
{
shownSoFar = 0;
complete = 0;
System.out.println( "Uploading " + transferEvent.getLocalFile().getName() + ": " );
System.out.println( "Uploading to " + transferEvent.getResource().getName() + ": " );
total = transferEvent.getLocalFile().length();
}