From bf94f1abbcdee77d6e13483ae122f25054692af4 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 21 Sep 2016 14:27:25 +0200 Subject: [PATCH] Refactored build. --- .classpath | 5 - buildjar.xml => build-libjar.xml | 98 ++++++++++--------- build.num | 4 +- build.xml | 10 +- buildandgit.xml | 8 +- .../kiss4web/EnvironmentInformation.java | 65 ------------ 6 files changed, 68 insertions(+), 122 deletions(-) rename buildjar.xml => build-libjar.xml (65%) diff --git a/.classpath b/.classpath index 26b3c42..b8a5386 100644 --- a/.classpath +++ b/.classpath @@ -18,11 +18,6 @@ - - - - - diff --git a/buildjar.xml b/build-libjar.xml similarity index 65% rename from buildjar.xml rename to build-libjar.xml index d0303c1..616711f 100644 --- a/buildjar.xml +++ b/build-libjar.xml @@ -1,7 +1,7 @@ - + - + @@ -25,23 +25,31 @@ - Type ant -p + + + + + - + - + + - + + + + @@ -50,11 +58,13 @@ + + + - - + @@ -77,25 +87,23 @@ - - - + + - - - - + + + - + @@ -103,7 +111,6 @@ - @@ -115,37 +122,40 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.num b/build.num index 3f37c67..7105352 100644 --- a/build.num +++ b/build.num @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Wed Feb 05 00:08:42 CET 2014 -build.number=0 +#Wed Sep 21 14:25:05 CEST 2016 +build.number=1 diff --git a/build.xml b/build.xml index 54b4330..00319d5 100644 --- a/build.xml +++ b/build.xml @@ -1,5 +1,9 @@ - - - + + + + + + + diff --git a/buildandgit.xml b/buildandgit.xml index 8fc5227..c3fff70 100644 --- a/buildandgit.xml +++ b/buildandgit.xml @@ -1,5 +1,7 @@ - - - + + + + + diff --git a/src/fr/devinsy/kiss4web/EnvironmentInformation.java b/src/fr/devinsy/kiss4web/EnvironmentInformation.java index e5eb0fc..3e1572a 100644 --- a/src/fr/devinsy/kiss4web/EnvironmentInformation.java +++ b/src/fr/devinsy/kiss4web/EnvironmentInformation.java @@ -33,7 +33,6 @@ */ package fr.devinsy.kiss4web; -import javax.mail.Session; import javax.naming.ConfigurationException; import javax.naming.Context; import javax.naming.InitialContext; @@ -43,7 +42,6 @@ import org.apache.commons.lang3.exception.ExceptionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import fr.devinsy.util.strings.StringList; import fr.devinsy.util.strings.StringListUtils; /** @@ -112,69 +110,6 @@ public class EnvironmentInformation } } - /** - * - * @param name - * @return - */ - public String getSessionToString(final Context environment, final String name) - { - String result; - - try - { - if (environment == null) - { - result = null; - } - else - { - Session session = (Session) environment.lookup(name); - - StringList buffer = new StringList(); - for (Object key : session.getProperties().keySet().toArray()) - { - buffer.append((String) key).append("=").append(session.getProperties().getProperty((String) key)).append(","); - } - buffer.removeLast(); - result = buffer.toString(); - } - } - catch (NamingException exception) - { - logger.info("Error: {}", exception.getMessage()); - result = null; - } - - // - return result; - } - - /** - * - * @param name - * @return - */ - public String getSessionToString(final String name) - { - String result; - - try - { - Context initialContext = new InitialContext(); - - Context environment = (Context) initialContext.lookup("java:comp/env"); - result = getSessionToString(environment, name); - } - catch (NamingException exception) - { - logger.info("Error: {}", exception.getMessage()); - result = null; - } - - return result; - } - /** * * @return