Statistics
| Revision:

root / tmp / org.txm.groovy.core / src / groovy / org / txm / scripts / clix / testPrintenv.groovy @ 1488

History | View | Annotate | Download (2.6 kB)

1 321 mdecorde
/**
2 321 mdecorde
 * Main.
3 321 mdecorde
 *
4 321 mdecorde
 * @param args the args
5 321 mdecorde
 */
6 321 mdecorde
// Copyright © 2010-2013 ENS de Lyon.
7 321 mdecorde
// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
8 321 mdecorde
// Lyon 2, University of Franche-Comté, University of Nice
9 321 mdecorde
// Sophia Antipolis, University of Paris 3.
10 321 mdecorde
//
11 321 mdecorde
// The TXM platform is free software: you can redistribute it
12 321 mdecorde
// and/or modify it under the terms of the GNU General Public
13 321 mdecorde
// License as published by the Free Software Foundation,
14 321 mdecorde
// either version 2 of the License, or (at your option) any
15 321 mdecorde
// later version.
16 321 mdecorde
//
17 321 mdecorde
// The TXM platform is distributed in the hope that it will be
18 321 mdecorde
// useful, but WITHOUT ANY WARRANTY; without even the implied
19 321 mdecorde
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20 321 mdecorde
// PURPOSE. See the GNU General Public License for more
21 321 mdecorde
// details.
22 321 mdecorde
//
23 321 mdecorde
// You should have received a copy of the GNU General
24 321 mdecorde
// Public License along with the TXM platform. If not, see
25 321 mdecorde
// http://www.gnu.org/licenses.
26 321 mdecorde
27 321 mdecorde
//
28 321 mdecorde
// This file is part of the TXM platform.
29 321 mdecorde
//
30 321 mdecorde
// The TXM platform is free software: you can redistribute it and/or modif y
31 321 mdecorde
// it under the terms of the GNU General Public License as published by
32 321 mdecorde
// the Free Software Foundation, either version 3 of the License, or
33 321 mdecorde
// (at your option) any later version.
34 321 mdecorde
//
35 321 mdecorde
// The TXM platform is distributed in the hope that it will be useful,
36 321 mdecorde
// but WITHOUT ANY WARRANTY; without even the implied warranty of
37 321 mdecorde
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38 321 mdecorde
// GNU General Public License for more details.
39 321 mdecorde
//
40 321 mdecorde
// You should have received a copy of the GNU General Public License
41 321 mdecorde
// along with the TXM platform.  If not, see <http://www.gnu.org/licenses/>.
42 321 mdecorde
//
43 321 mdecorde
//
44 321 mdecorde
//
45 479 mdecorde
// $LastChangedDate: 2013-05-06 17:38:43 +0200 (lun. 06 mai 2013) $
46 321 mdecorde
// $LastChangedRevision: 2386 $
47 321 mdecorde
// $LastChangedBy: mdecorde $
48 321 mdecorde
//
49 1000 mdecorde
package org.txm.scripts.scripts.clix;
50 321 mdecorde
import java.io.File;
51 321 mdecorde
import java.util.Properties;
52 321 mdecorde
53 1000 mdecorde
import org.txm.importer.scripts.filters.Filter;
54 321 mdecorde
import org.txm.utils.ProcessBuilderBuilder;
55 321 mdecorde
import groovy.lang.GroovyClassLoader;
56 321 mdecorde
57 321 mdecorde
import org.txm.Toolbox
58 321 mdecorde
/**
59 321 mdecorde
 * test Printenv wrapper
60 321 mdecorde
 */
61 321 mdecorde
//ProcessBuilderBuilder.build(new File("src/groovy/org/txm/scripts/printenv-wrapper-definition.xml"), new File("src/groovy/org/textometrie/scripts/Printenv.groovy"));
62 321 mdecorde
63 321 mdecorde
// TODO: Auto-generated Javadoc
64 321 mdecorde
/* (non-Javadoc)
65 321 mdecorde
 * @see groovy.lang.Script#run()
66 321 mdecorde
 */
67 321 mdecorde
GroovyClassLoader gcl = new GroovyClassLoader();
68 321 mdecorde
69 321 mdecorde
def aScript
70 321 mdecorde
71 321 mdecorde
try
72 321 mdecorde
{
73 321 mdecorde
        gcl.addClasspath(".");
74 321 mdecorde
        Class clazz = gcl.parseClass(new File("src/groovy/org/txm/scripts/Printenv.groovy"));
75 321 mdecorde
        aScript = clazz.newInstance("C:/unx/usr/local/wbin/");
76 321 mdecorde
77 321 mdecorde
}
78 321 mdecorde
catch(Exception e)
79 321 mdecorde
{        System.err.println(e);
80 321 mdecorde
        return null;
81 321 mdecorde
}
82 321 mdecorde
83 321 mdecorde
aScript.printenvexe()