Maven projects fixes and improvements

* Fixed copy of the SQL files to the distribution

* Distribution packages will now execute an automatic clean-up before
assembling. While this will avoid having dirty, old files in the
distribution directory, it also has a negative consequence -
configuration files will be destroyed if they exist.
This commit is contained in:
Emmanuel BENOîT 2012-01-16 16:06:44 +01:00
parent 24f40c5549
commit 30a1080e6e
4 changed files with 39 additions and 3 deletions

View file

@ -24,9 +24,23 @@
</dependency>
</dependencies>
<!-- Use the assembly plug-in to generate the distribution -->
<build>
<plugins>
<!-- Clean the target directory before generating the distribution -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean-before-assembly</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Use the assembly plug-in to generate the distribution -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
@ -48,5 +62,6 @@
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -46,7 +46,8 @@
<directory>../legacyworlds-server-data/db-structure</directory>
<outputDirectory>sql</outputDirectory>
<includes>
<include>**.sql</include>
<include>*.sql</include>
<include>parts/**</include>
<include>db-config.sample.txt</include>
</includes>
</fileSet>

View file

@ -32,9 +32,23 @@
</dependency>
</dependencies>
<!-- Use the assembly plug-in to generate the distribution -->
<build>
<plugins>
<!-- Clean the target directory before generating the distribution -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean-before-assembly</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Use the assembly plug-in to generate the distribution -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>

View file

@ -54,6 +54,12 @@
<version>1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>