Commit f9682788 authored by Aghiles's avatar Aghiles
Browse files

Merge branch 'master' of https://gitlab.utc.fr/crozatst/hdoc

parents 29e44dd7 4c930410
<project name="hdoc_to_elasticsearch" default="clean">
<!-- -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="lib/ant-contrib-0.3.jar"/>
</classpath>
</taskdef>
<property file="build.properties"/>
<!-- Parcours la liste des fichiers pour les transformer -->
<target name="targetAllFiles">
<delete>
<fileset dir="${outputPath}">
<include name="*.json"/>
</fileset>
</delete>
<!-- Copy files in opale_to_hdoc input dir -->
<copy todir="${inputOpaleToHdoc}">
<fileset dir="${inputPath}"/>
</copy>
<!-- Use ant transo opale_to_hdoc -->
<ant antfile="../opale_to_hdoc/opale_to_hdoc.ant" inheritAll="false"/>
<!-- Copy files in hdoc_to_elasticSearch input dir -->
<copy todir="${inputHdocToElasticSearch}">
<fileset dir="${outputOpaleToHdoc}"/>
</copy>
<!-- Use ant transo opale_to_hdoc -->
<ant antfile="../hdoc_to_elasticSearch/hdoc_to_elasticsearch.ant" inheritAll="false"/>
<copy todir="${outputPath}" >
<fileset dir="${outputHdocToElasticSearch}"/>
</copy>
</target>
<!-- Clear tmp files -->
<target name="clean" depends="targetAllFiles">
<echo message="Clean files" />
<!-- -->
<delete includeemptydirs="true" verbose="true">
<fileset dir="${inputOpaleToHdoc}">
<include name="*.scar"/>
</fileset>
</delete>
<delete includeemptydirs="true" verbose="true">
<fileset dir="${outputOpaleToHdoc}">
<include name="*.hdoc"/>
</fileset>
</delete>
<delete includeemptydirs="true" verbose="true">
<fileset dir="${inputHdocToElasticSearch}">
<include name="*.hdoc"/>
</fileset>
</delete>
<delete includeemptydirs="true" verbose="true">
<fileset dir="${outputHdocToElasticSearch}">
<include name="*.json"/>
</fileset>
</delete>
<echo message="Clean end" />
</target>
</project>
@echo off
set lib=lib
set ant=opale_to_elasticsearch.ant
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
pause
REM start /MIN java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
#!/bin/sh
lib="lib"
ant="opale_to_elasticsearch.ant"
antparam="-Dprogram.param=$1"
#Recherche de java et controle que se soit une version SUN
vJavaCmd="java"
xCheckJava () {
vInputVarName=\$"$1"
vInputVarVal=`eval "expr \"$vInputVarName\" "`
if [ -z "$vInputVarVal" ];then
eval "$1=false"
return
fi
vSunJavaFound=`$vInputVarVal -version 2>&1 | grep -Eo -m 1 "(HotSpot)|(OpenJDK)"`
if [ "$vSunJavaFound" != "HotSpot" ] && [ "$vSunJavaFound" != "OpenJDK" ] ; then
eval "$1=false"
return
fi
}
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
vJavaCmd="$JAVA_HOME/bin/java"
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
echo "ERREUR: JRE de SUN introuvable. Veuillez déclarer la variable d'environnement JAVA_HOME."
exit 1
fi
fi
#Lancer la commande
scJarList="$lib/*"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam
......@@ -58,6 +58,8 @@
<value>explanation</value>
<value>explanation-choice-correct</value>
<value>explanation-choice-incorrect</value>
<value>openQuestion</value>
<value>hint</value>
</choice>
</attribute>
</optional>
......
Supports Markdown
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