From afd821c3601a6b3fbb53d77c23b2c2b38f31ee94 Mon Sep 17 00:00:00 2001 From: Willem Cazander Date: Sun, 2 Dec 2012 14:40:18 +0100 Subject: [PATCH] Added build info and clean poms a bit. --- pom.xml | 26 ++++++- vasc-backend/pom.xml | 12 ++-- vasc-backend/vasc-backend-jdbc/pom.xml | 10 +-- vasc-backend/vasc-backend-jpa/pom.xml | 20 +++--- vasc-backend/vasc-backend-ldap/pom.xml | 18 +++-- .../DefaultVascFrontendDataSelector.java | 10 +++ vasc-demo/vasc-demo-petstore-j2ee5/pom.xml | 2 - .../vasc-demo-petstore-j2ee5-ear/pom.xml | 2 - .../vasc-demo-petstore-j2ee5-war/pom.xml | 2 - .../vasc-demo-server-core/pom.xml | 40 +++++++++++ .../server/core/VascTechDemoBuildInfo.java | 42 +++++++++++ .../demo/server/core/VascTechDemoStartup.java | 31 ++++++++ .../vasc/demo/server/ui/JStatusPanel.java | 2 +- .../vasc-frontend-cxf-server/pom.xml | 72 +++++++++---------- vasc-frontend/vasc-frontend-swing/pom.xml | 44 +++++------- vasc-frontend/vasc-frontend-swt/pom.xml | 10 ++- .../vasc-frontend-web-export/pom.xml | 32 ++++----- vasc-frontend/vasc-frontend-web-jsf/pom.xml | 32 ++++----- vasc-lib/pom.xml | 8 +-- vasc-lib/vasc-lib-editor/pom.xml | 2 +- vasc-lib/vasc-lib-i18n/pom.xml | 2 +- vasc-lib/vasc-lib-jr4o/pom.xml | 2 +- vasc-test/pom.xml | 6 +- vasc-test/vasc-test-frontend-data/pom.xml | 10 +-- vasc-test/vasc-test-i18n/pom.xml | 10 +-- vasc-xpql-ejb3-server/pom.xml | 4 +- vasc-xpql/pom.xml | 23 +++--- 27 files changed, 298 insertions(+), 176 deletions(-) create mode 100644 vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/core/VascTechDemoBuildInfo.java diff --git a/pom.xml b/pom.xml index d0182b3..29d04c3 100644 --- a/pom.xml +++ b/pom.xml @@ -178,7 +178,7 @@ - + @@ -266,6 +266,30 @@ maven-release-plugin ${maven-release-plugin.version} + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.maven.plugins + maven-antrun-plugin + ${maven-antrun-plugin.version} + + run + + + + + + + + + + diff --git a/vasc-backend/pom.xml b/vasc-backend/pom.xml index 9378a09..53fdffe 100644 --- a/vasc-backend/pom.xml +++ b/vasc-backend/pom.xml @@ -10,10 +10,10 @@ vasc-backend vasc-backend - vasc-backend-jpa - vasc-backend-ldap - vasc-backend-mongodb - vasc-backend-jdbc - vasc-backend-metamodel + vasc-backend-jpa + vasc-backend-ldap + vasc-backend-mongodb + vasc-backend-jdbc + vasc-backend-metamodel - \ No newline at end of file + diff --git a/vasc-backend/vasc-backend-jdbc/pom.xml b/vasc-backend/vasc-backend-jdbc/pom.xml index 7517160..895734c 100644 --- a/vasc-backend/vasc-backend-jdbc/pom.xml +++ b/vasc-backend/vasc-backend-jdbc/pom.xml @@ -10,10 +10,10 @@ vasc-backend-jdbc vasc-backend-jdbc - - net.forwardfire.vasc - vasc-core - ${project.version} + + net.forwardfire.vasc + vasc-core + ${project.version} - \ No newline at end of file + diff --git a/vasc-backend/vasc-backend-jpa/pom.xml b/vasc-backend/vasc-backend-jpa/pom.xml index 9a99c02..94ad157 100644 --- a/vasc-backend/vasc-backend-jpa/pom.xml +++ b/vasc-backend/vasc-backend-jpa/pom.xml @@ -5,16 +5,14 @@ net.forwardfire.vasc 0.4.1-SNAPSHOT - net.forwardfire.vasc vasc-backend-jpa - 0.4.1-SNAPSHOT vasc-backend-jpa vasc-backend-jpa - - net.forwardfire.vasc - vasc-core - ${project.version} + + net.forwardfire.vasc + vasc-core + ${project.version} javax.persistence @@ -23,10 +21,10 @@ provided - org.hibernate - hibernate-annotations - ${hibernate-annotations.version} - provided + org.hibernate + hibernate-annotations + ${hibernate-annotations.version} + provided - \ No newline at end of file + diff --git a/vasc-backend/vasc-backend-ldap/pom.xml b/vasc-backend/vasc-backend-ldap/pom.xml index 41eee64..5007f4f 100644 --- a/vasc-backend/vasc-backend-ldap/pom.xml +++ b/vasc-backend/vasc-backend-ldap/pom.xml @@ -5,21 +5,19 @@ net.forwardfire.vasc 0.4.1-SNAPSHOT - net.forwardfire.vasc vasc-backend-ldap - 0.4.1-SNAPSHOT vasc-backend-ldap vasc-backend-ldap - - net.forwardfire.vasc - vasc-core - ${project.version} + + net.forwardfire.vasc + vasc-core + ${project.version} - com.novell.ldap - jldap - ${jldap.version} + com.novell.ldap + jldap + ${jldap.version} - \ No newline at end of file + diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendDataSelector.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendDataSelector.java index 214f3c1..86fe94f 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendDataSelector.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendDataSelector.java @@ -23,6 +23,7 @@ package net.forwardfire.vasc.impl.frontend; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import net.forwardfire.vasc.core.VascEntry; @@ -125,6 +126,15 @@ public class DefaultVascFrontendDataSelector implements VascFrontendDataSelector */ + private List filter() { + List result = new ArrayList(50); + for (VascEntryField vef:entry.getVascEntryFields()) { + + + } + return result; + } + public List getFieldsList() { List result = new ArrayList(50); result.addAll(entry.getVascEntryFields()); diff --git a/vasc-demo/vasc-demo-petstore-j2ee5/pom.xml b/vasc-demo/vasc-demo-petstore-j2ee5/pom.xml index 23b85b2..3f13a1e 100644 --- a/vasc-demo/vasc-demo-petstore-j2ee5/pom.xml +++ b/vasc-demo/vasc-demo-petstore-j2ee5/pom.xml @@ -5,9 +5,7 @@ net.forwardfire.vasc.demo 0.4.1-SNAPSHOT - net.forwardfire.vasc.demo vasc-demo-petstore-j2ee5 - 0.4.1-SNAPSHOT pom vasc-demo-petstore-j2ee5 vasc-demo-petstore-j2ee5 diff --git a/vasc-demo/vasc-demo-petstore-j2ee5/vasc-demo-petstore-j2ee5-ear/pom.xml b/vasc-demo/vasc-demo-petstore-j2ee5/vasc-demo-petstore-j2ee5-ear/pom.xml index f8fffcd..e5be158 100644 --- a/vasc-demo/vasc-demo-petstore-j2ee5/vasc-demo-petstore-j2ee5-ear/pom.xml +++ b/vasc-demo/vasc-demo-petstore-j2ee5/vasc-demo-petstore-j2ee5-ear/pom.xml @@ -5,9 +5,7 @@ net.forwardfire.vasc.demo 0.4.1-SNAPSHOT - net.forwardfire.vasc.demo vasc-demo-petstore-j2ee5-ear - 0.4.1-SNAPSHOT vasc-demo-petstore-j2ee5-ear vasc-demo-petstore-j2ee5-ear \ No newline at end of file diff --git a/vasc-demo/vasc-demo-petstore-j2ee5/vasc-demo-petstore-j2ee5-war/pom.xml b/vasc-demo/vasc-demo-petstore-j2ee5/vasc-demo-petstore-j2ee5-war/pom.xml index 543b974..e998b94 100644 --- a/vasc-demo/vasc-demo-petstore-j2ee5/vasc-demo-petstore-j2ee5-war/pom.xml +++ b/vasc-demo/vasc-demo-petstore-j2ee5/vasc-demo-petstore-j2ee5-war/pom.xml @@ -5,9 +5,7 @@ net.forwardfire.vasc.demo 0.4.1-SNAPSHOT - net.forwardfire.vasc.demos vasc-demo-petstore-j2ee5-war - 0.4.1-SNAPSHOT vasc-demo-petstore-j2ee5-war vasc-demo-petstore-j2ee5-war \ No newline at end of file diff --git a/vasc-demo/vasc-demo-server/vasc-demo-server-core/pom.xml b/vasc-demo/vasc-demo-server/vasc-demo-server-core/pom.xml index b11c701..2f2c6c6 100644 --- a/vasc-demo/vasc-demo-server/vasc-demo-server-core/pom.xml +++ b/vasc-demo/vasc-demo-server/vasc-demo-server-core/pom.xml @@ -9,6 +9,46 @@ vasc-demo-server-core vasc-demo-server-core vasc-server-tech-core + + + + org.apache.maven.plugins + maven-antrun-plugin + ${maven-antrun-plugin.version} + + + generate-version-class + generate-sources + + run + + + + + + package net.forwardfire.vasc.demo.server.core; + /** Automatically generated by ant. */ + public class VascTechDemoBuildInfoImpl implements VascTechDemoBuildInfo { + static public final String VERSION = "${project.version}"; + static public final String BUILD_DATE = "${maven.build.timestamp}"; + public String getVersion() { + return VERSION; + } + public String getBuildDate() { + return BUILD_DATE; + } + } + + + + ${project.build.directory}/generated-sources + + + + + + + org.x4o diff --git a/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/core/VascTechDemoBuildInfo.java b/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/core/VascTechDemoBuildInfo.java new file mode 100644 index 0000000..fc33e82 --- /dev/null +++ b/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/core/VascTechDemoBuildInfo.java @@ -0,0 +1,42 @@ +/* + * Copyright 2007-2012 forwardfire.net All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted provided + * that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list of conditions and the + * following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and + * the following disclaimer in the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.forwardfire.vasc.demo.server.core; + +/** + * VascTechDemoBuildInfo provides interfaces for build system so we have version and build date. + * + * @author Willem Cazander + * @version 1.0 Dec 1, 2012 + */ +public interface VascTechDemoBuildInfo { + + /** + * @return Returns the build version. + */ + String getVersion(); + + /** + * @return Returns the build date. + */ + String getBuildDate(); +} diff --git a/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/core/VascTechDemoStartup.java b/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/core/VascTechDemoStartup.java index dc5349a..6562fe3 100644 --- a/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/core/VascTechDemoStartup.java +++ b/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/core/VascTechDemoStartup.java @@ -25,6 +25,7 @@ package net.forwardfire.vasc.demo.server.core; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; +import java.util.Date; import java.util.logging.Handler; import java.util.logging.Logger; @@ -52,6 +53,7 @@ public class VascTechDemoStartup { private TomcatService tomcatService = null; private VascControllerService vascControllerService = null; private ServerGuiService swingGuiService = null; + private VascTechDemoBuildInfo buildInfo = null; static private VascTechDemoStartup instance = null; /** @@ -136,6 +138,30 @@ public class VascTechDemoStartup { logger.info("Logging is ready for application log;"); } + + private void setupBuildInfo() { + if (buildInfo!=null) { + return; + } + try { + Class infoClass = Class.forName(VascTechDemoBuildInfo.class.getPackage().getName()+"."+VascTechDemoBuildInfo.class.getSimpleName()+"Impl"); + buildInfo = (VascTechDemoBuildInfo)infoClass.newInstance(); + return; + } catch (Exception e) { + logger.warning("Could not load build info impl fallback to local one."); + } + buildInfo = new VascTechDemoBuildInfo() { + @Override + public String getVersion() { + return "0.0.0-dev"; + } + @Override + public String getBuildDate() { + return new Date().toString(); + } + }; + } + /** * Init all demo service beans. * @param argu @@ -147,6 +173,7 @@ public class VascTechDemoStartup { System.setProperty("java.security.auth.login.config", "file:conf/login.config"); setupAutoDir(); setupLogging(); + setupBuildInfo(); logger.info("VascTechDemo initializing ..."); databaseService = new DatabaseService(); tomcatService = new TomcatService(); @@ -239,4 +266,8 @@ public class VascTechDemoStartup { public ServerGuiService getSwingGuiService() { return swingGuiService; } + + public VascTechDemoBuildInfo getBuildInfo() { + return buildInfo; + } } diff --git a/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/ui/JStatusPanel.java b/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/ui/JStatusPanel.java index 0b87682..211370c 100644 --- a/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/ui/JStatusPanel.java +++ b/vasc-demo/vasc-demo-server/vasc-demo-server-core/src/main/java/net/forwardfire/vasc/demo/server/ui/JStatusPanel.java @@ -98,7 +98,7 @@ public class JStatusPanel extends JPanel implements ActionListener { statusPanel.add(new JLabel("vasc-demo-server-core")); statusPanel.add(new JLabel("Version:")); - statusPanel.add(new JLabel("0.X.X")); + statusPanel.add(new JLabel(VascTechDemoStartup.getInstance().getBuildInfo().getVersion())); statusPanel.add(new JLabel("Groups:")); statusPanel.add(infoVascGroups); diff --git a/vasc-frontend/vasc-frontend-cxf/vasc-frontend-cxf-server/pom.xml b/vasc-frontend/vasc-frontend-cxf/vasc-frontend-cxf-server/pom.xml index 46b12b9..a7362f3 100644 --- a/vasc-frontend/vasc-frontend-cxf/vasc-frontend-cxf-server/pom.xml +++ b/vasc-frontend/vasc-frontend-cxf/vasc-frontend-cxf-server/pom.xml @@ -10,42 +10,42 @@ vasc-frontend-cxf-server vasc-frontend-cxf-server - - net.forwardfire.vasc - vasc-core - ${project.version} - - - net.forwardfire.vasc - vasc-frontend-cxf-client - ${project.version} - - - org.apache.cxf - cxf-rt-transports-http - ${cxf-rt.version} - - - org.apache.cxf - cxf-rt-databinding-jaxb - ${cxf-rt.version} - - - org.apache.cxf - cxf-rt-frontend-jaxws - ${cxf-rt.version} - - - org.apache.cxf - cxf-rt-frontend-jaxrs - ${cxf-rt.version} - - javax.servlet - servlet-api - ${servlet-api.version} - jar - provided + net.forwardfire.vasc + vasc-core + ${project.version} + + + net.forwardfire.vasc + vasc-frontend-cxf-client + ${project.version} + + + org.apache.cxf + cxf-rt-transports-http + ${cxf-rt.version} + + + org.apache.cxf + cxf-rt-databinding-jaxb + ${cxf-rt.version} + + + org.apache.cxf + cxf-rt-frontend-jaxws + ${cxf-rt.version} + + + org.apache.cxf + cxf-rt-frontend-jaxrs + ${cxf-rt.version} + + + javax.servlet + servlet-api + ${servlet-api.version} + jar + provided - \ No newline at end of file + diff --git a/vasc-frontend/vasc-frontend-swing/pom.xml b/vasc-frontend/vasc-frontend-swing/pom.xml index 688f9e2..4c855a7 100644 --- a/vasc-frontend/vasc-frontend-swing/pom.xml +++ b/vasc-frontend/vasc-frontend-swing/pom.xml @@ -9,35 +9,27 @@ vasc-frontend-swing vasc-frontend-swing - - net.forwardfire.vasc - vasc-core - ${project.version} - - - - - com.michaelbaranov - microba - ${microba.version} + net.forwardfire.vasc + vasc-core + ${project.version} - de.odysseus.juel - juel - ${juel.version} - test + com.michaelbaranov + microba + ${microba.version} - - net.forwardfire.vasc.test - vasc-test-frontend-data - ${project.version} - test + + de.odysseus.juel + juel + ${juel.version} + test + + + net.forwardfire.vasc.test + vasc-test-frontend-data + ${project.version} + test - \ No newline at end of file + diff --git a/vasc-frontend/vasc-frontend-swt/pom.xml b/vasc-frontend/vasc-frontend-swt/pom.xml index c59273a..83ff09c 100644 --- a/vasc-frontend/vasc-frontend-swt/pom.xml +++ b/vasc-frontend/vasc-frontend-swt/pom.xml @@ -5,16 +5,14 @@ net.forwardfire.vasc 0.4.1-SNAPSHOT - net.forwardfire.vasc vasc-frontend-swt - 0.4.1-SNAPSHOT vasc-frontend-swt vasc-frontend-swt - - net.forwardfire.vasc - vasc-core - ${project.version} + + net.forwardfire.vasc + vasc-core + ${project.version} - javax.servlet.jsp - jsp-api - ${jsp-api.version} - provided + org.x4o + x4o-core + ${x4o.version} + + + javax.servlet.jsp + jsp-api + ${jsp-api.version} + provided - \ No newline at end of file +