Skip to content

Commit 70b59eb

Browse files
author
mgeipel
committed
fixed #25
added build.properties file with git-commit=${buildNumber} version=${pom.version} timestamp = ${timestamp} buildby = ${user.name} added git-commit to MANIFEST
1 parent 78d0f72 commit 70b59eb

File tree

4 files changed

+49
-12
lines changed

4 files changed

+49
-12
lines changed

pom.xml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23
<modelVersion>4.0.0</modelVersion>
34
<groupId>org.culturegraph</groupId>
45
<artifactId>metafacture-core</artifactId>
@@ -75,16 +76,23 @@
7576
<build>
7677
<testResources>
7778
<testResource>
78-
<directory>src/test/java</directory>
79+
<directory>${basedir}/src/test/java</directory>
7980
<excludes>
8081
<exclude>**/*.java</exclude>
8182
</excludes>
8283
</testResource>
8384
<testResource>
84-
<directory>src/test/resources</directory>
85+
<directory>${basedir}/src/test/resources</directory>
8586
</testResource>
8687
</testResources>
8788

89+
<resources>
90+
<resource>
91+
<directory>${basedir}/src/main/resources</directory>
92+
<filtering>true</filtering>
93+
</resource>
94+
</resources>
95+
8896
<plugins>
8997
<plugin>
9098
<groupId>org.apache.maven.plugins</groupId>
@@ -111,10 +119,29 @@
111119
<!-- Specifies the main class of the application -->
112120
<mainClass>org.culturegraph.mf.Flux</mainClass>
113121
</manifest>
122+
<manifestEntries>
123+
<git-commit>${buildNumber}</git-commit>
124+
</manifestEntries>
114125
</archive>
115126
</configuration>
116127
</plugin>
117128

129+
130+
131+
<plugin>
132+
<groupId>org.codehaus.mojo</groupId>
133+
<artifactId>buildnumber-maven-plugin</artifactId>
134+
<version>1.1</version>
135+
<executions>
136+
<execution>
137+
<phase>validate</phase>
138+
<goals>
139+
<goal>create</goal>
140+
</goals>
141+
</execution>
142+
</executions>
143+
</plugin>
144+
118145

119146
<plugin>
120147
<artifactId>maven-assembly-plugin</artifactId>
@@ -129,6 +156,9 @@
129156
<addClasspath>true</addClasspath>
130157
<classpathPrefix>lib/</classpathPrefix>
131158
</manifest>
159+
<manifestEntries>
160+
<git-commit>${buildNumber}</git-commit>
161+
</manifestEntries>
132162
</archive>
133163
</configuration>
134164
</plugin>
@@ -157,11 +187,10 @@
157187
<plugin>
158188
<groupId>org.apache.maven.plugins</groupId>
159189
<artifactId>maven-release-plugin</artifactId>
160-
<version>2.4</version><!--$NO-MVN-MAN-VER$-->
161-
<!-- m2e complains about a different plugin version
162-
being specified in the parent pom. However,
163-
this is not actually problem for maven. So,
164-
we can ignore the warning. -->
190+
<version>2.4</version><!--$NO-MVN-MAN-VER$ -->
191+
<!-- m2e complains about a different plugin version being specified in
192+
the parent pom. However, this is not actually problem for maven. So, we can
193+
ignore the warning. -->
165194
</plugin>
166195

167196
</plugins>

src/main/assembly/assembly.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
<directory>examples/</directory>
3737
<outputDirectory>examples/</outputDirectory>
3838
<includes>
39-
<include>*/*/*/*</include>
40-
<include>*/*/*</include>
41-
<include>*/*</include>
39+
<include>**/*</include>
4240
</includes>
4341
</fileSet>
4442
<fileSet>

src/main/java/org/culturegraph/mf/flux/HelpPrinter.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.culturegraph.mf.framework.annotations.In;
3131
import org.culturegraph.mf.framework.annotations.Out;
3232
import org.culturegraph.mf.framework.annotations.ReturnsAvailableArguments;
33+
import org.culturegraph.mf.util.ResourceUtil;
3334
import org.culturegraph.mf.util.reflection.ObjectFactory;
3435

3536
/**
@@ -44,7 +45,12 @@ private HelpPrinter() {
4445
}
4546

4647
public static void print(final ObjectFactory<?> factory, final PrintStream out) {
47-
out.println("Usage:\tMetaflow FLOW_FILE [VARNAME=VALUE ...]\n");
48+
49+
50+
out.println("WELCOME TO METAFACTURE");
51+
out.println(ResourceUtil.loadProperties("build.properties").toString());
52+
53+
out.println("\nUsage:\tflux FLOW_FILE [VARNAME=VALUE ...]\n");
4854
out.println("Available pipe elements:\n");
4955

5056
final List<String> keyWords = new ArrayList<String>();

src/main/resources/build.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
git-commit=${buildNumber}
2+
version=${pom.version}
3+
timestamp = ${timestamp}
4+
buildby = ${user.name}

0 commit comments

Comments
 (0)