[jboss-cvs] Picketbox SVN: r283 - in trunk/picketbox: src/main/java/org/picketbox and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 2 13:53:03 EDT 2011
Author: anil.saldhana at jboss.com
Date: 2011-11-02 13:53:03 -0400 (Wed, 02 Nov 2011)
New Revision: 283
Added:
trunk/picketbox/src/main/java/org/picketbox/Version.java
Modified:
trunk/picketbox/pom.xml
Log:
add pbox version info
Modified: trunk/picketbox/pom.xml
===================================================================
--- trunk/picketbox/pom.xml 2011-11-02 17:24:02 UTC (rev 282)
+++ trunk/picketbox/pom.xml 2011-11-02 17:53:03 UTC (rev 283)
@@ -83,4 +83,34 @@
<scope>test</scope>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-injection-plugin</artifactId>
+ <version>1.0.2</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>bytecode</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <bytecodeInjections>
+ <bytecodeInjection>
+ <expression>${project.version}</expression>
+ <targetMembers>
+ <methodBodyReturn>
+ <className>org.picketbox.Version</className>
+ <methodName>getVersionString</methodName>
+ </methodBodyReturn>
+ </targetMembers>
+ </bytecodeInjection>
+ </bytecodeInjections>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Added: trunk/picketbox/src/main/java/org/picketbox/Version.java
===================================================================
--- trunk/picketbox/src/main/java/org/picketbox/Version.java (rev 0)
+++ trunk/picketbox/src/main/java/org/picketbox/Version.java 2011-11-02 17:53:03 UTC (rev 283)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.picketbox;
+
+/**
+ * The version of PicketBox.
+ *
+ * @apiviz.exclude
+ */
+public final class Version {
+
+ private Version() {
+ }
+
+ /**
+ * The version.
+ */
+ public static final String VERSION = getVersionString();
+
+ /**
+ * Get the version string.
+ *
+ * @return the version string
+ */
+ static String getVersionString() {
+ return "TRUNK SNAPSHOT";
+ }
+
+ /**
+ * Print the version to {@code System.out}.
+ *
+ * @param args ignored
+ */
+ public static void main(String[] args) {
+ System.out.print(VERSION);
+ }
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list