import com.opensymphony.xwork.ActionContext;
import com.opensymphony.xwork.Preparable;
import com.opensymphony.xwork.Validateable;
+import org.apache.commons.io.FilenameUtils;
/**
* Upload an artifact using Jakarta file upload in webwork. If set by the user a pom will also be generated. Metadata
projectModel.setArtifactId( artifactId );
projectModel.setVersion( version );
projectModel.setPackaging( packaging );
-
- File pomFile = new File( targetPath, filename.replaceAll( packaging, "pom" ) );
-
+
+ filename = FilenameUtils.removeExtension(filename) + ".pom";
+ File pomFile = new File( targetPath, filename);
+
pomWriter.write( projectModel, pomFile );
return pomFile;