]> 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
Remove plugins directory
[gpl/argeo-slc.git] / maven / maven-argeo-pde-plugin / src / main / java / org / argeo / slc / maven / plugins / pde / PackageElementMojo.java
1 package org.argeo.slc.maven.plugins.pde;
2
3 import java.io.File;
4
5 import org.apache.maven.plugin.AbstractMojo;
6 import org.apache.maven.plugin.MojoExecutionException;
7 import org.apache.maven.project.MavenProject;
8
9 /**
10 * Builds an element and adds it as main artifact.
11 *
12 * @goal packageElement
13 * @phase package
14 * @execute goal="buildElement"
15 */
16 public class PackageElementMojo extends AbstractMojo {
17 /**
18 * The Maven project.
19 *
20 * @parameter expression="${project}"
21 * @required
22 * @readonly
23 */
24 private MavenProject project;
25
26 /**
27 * The directory for the generated JAR.
28 *
29 * @parameter expression="${project.build.directory}"
30 * @required
31 */
32 private String buildDirectory;
33
34 public void execute() throws MojoExecutionException {
35 File file = new File(buildDirectory, project.getArtifactId() + ".zip");
36 project.getArtifact().setFile(file);
37 }
38 }