From 11e47bbed65d09b174ef8b0a7be10b6b93a89890 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Thu, 11 Dec 2008 16:35:49 +0000 Subject: [PATCH] Version v0.3.1 ASSIGNED - bug 81: Integrate new SpartaUI banding https://www.spartadn.com/bugzilla/show_bug.cgi?id=81 git-svn-id: https://svn.argeo.org/slc/trunk@2006 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- maven/maven-argeo-pde-plugin/pom.xml | 2 +- .../maven/plugins/pde/PackageProductMojo.java | 38 ++++++++++++++++ .../resources/META-INF/plexus/components.xml | 44 +++++++++++++++++++ .../src/main/scripts/argeo-pde.build.xml | 2 +- .../src/main/scripts/argeo-pde.mojos.xml | 11 ----- 5 files changed, 84 insertions(+), 13 deletions(-) create mode 100644 maven/maven-argeo-pde-plugin/src/main/java/org/argeo/slc/maven/plugins/pde/PackageProductMojo.java diff --git a/maven/maven-argeo-pde-plugin/pom.xml b/maven/maven-argeo-pde-plugin/pom.xml index be705bb97..013807ff5 100644 --- a/maven/maven-argeo-pde-plugin/pom.xml +++ b/maven/maven-argeo-pde-plugin/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.argeo.slc.maven maven-argeo-pde-plugin - 0.3.1-SNAPSHOT + 0.3.1 maven-plugin Argeo PDE Plugin diff --git a/maven/maven-argeo-pde-plugin/src/main/java/org/argeo/slc/maven/plugins/pde/PackageProductMojo.java b/maven/maven-argeo-pde-plugin/src/main/java/org/argeo/slc/maven/plugins/pde/PackageProductMojo.java new file mode 100644 index 000000000..94084c78e --- /dev/null +++ b/maven/maven-argeo-pde-plugin/src/main/java/org/argeo/slc/maven/plugins/pde/PackageProductMojo.java @@ -0,0 +1,38 @@ +package org.argeo.slc.maven.plugins.pde; + +import java.io.File; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.project.MavenProject; + +/** + * Builds a product and adds it as main artifact. + * + * @goal packageProduct + * @phase package + * @execute goal="buildProduct" + */ +public class PackageProductMojo extends AbstractMojo { + /** + * The Maven project. + * + * @parameter expression="${project}" + * @required + * @readonly + */ + private MavenProject project; + + /** + * The build directory. + * + * @parameter expression="${project.build.directory}" + * @required + */ + private String buildDirectory; + + public void execute() throws MojoExecutionException { + File file = new File(buildDirectory, project.getArtifactId() + ".zip"); + project.getArtifact().setFile(file); + } +} diff --git a/maven/maven-argeo-pde-plugin/src/main/resources/META-INF/plexus/components.xml b/maven/maven-argeo-pde-plugin/src/main/resources/META-INF/plexus/components.xml index fa7d8484b..9b3ee4c9b 100644 --- a/maven/maven-argeo-pde-plugin/src/main/resources/META-INF/plexus/components.xml +++ b/maven/maven-argeo-pde-plugin/src/main/resources/META-INF/plexus/components.xml @@ -32,6 +32,35 @@ + + org.apache.maven.lifecycle.mapping.LifecycleMapping + + eclipseProduct + + org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping + + + + + default + + + org.argeo.slc.maven:maven-argeo-pde-plugin:eclipseTarget + + + org.argeo.slc.maven:maven-argeo-pde-plugin:packageProduct + + + org.apache.maven.plugins:maven-install-plugin:install + + + org.apache.maven.plugins:maven-deploy-plugin:deploy + + + + + + org.apache.maven.artifact.handler.ArtifactHandler @@ -47,5 +76,20 @@ false + + org.apache.maven.artifact.handler.ArtifactHandler + + eclipseProduct + + org.apache.maven.artifact.handler.DefaultArtifactHandler + + + eclipseFeature + false + java + zip + false + + diff --git a/maven/maven-argeo-pde-plugin/src/main/scripts/argeo-pde.build.xml b/maven/maven-argeo-pde-plugin/src/main/scripts/argeo-pde.build.xml index aec1adfee..6203b7634 100644 --- a/maven/maven-argeo-pde-plugin/src/main/scripts/argeo-pde.build.xml +++ b/maven/maven-argeo-pde-plugin/src/main/scripts/argeo-pde.build.xml @@ -141,7 +141,7 @@ - + diff --git a/maven/maven-argeo-pde-plugin/src/main/scripts/argeo-pde.mojos.xml b/maven/maven-argeo-pde-plugin/src/main/scripts/argeo-pde.mojos.xml index d1223d10a..139fcb8fa 100644 --- a/maven/maven-argeo-pde-plugin/src/main/scripts/argeo-pde.mojos.xml +++ b/maven/maven-argeo-pde-plugin/src/main/scripts/argeo-pde.mojos.xml @@ -76,17 +76,6 @@ - - - eclipseBuildDir - eclipseBuildDir - true - ${eclipseBuildDir} - java.lang.String - - The Eclipse build dir location - - eclipseAntArgs eclipseAntArgs -- 2.39.2