diff --git a/.gitignore b/.gitignore
index 3116e183be..05c69a214e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ target
.springBeans
dependency-reduced-pom.xml
build.log
+_site/
diff --git a/spring-package-maven-plugin/pom.xml b/spring-package-maven-plugin/pom.xml
index 3f8cb614d0..300e926e54 100644
--- a/spring-package-maven-plugin/pom.xml
+++ b/spring-package-maven-plugin/pom.xml
@@ -99,7 +99,7 @@
maven-plugin-plugin
- configurator
+ spring
diff --git a/spring-package-maven-plugin/src/it/executable-jar/pom.xml b/spring-package-maven-plugin/src/it/jar/pom.xml
similarity index 84%
rename from spring-package-maven-plugin/src/it/executable-jar/pom.xml
rename to spring-package-maven-plugin/src/it/jar/pom.xml
index b3795bc817..0fdabefade 100644
--- a/spring-package-maven-plugin/src/it/executable-jar/pom.xml
+++ b/spring-package-maven-plugin/src/it/jar/pom.xml
@@ -3,9 +3,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.springframework.zero.maven.it
- executable-jar
+ jar
0.0.1.BUILD-SNAPSHOT
- executable-jar
+ jar
@@ -13,6 +13,13 @@
@project.artifactId@
@project.version@
true
+
+
+
+ package
+
+
+
diff --git a/spring-package-maven-plugin/src/it/executable-jar/src/main/java/org/test/SampleApplication.java b/spring-package-maven-plugin/src/it/jar/src/main/java/org/test/SampleApplication.java
similarity index 100%
rename from spring-package-maven-plugin/src/it/executable-jar/src/main/java/org/test/SampleApplication.java
rename to spring-package-maven-plugin/src/it/jar/src/main/java/org/test/SampleApplication.java
diff --git a/spring-package-maven-plugin/src/it/executable-jar/verify.groovy b/spring-package-maven-plugin/src/it/jar/verify.groovy
similarity index 55%
rename from spring-package-maven-plugin/src/it/executable-jar/verify.groovy
rename to spring-package-maven-plugin/src/it/jar/verify.groovy
index a52a963b71..268ad5f861 100644
--- a/spring-package-maven-plugin/src/it/executable-jar/verify.groovy
+++ b/spring-package-maven-plugin/src/it/jar/verify.groovy
@@ -2,6 +2,6 @@ import java.io.*;
import org.springframework.maven.packaging.*;
Verify.verifyJar(
- new File( basedir, "target/executable-jar-0.0.1.BUILD-SNAPSHOT.jar" )
+ new File( basedir, "target/jar-0.0.1.BUILD-SNAPSHOT.jar" )
);
diff --git a/spring-package-maven-plugin/src/it/executable-war/pom.xml b/spring-package-maven-plugin/src/it/war/pom.xml
similarity index 69%
rename from spring-package-maven-plugin/src/it/executable-war/pom.xml
rename to spring-package-maven-plugin/src/it/war/pom.xml
index efc70508cd..51060360c0 100644
--- a/spring-package-maven-plugin/src/it/executable-war/pom.xml
+++ b/spring-package-maven-plugin/src/it/war/pom.xml
@@ -3,9 +3,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.springframework.zero.maven.it
- executable-war
+ war
0.0.1.BUILD-SNAPSHOT
- executable-war
+ war
@@ -13,6 +13,21 @@
@project.artifactId@
@project.version@
true
+
+
+
+ package
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 2.3
+
+ false
+
diff --git a/spring-package-maven-plugin/src/it/executable-war/src/main/java/org/test/SampleApplication.java b/spring-package-maven-plugin/src/it/war/src/main/java/org/test/SampleApplication.java
similarity index 100%
rename from spring-package-maven-plugin/src/it/executable-war/src/main/java/org/test/SampleApplication.java
rename to spring-package-maven-plugin/src/it/war/src/main/java/org/test/SampleApplication.java
diff --git a/spring-package-maven-plugin/src/it/executable-war/src/main/webapp/index.html b/spring-package-maven-plugin/src/it/war/src/main/webapp/index.html
similarity index 100%
rename from spring-package-maven-plugin/src/it/executable-war/src/main/webapp/index.html
rename to spring-package-maven-plugin/src/it/war/src/main/webapp/index.html
diff --git a/spring-package-maven-plugin/src/it/executable-war/verify.groovy b/spring-package-maven-plugin/src/it/war/verify.groovy
similarity index 55%
rename from spring-package-maven-plugin/src/it/executable-war/verify.groovy
rename to spring-package-maven-plugin/src/it/war/verify.groovy
index 79ba3a8fb7..01221279b2 100644
--- a/spring-package-maven-plugin/src/it/executable-war/verify.groovy
+++ b/spring-package-maven-plugin/src/it/war/verify.groovy
@@ -2,6 +2,6 @@ import java.io.*;
import org.springframework.maven.packaging.*;
Verify.verifyWar(
- new File( basedir, "target/executable-war-0.0.1.BUILD-SNAPSHOT.war" )
+ new File( basedir, "target/war-0.0.1.BUILD-SNAPSHOT.war" )
);
diff --git a/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ArchiveHelper.java b/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ArchiveHelper.java
new file mode 100644
index 0000000000..c34b066095
--- /dev/null
+++ b/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ArchiveHelper.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2012-2013 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.maven.packaging;
+
+import org.apache.maven.artifact.Artifact;
+
+/**
+ * @author Dave Syer
+ */
+public interface ArchiveHelper {
+
+ /**
+ * Returns the destination of an {@link Artifact}.
+ * @param artifact the artifact
+ * @return the destination or {@code null} to exclude
+ */
+ String getArtifactDestination(Artifact artifact);
+
+ /**
+ * Returns the launcher class that will be used.
+ */
+ String getLauncherClass();
+
+}
diff --git a/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/AbstractExecutableArchiveMojo.java b/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableArchiveMojo.java
similarity index 76%
rename from spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/AbstractExecutableArchiveMojo.java
rename to spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableArchiveMojo.java
index 98f26f365c..688c956b1d 100644
--- a/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/AbstractExecutableArchiveMojo.java
+++ b/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableArchiveMojo.java
@@ -17,6 +17,8 @@
package org.springframework.maven.packaging;
import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
@@ -30,7 +32,10 @@ import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
import org.codehaus.plexus.archiver.Archiver;
@@ -38,6 +43,7 @@ import org.codehaus.plexus.archiver.jar.JarArchiver;
import org.codehaus.plexus.archiver.zip.ZipEntry;
import org.codehaus.plexus.archiver.zip.ZipFile;
import org.codehaus.plexus.archiver.zip.ZipResource;
+import org.codehaus.plexus.util.IOUtil;
import org.sonatype.aether.RepositorySystem;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.repository.RemoteRepository;
@@ -52,11 +58,8 @@ import org.sonatype.aether.util.artifact.DefaultArtifact;
*
* @author Phillip Webb
*/
-public abstract class AbstractExecutableArchiveMojo extends AbstractMojo {
-
- private static final String[] DEFAULT_EXCLUDES = new String[] { "**/package.html" };
-
- private static final String[] DEFAULT_INCLUDES = new String[] { "**/**" };
+@Mojo(name = "package", defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME, requiresDependencyCollection = ResolutionScope.COMPILE_PLUS_RUNTIME)
+public class ExecutableArchiveMojo extends AbstractMojo {
private static final String MAIN_CLASS_ATTRIBUTE = "Main-Class";
@@ -113,26 +116,12 @@ public abstract class AbstractExecutableArchiveMojo extends AbstractMojo {
/**
* Classifier to add to the artifact generated. If given, the artifact will be
- * attached. If this is not given,it will merely be written to the output directory
+ * attached. If this is not given, it will merely be written to the output directory
* according to the finalName.
*/
@Parameter
private String classifier;
- /**
- * List of files to include. Specified as fileset patterns which are relative to the
- * input directory whose contents is being packaged into the archive.
- */
- @Parameter
- private String[] includes;
-
- /**
- * List of files to exclude. Specified as fileset patterns which are relative to the
- * input directory whose contents is being packaged into the archive.
- */
- @Parameter
- private String[] excludes;
-
/**
* Directory containing the classes and resource files that should be packaged into
* the archive.
@@ -151,7 +140,7 @@ public abstract class AbstractExecutableArchiveMojo extends AbstractMojo {
/**
* Whether creating the archive should be forced.
*/
- @Parameter(property = "archive.forceCreation", defaultValue = "false")
+ @Parameter(property = "archive.forceCreation", defaultValue = "true")
private boolean forceCreation;
/**
@@ -160,27 +149,9 @@ public abstract class AbstractExecutableArchiveMojo extends AbstractMojo {
@Parameter(defaultValue = "${repositorySystemSession}", readonly = true)
private RepositorySystemSession repositorySystemSession;
- /**
- * Returns the type as defined in plexus components.xml
- */
- protected abstract String getType();
-
- /**
- * Returns the file extension for the archive (e.g. 'jar').
- */
- protected abstract String getExtension();
+ private ExecutableJarHelper jarHelper = new ExecutableJarHelper();
- /**
- * Returns the destination of an {@link Artifact}.
- * @param artifact the artifact
- * @return the destination or {@code null} to exclude
- */
- protected abstract String getArtifactDestination(Artifact artifact);
-
- /**
- * Returns the launcher class that will be used.
- */
- protected abstract String getLauncherClass();
+ private ExecutableWarHelper warHelper = new ExecutableWarHelper();
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
@@ -189,11 +160,24 @@ public abstract class AbstractExecutableArchiveMojo extends AbstractMojo {
this.project.getArtifact().setFile(archiveFile);
}
else {
+ getLog().info(
+ "Attaching archive: " + archiveFile + ", with classifier: "
+ + this.classifier);
this.projectHelper.attachArtifact(this.project, getType(), this.classifier,
archiveFile);
}
}
+ private ArchiveHelper getArchiveHelper() throws MojoExecutionException {
+ if (getType().equals("jar")) {
+ return this.jarHelper;
+ }
+ if (getType().equals("war")) {
+ return this.warHelper;
+ }
+ throw new MojoExecutionException("Unsupported packaging type: " + getType());
+ }
+
private File createArchive() throws MojoExecutionException {
File archiveFile = getTargetFile();
MavenArchiver archiver = new MavenArchiver();
@@ -204,7 +188,8 @@ public abstract class AbstractExecutableArchiveMojo extends AbstractMojo {
archiver.getArchiver().setRecompressAddedZips(false);
try {
- addContent(archiver);
+ getLog().info("Modifying archive: " + archiveFile);
+ copyContent(archiver, this.project.getArtifact().getFile());
addLibs(archiver);
ZipFile zipFile = addLauncherClasses(archiver);
try {
@@ -220,6 +205,37 @@ public abstract class AbstractExecutableArchiveMojo extends AbstractMojo {
}
}
+ private String getType() {
+ return this.project.getPackaging();
+ }
+
+ private String getExtension() {
+ return this.project.getPackaging();
+ }
+
+ private void copyContent(MavenArchiver archiver, File file) throws IOException {
+
+ FileInputStream input = new FileInputStream(file);
+ File original = new File(this.outputDirectory, "original.jar");
+ FileOutputStream output = new FileOutputStream(original);
+ IOUtil.copy(input, output, 2048);
+ input.close();
+ output.close();
+
+ ZipFile zipFile = new ZipFile(original);
+ Enumeration extends ZipEntry> entries = zipFile.getEntries();
+ while (entries.hasMoreElements()) {
+ ZipEntry entry = entries.nextElement();
+ // TODO: maybe merge manifest instead of skipping it?
+ if (!entry.isDirectory()
+ && !entry.getName().toUpperCase().equals("/META-INF/MANIFEST.MF")) {
+ ZipResource zipResource = new ZipResource(zipFile, entry);
+ archiver.getArchiver().addResource(zipResource, entry.getName(), -1);
+ }
+ }
+
+ }
+
private File getTargetFile() {
String classifier = (this.classifier == null ? "" : this.classifier.trim());
if (classifier.length() > 0 && !classifier.startsWith("-")) {
@@ -242,40 +258,18 @@ public abstract class AbstractExecutableArchiveMojo extends AbstractMojo {
throw new MojoExecutionException("Unable to find a suitable main class, "
+ "please add a 'mainClass' property");
}
- this.archive.getManifestEntries().put(MAIN_CLASS_ATTRIBUTE, getLauncherClass());
+ this.archive.getManifestEntries().put(MAIN_CLASS_ATTRIBUTE,
+ getArchiveHelper().getLauncherClass());
this.archive.getManifestEntries().put(START_CLASS_ATTRIBUTE, mainClass);
}
- protected void addContent(MavenArchiver archiver) {
- if (this.classesDirectrory.exists()) {
- archiver.getArchiver().addDirectory(this.classesDirectrory,
- getClassesDirectoryPrefix(), getIncludes(), getExcludes());
- }
- }
-
- protected String getClassesDirectoryPrefix() {
- return "";
- }
-
- protected final String[] getIncludes() {
- if (this.includes != null && this.includes.length > 0) {
- return this.includes;
- }
- return DEFAULT_INCLUDES;
- }
-
- protected final String[] getExcludes() {
- if (this.excludes != null && this.excludes.length > 0) {
- return this.excludes;
- }
- return DEFAULT_EXCLUDES;
- }
-
- private void addLibs(MavenArchiver archiver) {
+ private void addLibs(MavenArchiver archiver) throws MojoExecutionException {
+ getLog().info("Adding dependencies");
for (Artifact artifact : this.project.getArtifacts()) {
if (artifact.getFile() != null) {
- String dir = getArtifactDestination(artifact);
+ String dir = getArchiveHelper().getArtifactDestination(artifact);
if (dir != null) {
+ getLog().debug("Adding dependency: " + artifact);
archiver.getArchiver().addFile(artifact.getFile(),
dir + artifact.getFile().getName());
}
@@ -285,6 +279,7 @@ public abstract class AbstractExecutableArchiveMojo extends AbstractMojo {
private ZipFile addLauncherClasses(MavenArchiver archiver)
throws MojoExecutionException {
+ getLog().info("Adding launcher classes");
try {
List repositories = new ArrayList();
repositories.addAll(this.project.getRemotePluginRepositories());
diff --git a/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableJarMojo.java b/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableJarHelper.java
similarity index 59%
rename from spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableJarMojo.java
rename to spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableJarHelper.java
index dc3766af1c..9973721835 100644
--- a/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableJarMojo.java
+++ b/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableJarHelper.java
@@ -21,33 +21,19 @@ import java.util.HashSet;
import java.util.Set;
import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.ResolutionScope;
/**
- * Build an executable JAR file.
+ * Help build an executable JAR file.
*
* @author Phillip Webb
*/
-@Mojo(name = "executable-jar", defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME, requiresDependencyCollection = ResolutionScope.COMPILE_PLUS_RUNTIME)
-public class ExecutableJarMojo extends AbstractExecutableArchiveMojo {
+public class ExecutableJarHelper implements ArchiveHelper {
private static final Set LIB_SCOPES = new HashSet(Arrays.asList(
"compile", "runtime", "provided"));
@Override
- protected String getType() {
- return "executable-jar";
- }
-
- @Override
- protected String getExtension() {
- return "jar";
- }
-
- @Override
- protected String getArtifactDestination(Artifact artifact) {
+ public String getArtifactDestination(Artifact artifact) {
if (LIB_SCOPES.contains(artifact.getScope())) {
return "lib/";
}
@@ -55,7 +41,7 @@ public class ExecutableJarMojo extends AbstractExecutableArchiveMojo {
}
@Override
- protected String getLauncherClass() {
+ public String getLauncherClass() {
return "org.springframework.launcher.JarLauncher";
}
}
diff --git a/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableWarHelper.java b/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableWarHelper.java
new file mode 100644
index 0000000000..c508caf732
--- /dev/null
+++ b/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableWarHelper.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2012-2013 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.maven.packaging;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.maven.artifact.Artifact;
+
+/**
+ * Build an executable WAR file.
+ *
+ * @author Phillip Webb
+ */
+public class ExecutableWarHelper implements ArchiveHelper {
+
+ private static final Map SCOPE_DESTINATIONS;
+ static {
+ Map map = new HashMap();
+ map.put("compile", "WEB-INF/lib/");
+ map.put("runtime", "WEB-INF/lib/");
+ map.put("provided", "WEB-INF/lib-provided/");
+ SCOPE_DESTINATIONS = Collections.unmodifiableMap(map);
+ }
+
+ @Override
+ public String getArtifactDestination(Artifact artifact) {
+ return SCOPE_DESTINATIONS.get(artifact.getScope());
+ }
+
+ @Override
+ public String getLauncherClass() {
+ return "org.springframework.launcher.WarLauncher";
+ }
+}
diff --git a/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableWarMojo.java b/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableWarMojo.java
deleted file mode 100644
index d4f3df1935..0000000000
--- a/spring-package-maven-plugin/src/main/java/org/springframework/maven/packaging/ExecutableWarMojo.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2012-2013 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.maven.packaging;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.maven.archiver.MavenArchiver;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.plugins.annotations.ResolutionScope;
-
-/**
- * Build an executable WAR file.
- *
- * @author Phillip Webb
- */
-@Mojo(name = "executable-war", defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME, requiresDependencyCollection = ResolutionScope.COMPILE_PLUS_RUNTIME)
-public class ExecutableWarMojo extends AbstractExecutableArchiveMojo {
-
- private static final Map SCOPE_DESTINATIONS;
- static {
- Map map = new HashMap();
- map.put("compile", "WEB-INF/lib/");
- map.put("runtime", "WEB-INF/lib/");
- map.put("provided", "WEB-INF/lib-provided/");
- SCOPE_DESTINATIONS = Collections.unmodifiableMap(map);
- }
-
- /**
- * Single directory for extra files to include in the WAR. This is where you place
- * your JSP files.
- */
- @Parameter(defaultValue = "${basedir}/src/main/webapp", required = true)
- private File warSourceDirectory;
-
- @Override
- protected String getType() {
- return "executable-war";
- }
-
- @Override
- protected String getExtension() {
- return "war";
- }
-
- @Override
- protected String getArtifactDestination(Artifact artifact) {
- return SCOPE_DESTINATIONS.get(artifact.getScope());
- }
-
- @Override
- protected String getClassesDirectoryPrefix() {
- return "WEB-INF/classes/";
- }
-
- @Override
- protected void addContent(MavenArchiver archiver) {
- super.addContent(archiver);
- if (this.warSourceDirectory.exists()) {
- archiver.getArchiver().addDirectory(this.warSourceDirectory, getIncludes(),
- getExcludes());
- }
- }
-
- @Override
- protected String getLauncherClass() {
- return "org.springframework.launcher.WarLauncher";
- }
-}
diff --git a/spring-package-maven-plugin/src/main/resources/META-INF/plexus/components.xml b/spring-package-maven-plugin/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644
index 1658c975dc..0000000000
--- a/spring-package-maven-plugin/src/main/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
- org.apache.maven.artifact.handler.ArtifactHandler
- executable-war
- org.apache.maven.artifact.handler.DefaultArtifactHandler
-
-
- executable-jar
- jar
- java
- true
-
-
-
- org.apache.maven.lifecycle.mapping.LifecycleMapping
- executable-jar
- org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
-
-
-
-
- default
-
- org.apache.maven.plugins:maven-resources-plugin:resources
- org.apache.maven.plugins:maven-compiler-plugin:compile
- org.apache.maven.plugins:maven-resources-plugin:testResources
- org.apache.maven.plugins:maven-compiler-plugin:testCompile
- org.apache.maven.plugins:maven-surefire-plugin:test
- org.springframework.zero:spring-package-maven-plugin:executable-jar
- org.apache.maven.plugins:maven-install-plugin:install
- org.apache.maven.plugins:maven-deploy-plugin:deploy
-
-
-
-
-
-
- org.apache.maven.artifact.handler.ArtifactHandler
- executable-war
- org.apache.maven.artifact.handler.DefaultArtifactHandler
-
-
- executable-war
- war
- java
- true
-
-
-
- org.apache.maven.lifecycle.mapping.LifecycleMapping
- executable-war
- org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
-
-
-
-
- default
-
- org.apache.maven.plugins:maven-resources-plugin:resources
- org.apache.maven.plugins:maven-compiler-plugin:compile
- org.apache.maven.plugins:maven-resources-plugin:testResources
- org.apache.maven.plugins:maven-compiler-plugin:testCompile
- org.apache.maven.plugins:maven-surefire-plugin:test
- org.springframework.zero:spring-package-maven-plugin:executable-war
- org.apache.maven.plugins:maven-install-plugin:install
- org.apache.maven.plugins:maven-deploy-plugin:deploy
-
-
-
-
-
-
-
diff --git a/spring-starters/spring-starter-parent/pom.xml b/spring-starters/spring-starter-parent/pom.xml
index f49eb00059..93952a1af3 100644
--- a/spring-starters/spring-starter-parent/pom.xml
+++ b/spring-starters/spring-starter-parent/pom.xml
@@ -200,6 +200,20 @@
2.0
+
+ org.springframework.zero
+ spring-package-maven-plugin
+ ${spring.zero.version}
+ true
+
+
+
+ package
+
+
+
+
+
org.apache.maven.plugins
diff --git a/spring-zero-samples/pom.xml b/spring-zero-samples/pom.xml
index ca7263fd8b..760abd0717 100644
--- a/spring-zero-samples/pom.xml
+++ b/spring-zero-samples/pom.xml
@@ -26,4 +26,23 @@
spring-zero-sample-web-ui
spring-zero-sample-xml
+
+
+
+
+ ${project.groupId}
+ spring-package-maven-plugin
+ ${project.version}
+ true
+
+
+
+ package
+
+
+
+
+
+
+
diff --git a/spring-zero-samples/spring-zero-sample-actuator-ui/pom.xml b/spring-zero-samples/spring-zero-sample-actuator-ui/pom.xml
index 777a14be8c..019bb1b098 100644
--- a/spring-zero-samples/spring-zero-sample-actuator-ui/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-actuator-ui/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-actuator-ui
- executable-jar
+ jar
${basedir}/../..
@@ -41,8 +41,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true
diff --git a/spring-zero-samples/spring-zero-sample-actuator/pom.xml b/spring-zero-samples/spring-zero-sample-actuator/pom.xml
index 231f565c5d..d836a8fa4d 100644
--- a/spring-zero-samples/spring-zero-sample-actuator/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-actuator/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-actuator
- executable-jar
+ jar
${basedir}/../..
@@ -44,8 +44,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true
diff --git a/spring-zero-samples/spring-zero-sample-batch/pom.xml b/spring-zero-samples/spring-zero-sample-batch/pom.xml
index 47aea5414f..ea3d914db8 100644
--- a/spring-zero-samples/spring-zero-sample-batch/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-batch/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-batch
- executable-jar
+ jar
${basedir}/../..
@@ -24,8 +24,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true
diff --git a/spring-zero-samples/spring-zero-sample-data-jpa/pom.xml b/spring-zero-samples/spring-zero-sample-data-jpa/pom.xml
index b1d97e4446..414bbb8156 100644
--- a/spring-zero-samples/spring-zero-sample-data-jpa/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-data-jpa/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-data-jpa
- executable-jar
+ jar
${basedir}/../..
@@ -34,7 +34,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
true
diff --git a/spring-zero-samples/spring-zero-sample-integration/pom.xml b/spring-zero-samples/spring-zero-sample-integration/pom.xml
index 536c18e0b4..525a69d34f 100644
--- a/spring-zero-samples/spring-zero-sample-integration/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-integration/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-integration
- executable-jar
+ jar
${basedir}/../..
@@ -24,8 +24,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true
diff --git a/spring-zero-samples/spring-zero-sample-jetty/pom.xml b/spring-zero-samples/spring-zero-sample-jetty/pom.xml
index 9852f84791..bb3e0d9709 100644
--- a/spring-zero-samples/spring-zero-sample-jetty/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-jetty/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-jetty
- executable-jar
+ jar
${basedir}/../..
@@ -43,8 +43,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true
diff --git a/spring-zero-samples/spring-zero-sample-profile/pom.xml b/spring-zero-samples/spring-zero-sample-profile/pom.xml
index 31e5d3e6d1..09affe2b72 100644
--- a/spring-zero-samples/spring-zero-sample-profile/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-profile/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-profile
- executable-jar
+ jar
${basedir}/../..
@@ -29,8 +29,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true
diff --git a/spring-zero-samples/spring-zero-sample-simple/pom.xml b/spring-zero-samples/spring-zero-sample-simple/pom.xml
index ae892af52b..212aef4c9a 100644
--- a/spring-zero-samples/spring-zero-sample-simple/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-simple/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-simple
- executable-jar
+ jar
${basedir}/../..
@@ -24,8 +24,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true
diff --git a/spring-zero-samples/spring-zero-sample-tomcat/pom.xml b/spring-zero-samples/spring-zero-sample-tomcat/pom.xml
index 7af98507b5..a16764b823 100644
--- a/spring-zero-samples/spring-zero-sample-tomcat/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-tomcat/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-tomcat
- executable-jar
+ jar
${basedir}/../..
@@ -36,8 +36,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true
diff --git a/spring-zero-samples/spring-zero-sample-traditional/pom.xml b/spring-zero-samples/spring-zero-sample-traditional/pom.xml
index d964433de4..bd0444ce54 100644
--- a/spring-zero-samples/spring-zero-sample-traditional/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-traditional/pom.xml
@@ -7,7 +7,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-traditional
- executable-war
+ war
${basedir}/../..
/
@@ -45,8 +45,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true
diff --git a/spring-zero-samples/spring-zero-sample-web-ui/pom.xml b/spring-zero-samples/spring-zero-sample-web-ui/pom.xml
index 9729fbac41..6ae465bd3e 100644
--- a/spring-zero-samples/spring-zero-sample-web-ui/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-web-ui/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-web-ui
- executable-jar
+ jar
${basedir}/../..
@@ -32,8 +32,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true
diff --git a/spring-zero-samples/spring-zero-sample-xml/pom.xml b/spring-zero-samples/spring-zero-sample-xml/pom.xml
index 4d335a23f6..b5c6bc691c 100644
--- a/spring-zero-samples/spring-zero-sample-xml/pom.xml
+++ b/spring-zero-samples/spring-zero-sample-xml/pom.xml
@@ -8,7 +8,7 @@
0.5.0.BUILD-SNAPSHOT
spring-zero-sample-xml
- executable-jar
+ jar
${basedir}/../..
@@ -24,8 +24,6 @@
${project.groupId}
spring-package-maven-plugin
- ${project.version}
- true