mirror of https://github.com/apache/maven.git
PR: MNG-1279
Submitted by: Philipp Meier add missing model version to generated pom git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@330391 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bcb11b18fc
commit
367d7e5a57
|
@ -17,12 +17,12 @@ package org.apache.maven.plugin.install;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.artifact.metadata.ArtifactMetadata;
|
|
||||||
import org.apache.maven.artifact.factory.ArtifactFactory;
|
import org.apache.maven.artifact.factory.ArtifactFactory;
|
||||||
import org.apache.maven.artifact.installer.ArtifactInstallationException;
|
import org.apache.maven.artifact.installer.ArtifactInstallationException;
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
import org.apache.maven.artifact.metadata.ArtifactMetadata;
|
||||||
import org.apache.maven.model.Model;
|
import org.apache.maven.model.Model;
|
||||||
import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
|
import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
|
||||||
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
import org.apache.maven.project.artifact.ProjectArtifactMetadata;
|
import org.apache.maven.project.artifact.ProjectArtifactMetadata;
|
||||||
import org.codehaus.plexus.util.IOUtil;
|
import org.codehaus.plexus.util.IOUtil;
|
||||||
|
|
||||||
|
@ -105,6 +105,7 @@ public class InstallFileMojo
|
||||||
tempFile.deleteOnExit();
|
tempFile.deleteOnExit();
|
||||||
|
|
||||||
Model model = new Model();
|
Model model = new Model();
|
||||||
|
model.setModelVersion( "4.0.0" );
|
||||||
model.setGroupId( groupId );
|
model.setGroupId( groupId );
|
||||||
model.setArtifactId( artifactId );
|
model.setArtifactId( artifactId );
|
||||||
model.setVersion( version );
|
model.setVersion( version );
|
||||||
|
@ -118,8 +119,7 @@ public class InstallFileMojo
|
||||||
}
|
}
|
||||||
catch ( IOException e )
|
catch ( IOException e )
|
||||||
{
|
{
|
||||||
throw new MojoExecutionException( "Error writing temporary pom file: "
|
throw new MojoExecutionException( "Error writing temporary pom file: " + e.getMessage(), e );
|
||||||
+ e.getMessage(), e );
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue