Commit a99a2367 authored by acq1305's avatar acq1305
Browse files

pasando url del archivo por argumento para el servicio

parent c9889331
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal> <goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals> </goals>
<properties> <properties>
<exec.args>-classpath %classpath bo.gob.softwarelibre.firmadorestatal.vista.FormServidor</exec.args> <exec.args>-classpath %classpath bo.gob.softwarelibre.firmadorestatal.vista.Run "config/token.cfg"</exec.args>
<exec.executable>java</exec.executable> <exec.executable>java</exec.executable>
</properties> </properties>
</action> </action>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal> <goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals> </goals>
<properties> <properties>
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath bo.gob.softwarelibre.firmadorestatal.vista.FormServidor</exec.args> <exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath bo.gob.softwarelibre.firmadorestatal.vista.Run "config/token.cfg"</exec.args>
<exec.executable>java</exec.executable> <exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen> <jpda.listen>true</jpda.listen>
</properties> </properties>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal> <goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals> </goals>
<properties> <properties>
<exec.args>-classpath %classpath bo.gob.softwarelibre.firmadorestatal.vista.FormServidor</exec.args> <exec.args>-classpath %classpath bo.gob.softwarelibre.firmadorestatal.vista.Run "config/token.cfg"</exec.args>
<exec.executable>java</exec.executable> <exec.executable>java</exec.executable>
</properties> </properties>
</action> </action>
......
...@@ -30,7 +30,7 @@ import javax.swing.JTextField; ...@@ -30,7 +30,7 @@ import javax.swing.JTextField;
import javax.swing.filechooser.FileNameExtensionFilter; import javax.swing.filechooser.FileNameExtensionFilter;
/** /**
* Formulario Vista * Formulario Vista con todas las opciones del servicio Rest del Firmador Servidor
* *
* @author: Angel Céspedes Quiroz * @author: Angel Céspedes Quiroz
* @Skype: acq1305 * @Skype: acq1305
......
...@@ -21,8 +21,9 @@ import sun.security.pkcs11.wrapper.PKCS11Exception; ...@@ -21,8 +21,9 @@ import sun.security.pkcs11.wrapper.PKCS11Exception;
public class Run { public class Run {
/** /**
* Main para iniciar el servidor REST como demonio * Main para iniciar el servidor REST como demonio args[0]= "config/token.cfg"
* * cmd windows o terminal linux -> java -jar FirmadorServidor.jar "config/token.cfg"
*
* @param args * @param args
* @throws IOException * @throws IOException
* @throws PKCS11Exception * @throws PKCS11Exception
...@@ -32,7 +33,7 @@ public class Run { ...@@ -32,7 +33,7 @@ public class Run {
try { try {
GestorSlot gestorSlot; GestorSlot gestorSlot;
gestorSlot = GestorSlot.getInstance(); gestorSlot = GestorSlot.getInstance();
gestorSlot.adicionarProveedor(proveedores(new File("config/token.cfg").getAbsolutePath())); gestorSlot.adicionarProveedor(proveedores(new File(args[0]).getAbsolutePath()));
ServidorRest rest = new ServidorRest(); ServidorRest rest = new ServidorRest();
rest.iniciar(); rest.iniciar();
} catch (Exception e) { } catch (Exception e) {
......
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