ant

Ant xmltask adding a blank xmlns=“”

▼魔方 西西 提交于 2021-02-19 08:41:33
问题 Below is the complete ant target which I am running to insert the driver to my wildfly standalone.xml: <target name="xmlrewrite" > <!--Driver--> <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/> <xmltask source="standalone.xml" dest="standalone.xml" report="true"> <copy path="//driver[@module='com.oracle.ojdbc6']/text()" property="modelexists"/> <insert path="*[local-name()='server']/*[local-name()='profile']/*[local-name()='subsystem'][3]/*[local-name()=

Ant Junit tests are running much slower via ant than via IDE - what to look at?

岁酱吖の 提交于 2021-02-18 21:17:06
问题 I am running my junit tests via ant and they are running substantially slower than via the IDE. My ant call is: <junit fork="yes" forkmode="once" printsummary="off"> <classpath refid="test.classpath"/> <formatter type="brief" usefile="false"/> <batchtest todir="${test.results.dir}/xml"> <formatter type="xml"/> <fileset dir="src" includes="**/*Test.java" /> </batchtest> </junit> The same test that runs in near instantaneously in my IDE (0.067s) takes 4.632s when run through Ant. In the past, I

How can I use ant <exec> to execute commands on linux?

房东的猫 提交于 2021-02-18 20:42:05
问题 I would like to use ant to exectue a command like below: <exec executable="echo ptc@123 | sudo -S /app/Windchill_10.0/Apache/bin/apachectl -k stop"> </exec> But it replies an error say The ' characters around the executable and arguments are not part of the command. The background is: I want to use ant to stop the apache server but it doesn't installed by the same user I run the command. Anyone could help or give me some clues? Thanks in advance 回答1: Ant's <exec> task uses Java's Process

Set target java version when build OpenCV with brew

删除回忆录丶 提交于 2021-02-11 17:27:27
问题 I'm using brew to build OpenCV with java support following this tutorial. After built successful I got the error class file has wrong version 57.0, should be 52.0 when using. I'm using OpenJDK 8, how can I target the build to this version. Thank you. 回答1: Found the answer, put the extra -DOPENCV_JAVA_TARGET_VERSION=1.8 args to cmake in brew formula. 来源: https://stackoverflow.com/questions/62115757/set-target-java-version-when-build-opencv-with-brew

Docker execute ant script after tomcat starts?

陌路散爱 提交于 2021-02-11 08:56:10
问题 Dockerfile works correctly for tomcat. After tomcat starts, I have to trigger ant scripts. catalina.sh is started from a separate run.sh file. So, Dockerfile has CMD ["/tmp/run.sh"] The run.sh file has below lines: catalina.sh run antscript Tomcat starts but ant scripts are not called. I also tried other possibilities like: catalina.sh run && antscripts tomcat starts but antscripts are not triggered Is there a way that I can call the ant scripts automatically after tomcat starts? I dont want

Ant unable to launch, giving a main class error

放肆的年华 提交于 2021-02-09 19:06:28
问题 I'm running Elementary OS (Ubuntu 12 based), and I'm having issues running apache ant. It was working earlier before a restart, so I'm not sure what would've changed. I've defined environment variables in /etc/environment as follows: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$ANT_HOME/bin" JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk-i386" ANT_HOME="/opt/ant" ANT_OPTS="-Xms256M -Xmx512M" So my Java and Ant environment variables should be set. I'm trying to

Ant unable to launch, giving a main class error

偶尔善良 提交于 2021-02-09 19:04:33
问题 I'm running Elementary OS (Ubuntu 12 based), and I'm having issues running apache ant. It was working earlier before a restart, so I'm not sure what would've changed. I've defined environment variables in /etc/environment as follows: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$ANT_HOME/bin" JAVA_HOME="/usr/lib/jvm/java-1.7.0-openjdk-i386" ANT_HOME="/opt/ant" ANT_OPTS="-Xms256M -Xmx512M" So my Java and Ant environment variables should be set. I'm trying to

eclipse external tools configurations -> referenced library in classpath does not exist: org.eclipse.swt

拟墨画扇 提交于 2021-02-08 15:45:48
问题 After updating to the latest eclipse mars release Version: Mars Release Candidate 1 (4.5.0RC1) Build id: 20150521-1252 I am not able to start any Ant Script. It always results in the following error: First I checked if the path is really correct, and made sure that the specific jar org.eclipse.swt.win32.win32.x86_64_3.104.0.v20150513-1901.jar exists at the given location, which it does. After some digging I noticed the following within the external tools configurations: Somehow I think

How to set strings.xml values at build time?

╄→гoц情女王★ 提交于 2021-02-08 07:33:25
问题 I'm building my Android application with Ant, and would like to set one of the values in my strings.xml at build time. For example, I could use <string name="app_name">MyApp-DEBUG</string> with a debug build, or I could use <string name="app_name">MyApp<string> for a release build. Is this possible? 回答1: There are two tasks in Ant that can help: First is the <replace>. You give it a file name that contains parameters that can be replaced, and you give the <replace> task the values for those

ant + yuicompressor path error

偶尔善良 提交于 2021-02-07 12:47:29
问题 I've got a file in C:\Bin\test.js that I would like to compress and have renamed test-min.js my ant build.xml looks like this: <property name="temp.dir" value="C:\Bin\"/> <apply executable="java" parallel="false" dest="${temp.dir}"> <fileset dir="${temp.dir}" includes="test.js"/> <arg line="-jar"/> <arg path="${yui.dir}"/> <srcfile/> <arg line="-o"/> <mapper type="glob" from="*.js" to="*-min.js"/> <targetfile/> </apply> I get the following Java error: [apply] java.io.FileNotFoundException: