Skip to content

Commit

Permalink
Update plugin versions and fix binary distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
pkainulainen committed Nov 23, 2014
1 parent 13f4de3 commit bf0e06b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 21 deletions.
31 changes: 17 additions & 14 deletions properties-filtering/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,39 +96,42 @@
</resource>
</resources>
<plugins>
<!-- The configuration of maven-assembly-plugin -->
<!--
The configuration of the Maven Assembly plugin that assembles the
binary distribution of our example application.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<!-- The configuration of the plugin -->
<version>2.5.1</version>
<configuration>
<!-- Specifies the configuration file of the assembly plugin -->
<!-- Configures the used assembly descriptor -->
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<!-- The configuration of maven-jar-plugin -->
<!--
The configuration of Maven Jar plugin that packages our application
into a jar file.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<!-- The configuration of the plugin -->
<version>2.5</version>
<configuration>
<!-- Configuration of the archiver -->
<!-- Configures the created archive -->
<archive>
<!-- Manifest specific configuration -->
<!-- Configures the content of the created manifest -->
<manifest>
<!-- Classpath is added to the manifest of the created jar file. -->
<!-- Adds the classpath to the created manifest -->
<addClasspath>true</addClasspath>
<!--
Configures the classpath prefix. This configuration option is
used to specify that all needed libraries are found under lib/
directory.
Specifies that all dependencies of our application are found
from the lib directory.
-->
<classpathPrefix>lib/</classpathPrefix>
<!-- Specifies the main class of the application -->
<!-- Configures the main class of the application -->
<mainClass>net.petrikainulainen.mavenpropertiesfiltering.HelloWorldApp</mainClass>
</manifest>
</archive>
Expand Down
20 changes: 13 additions & 7 deletions properties-filtering/src/main/assembly/assembly.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<assembly>
<id>bin</id>
<!-- Generates a zip package containing the needed files -->
<!-- Specifies that our binary distribution is a zip package -->
<formats>
<format>zip</format>
</formats>

<!-- Adds dependencies to zip package under lib directory -->
<!-- Adds the dependencies of our application to the lib directory -->
<dependencySets>
<dependencySet>
<!--
Project artifact is not copied under library directory since
it is added to the root directory of the zip package.
Project artifact is not copied under library directory since
it is added to the root directory of the zip package.
-->
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
Expand All @@ -19,15 +19,21 @@
</dependencySets>

<fileSets>
<!-- Adds startup scripts to the root directory of zip package -->
<!--
Adds startup scripts to the root directory of zip package. The startup
scripts are from the src/main/scripts directory.
-->
<fileSet>
<directory>etc</directory>
<directory>${project.build.scriptSourceDirectory}</directory>
<outputDirectory></outputDirectory>
<includes>
<include>startup.*</include>
</includes>
</fileSet>
<!-- adds jar package to the root directory of zip package -->
<!--
Adds the jar file of our example application to the root directory
of the created zip package.
-->
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory></outputDirectory>
Expand Down
1 change: 1 addition & 0 deletions properties-filtering/src/main/scripts/startup.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java -jar maven-properties-filtering.jar
2 changes: 2 additions & 0 deletions properties-filtering/src/main/scripts/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
java -jar maven-properties-filtering.jar

0 comments on commit bf0e06b

Please sign in to comment.