]>
git.argeo.org Git - gpl/argeo-slc.git/blob - maven/maven-argeo-pde-plugin/src/main/java/org/argeo/slc/maven/plugins/pde/PackageElementMojo.java
1 package org
.argeo
.slc
.maven
.plugins
.pde
;
5 import org
.apache
.maven
.plugin
.AbstractMojo
;
6 import org
.apache
.maven
.plugin
.MojoExecutionException
;
7 import org
.apache
.maven
.project
.MavenProject
;
10 * Builds an element and adds it as main artifact.
12 * @goal packageElement
14 * @execute goal="buildElement"
16 public class PackageElementMojo
extends AbstractMojo
{
20 * @parameter expression="${project}"
24 private MavenProject project
;
27 * The build directory.
29 * @parameter expression="${project.build.directory}"
32 private String buildDirectory
;
34 public void execute() throws MojoExecutionException
{
35 File file
= new File(buildDirectory
, project
.getArtifactId() + ".zip");
36 project
.getArtifact().setFile(file
);