Assembler: Show version information when run without arguments.
3 files changed, 27 insertions(+), 0 deletions(-)

M CHANGES.md
M pom.xml
M src/main/java/nl/grauw/glass/Assembler.java
M CHANGES.md +1 -0
@@ 11,6 11,7 @@ Glass 0.6 — ????-??-??
   * The `"` character can now be written as `""` in string literals.
   * Documented the `end` directive, supported since the initial release.
   * The source file encoding is changed from ISO-8859-1 to UTF-8.
+  * Glass now shows version information when run without arguments.
 
 Glass 0.5 — 2017-01-18
 ----------------------

          
M pom.xml +20 -0
@@ 60,6 60,22 @@ 
 				</configuration>
 			</plugin>
 			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>buildnumber-maven-plugin</artifactId>
+				<version>3.0.0</version>
+				<executions>
+					<execution>
+					<phase>validate</phase>
+					<goals>
+						<goal>create</goal>
+					</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<revisionOnScmFailure>${maven.build.timestamp}</revisionOnScmFailure>
+				</configuration>
+			</plugin>
+			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-jar-plugin</artifactId>
 				<version>3.2.2</version>

          
@@ 67,7 83,11 @@ 
 					<archive>
 						<manifest>
 							<mainClass>${mainClass}</mainClass>
+							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
 						</manifest>
+						<manifestEntries>
+							<Implementation-Version>${project.version} (${buildNumber})</Implementation-Version>
+						</manifestEntries>
 					</archive>
 				</configuration>
 			</plugin>

          
M src/main/java/nl/grauw/glass/Assembler.java +6 -0
@@ 20,6 20,12 @@ public class Assembler {
 	 */
 	public static void main(String[] args) {
 		if (args.length == 0) {
+			System.out.println(String.format("%s %s by %s",
+				Assembler.class.getPackage().getImplementationTitle(),
+				Assembler.class.getPackage().getImplementationVersion(),
+				Assembler.class.getPackage().getImplementationVendor()
+			));
+			System.out.println();
 			System.out.println("Usage: java -jar glass.jar [OPTION] SOURCE [OBJECT] [SYMBOL]");
 			System.exit(1);
 		}