You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2016/01/29 14:13:38 UTC
[3/5] jena git commit: developmentMode static
developmentMode static
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/61d13b5b
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/61d13b5b
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/61d13b5b
Branch: refs/heads/master
Commit: 61d13b5b8d613b60612097619b2350a66dc027b1
Parents: bac5237
Author: Andy Seaborne <an...@apache.org>
Authored: Thu Jan 28 23:44:21 2016 +0000
Committer: Andy Seaborne <an...@apache.org>
Committed: Thu Jan 28 23:44:21 2016 +0000
----------------------------------------------------------------------
.../src/main/java/org/apache/jena/fuseki/Fuseki.java | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/61d13b5b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
index e9c16f1..c2c0783 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
@@ -109,15 +109,24 @@ public class Fuseki {
*/
static public final boolean GSP_DIRECT_NAMING = false ;
+ /** Are we in development mode? That means a SNAPSHOT, or no VERSION
+ * because maven has not filtered the fuseki-properties.xml file.
+ */
+ public static final boolean developmentMode ;
+ static {
+ // See ServletBase.setCommonheaders
+ // If it look like a SNAPSHOT, or it's not set, we are in development mode.
+ developmentMode = ( VERSION == null || VERSION.equals("development") || VERSION.contains("SNAPSHOT") ) ;
+ }
+
/** An identifier for the HTTP Fuseki server instance */
static public final String serverHttpName = NAME + " (" + VERSION + ")" ;
-
+
/** An additional identifier for the HTTP Fuseki server instance in a development build */
static public final String serverHttpNameDev ;
static {
// See ServletBase.setCommonheaders
- // If it look like a SNAPSHOT, print build date. Not perfect, but better.
- if ( VERSION.contains("SNAPSHOT") && ! BUILD_DATE.startsWith("\\${") )
+ if ( developmentMode )
serverHttpNameDev = NAME + " (" + VERSION + " / " + BUILD_DATE +")" ;
else
serverHttpNameDev = null ;