diff --git a/ganttzk/pom.xml b/ganttzk/pom.xml index ffb1d8fd9..b660dcf9e 100644 --- a/ganttzk/pom.xml +++ b/ganttzk/pom.xml @@ -6,7 +6,7 @@ org.navalplanner navalplanner - 1.0.0 + 0.9.0 ganttzk jar diff --git a/navalplanner-business/pom.xml b/navalplanner-business/pom.xml index 53833a5c4..c7d14c21d 100644 --- a/navalplanner-business/pom.xml +++ b/navalplanner-business/pom.xml @@ -5,7 +5,7 @@ org.navalplanner navalplanner - 1.0.0 + 0.9.0 navalplanner-business jar diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/common/VersionInformation.java b/navalplanner-business/src/main/java/org/navalplanner/business/common/VersionInformation.java new file mode 100644 index 000000000..427a6f041 --- /dev/null +++ b/navalplanner-business/src/main/java/org/navalplanner/business/common/VersionInformation.java @@ -0,0 +1,55 @@ +/* + * This file is part of NavalPlan + * + * Copyright (C) 2010 Wireless Galicia S.L. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package org.navalplanner.business.common; + +/** + * It contains the current version of project and implements of singleton + * pattern. + * @author Susana Montes Pedreira + */ +public class VersionInformation { + + private static final VersionInformation singleton = new VersionInformation(); + + private String projectVersion; + + private VersionInformation() { + } + + public static VersionInformation getInstance() { + return singleton; + } + + /** + * It returns the current version of the project for retrieval at any place. + */ + public static String getVersion() { + return singleton.getProjectVersion(); + } + + public String getProjectVersion() { + return projectVersion; + } + + public void setProjectVersion(String argVersion) { + projectVersion = argVersion; + } + +} \ No newline at end of file diff --git a/navalplanner-business/src/main/resources/navalplanner-business-spring-config.xml b/navalplanner-business/src/main/resources/navalplanner-business-spring-config.xml index c0b1a1a27..cb6a9b3ef 100644 --- a/navalplanner-business/src/main/resources/navalplanner-business-spring-config.xml +++ b/navalplanner-business/src/main/resources/navalplanner-business-spring-config.xml @@ -127,6 +127,15 @@ class="org.navalplanner.business.orders.entities.CriterionRequirementOrderElementHandler" factory-method="getInstance" /> + + + ${project.version} + + + diff --git a/navalplanner-webapp/pom.xml b/navalplanner-webapp/pom.xml index 09ee66301..c5c524cd1 100644 --- a/navalplanner-webapp/pom.xml +++ b/navalplanner-webapp/pom.xml @@ -4,7 +4,7 @@ org.navalplanner navalplanner - 1.0.0 + 0.9.0 navalplanner-webapp war diff --git a/navalplanner-webapp/src/main/webapp/common/layout/login.zul b/navalplanner-webapp/src/main/webapp/common/layout/login.zul index 552ff2c8b..f20fba8b7 100644 --- a/navalplanner-webapp/src/main/webapp/common/layout/login.zul +++ b/navalplanner-webapp/src/main/webapp/common/layout/login.zul @@ -21,6 +21,9 @@ + +
@@ -110,7 +113,7 @@ ${i18n:_('Supported Chrome, Firefox, Safari and Epiphany browsers')} - v1.0 + v${project:version()}
diff --git a/pom.xml b/pom.xml index e78b20720..088cffad8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.navalplanner navalplanner pom - 1.0.0 + 0.9.0 NavalPlan org.navalplanner navalplanner-business - 1.0.0 + ${project.version} org.dbunit