try
{
copyFile( artifactFile, targetPath, artifactPath.substring( lastIndex + 1 ) );
+ consumers.executeConsumers( repoConfig, repository.toFile( artifactReference ) );
}
catch ( IOException ie )
{
{
try
{
- createPom( targetPath, artifactPath.substring( lastIndex + 1 ) );
+ File generatedPomFile = createPom( targetPath, artifactPath.substring( lastIndex + 1 ) );
+ consumers.executeConsumers( repoConfig, generatedPomFile );
}
catch ( IOException ie )
{
{
String targetFilename = artifactPath.substring( lastIndex + 1 ).replaceAll( packaging, "pom" );
copyFile( pomFile, targetPath, targetFilename );
+ consumers.executeConsumers( repoConfig, new File( targetPath, targetFilename ) );
}
catch ( IOException ie )
{
//TODO: MRM-785 (success message does not display on web page)
addActionMessage( msg );
- consumers.executeConsumers( repoConfig, repository.toFile( artifactReference ) );
-
return SUCCESS;
}
catch ( RepositoryNotFoundException re )
}
}
- private void createPom( File targetPath, String filename )
+ private File createPom( File targetPath, String filename )
throws IOException, ProjectModelException
{
ArchivaProjectModel projectModel = new ArchivaProjectModel();
File pomFile = new File( targetPath, filename.replaceAll( packaging, "pom" ) );
pomWriter.write( projectModel, pomFile );
+
+ return pomFile;
}
private File getMetadata( String targetPath )