Commit a85e2678 by Juan Carlos Yupanqui

[ADD] Cambios generales, arreglo de bugs

parent 7c53ea24
......@@ -999,6 +999,7 @@ exists or setup the property manually. For example like this:
<target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
<copyfiles files="${file.reference.activation.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.mysql-connector-java-3.1.14-bin.jar-1}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.java-dotenv-3.1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.json-20171018.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
<mkdir dir="${build.web.dir}/META-INF"/>
<manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
......@@ -1006,6 +1007,7 @@ exists or setup the property manually. For example like this:
<target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
<copyfiles files="${file.reference.activation.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.mysql-connector-java-3.1.14-bin.jar-1}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.java-dotenv-3.1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.json-20171018.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
</target>
<target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
......
build.xml.data.CRC32=f9674732
build.xml.data.CRC32=70a6affc
build.xml.script.CRC32=5a966c0c
build.xml.stylesheet.CRC32=651128d4@1.77.1.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=f9674732
nbproject/build-impl.xml.script.CRC32=4bf6096c
nbproject/build-impl.xml.data.CRC32=70a6affc
nbproject/build-impl.xml.script.CRC32=9c299a49
nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1
......@@ -29,6 +29,7 @@ endorsed.classpath=\
${libs.javaee-endorsed-api-6.0.classpath}
excludes=
file.reference.activation.jar=D:\\LIBRERIAS\\activation.jar
file.reference.java-dotenv-3.1.1.jar=C:\\Users\\sistem17user\\Desktop\\Juan Carlos Yupanqui Lozano\\Libreria\\LIBRERIAS 2\\DotEnv\\java-dotenv-3.1.1.jar
file.reference.json-20171018.jar=D:\\LIBRERIAS\\json-20171018.jar
file.reference.mysql-connector-java-3.1.14-bin.jar-1=D:\\LIBRERIAS\\mysql-connector-java-3.1.14-bin.jar
includes=**
......@@ -47,6 +48,7 @@ jar.compress=false
javac.classpath=\
${file.reference.activation.jar}:\
${file.reference.mysql-connector-java-3.1.14-bin.jar-1}:\
${file.reference.java-dotenv-3.1.1.jar}:\
${file.reference.json-20171018.jar}
# Space-separated list of extra javac options
javac.compilerargs=
......
......@@ -15,6 +15,10 @@
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library dirs="200">
<file>${file.reference.java-dotenv-3.1.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library dirs="200">
<file>${file.reference.json-20171018.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package pe.siso.horario.utilities;
import java.io.File;
import java.util.Locale;
/**
*
* @author sistem08user
*/
public final class OsUtils {
/**
* types of Operating Systems
*/
public enum OSType {
Windows, MacOS, Linux, Other
};
// cached result of OS detection
protected static String detectedOS;
/**
* detect the operating system from the os.name System property and cache the
* result
*
* @return - the operating system detected
*/
public static String getOperatingSysstemType() {
if (detectedOS == null) {
String OS = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH);
if ((OS.contains("mac")) || (OS.contains("darwin"))) {
detectedOS = "MacOS";
} else if (OS.contains("win")) {
detectedOS = "Windows";
} else if (OS.contains("nux")) {
detectedOS = "Linux";
} else {
detectedOS = "Other";
}
}
return detectedOS;
}
public static String getPathOfVouchersDependingOS() {
String path = "";
String detectedOs = OsUtils.getOperatingSysstemType();
switch (detectedOs) {
case "MacOS":
path = "";
break;
case "Windows":
path = "C:/AppServ/www/comprobantes";
break;
case "Linux":
path = "/var/www/html/comprobantes";
break;
}
return path;
}
public static String getJSONDependingOS() {
String path = "";
String detectedOs = OsUtils.getOperatingSysstemType();
switch (detectedOs) {
case "MacOS":
path = "";
break;
case "Windows":
path = "C:/AppServ/www/comprobantes-log";
break;
case "Linux":
path = "/var/www/html/comprobantes-log";
break;
}
return path;
}
public static String getDotEnvPath(String projectName) {
String path = "";
String detectedOs = OsUtils.getOperatingSysstemType();
switch (detectedOs) {
case "MacOS":
path = "";
break;
case "Windows":
char[] alphabet = "abcdefghijklmnopqrstuvwxyz".toCharArray();
for (char letter : alphabet) {
path = letter + ":/dotenv/" + projectName;
File directory = new File(path);
if (directory.exists()) {
break;
}
}
break;
case "Linux":
path = "/opt/dotenv/" + projectName;
break;
}
return path;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment