SHL-15 change plugin module by using XML

This commit is contained in:
Jarred Li
2012-04-11 15:15:57 +08:00
parent 725ef2eeac
commit c27eeeab88
9 changed files with 61 additions and 259 deletions

View File

@@ -37,38 +37,36 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>shade</goal>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${jar.mainclass}</mainClass>
</transformer>
<!-- <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource> </transformer> <transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource> </transformer> -->
</transformers>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>${jar.mainclass}</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>

View File

@@ -8,7 +8,7 @@ Maven:
Gradle:
Gradle (not supported yet):
1.Build the project
$>../../gradlew build

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<configuration>
<class>org.springframework.shell.samples.helloworld.HelloWorldPlugin</class>
</configuration>
</plugin>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<context:component-scan base-package="org.springframework.shell.samples.helloworld.commands" />
</beans>