ant

Is there a function to convert an Ant-style glob pattern into a regex?

爱⌒轻易说出口 提交于 2019-12-10 06:31:04
问题 I know I can write one myself, but I was hoping I can just reuse an existing one. Ant-style globs are pretty much the same as normal file globs with the addition that '**' matches subdirectories. FWIW, my implementation is: public class AntGlobConverter { public static String convert(String globExpression) { StringBuilder result = new StringBuilder(); for (int i = 0; i != globExpression.length(); ++i) { final char c = globExpression.charAt(i); if (c == '?') { result.append('.'); } else if (c

Does Intellij IDEA support debugging a project built with ant?

我是研究僧i 提交于 2019-12-10 04:37:09
问题 This project is using Ant as its build system. Can I debug the project when I run it via Ant? 回答1: Ant is mainly used for building, not for running Java apps. But OK, I assume you're running your app using the ant Java task. Ant Java task If so, yes, you can do that by using remote debugging. Remote debugging a Java application In fact you can debug any Java app like that. Apps started through ant are still Java apps. 回答2: There is a specialized IDEA plugin for debugging ant scripts sources

What is the cause for the failure: “jarsigner: attempt to rename {file} to {file}.org failed” when signing jars with ant?

寵の児 提交于 2019-12-10 04:35:43
问题 I am getting the error: [signjar] jarsigner: attempt to rename C:\workspace\line_editor\lib\icon.jar to C:\workspace\line_editor\lib\icon.jar.orig failed when attempting to self sign a set of jars with ant inside Eclipse. The ant build has worked fine in this project and similar code in other projects. I made some small changes to code and tried to rebuild and keep getting this error. Here is the related ant target: <target name="sign" depends="jar" description="Signs Jars"> <genkey keystore=

build.xml to set date and time as file name

三世轮回 提交于 2019-12-10 04:26:49
问题 I want to set file name with date and time attached to it so I want to create file named as behat-20140913-195915.html however the example below sets the name as behat-yyyymmdd-hhiiss.html . Anyone know the solution to problem? I followed this example Note : These two don't work too: ${DSTAMP} ${TSTAMP} <?xml version="1.0" encoding="UTF-8"?> <project name="Sport" default="build-default" basedir="."> <tstamp> <format property="TODAY_MY" pattern="yyyymmdd-hhiiss" locale="en,UK" /> </tstamp>

Ant overwritting custom manifest file

☆樱花仙子☆ 提交于 2019-12-10 04:22:27
问题 I am creating a jar with Ant that also uses a custom manifest file. The build.xml file builds everything properly. However, when I check the manifest file in the jar, my properties are not there. It looks like it is being replaced with the default MANIFEST.MF file built by Ant. My build file is below: <?xml version="1.0" ?> <property name="src" location="src" /> <property name="build" location="build" /> <property name="dist" location="dist" /> <target name="clean"> <delete dir="${build}" />

java.lang.NoClassDefFoundError while starting tomcat 7 from Ant

你说的曾经没有我的故事 提交于 2019-12-10 04:06:46
问题 My goal is to start tomcat using Ant. Here is my script: <target name="tomcat-start"> <java jar="${tomcat.home}/bin/bootstrap.jar" fork="true" dir="${tomcat.home}"> <classpath> <fileset dir="${tomcat.home}/bin"> <include name="bootstrap.jar"/> <include name="tomcat-juli.jar"/> </fileset> </classpath> <jvmarg value="-Dcatalina.home=${tomcat.home}"/> </java> </target> After script execution I receive this output: java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory at org.apache

do not use com.sun.xml.internal.*?

牧云@^-^@ 提交于 2019-12-10 03:26:32
问题 Is this statement true: com.sun.xml.internal package is an internal package as the name suggestes. Users should not write code that depends on internal JDK implementation classes. Such classes are internal implementation details of the JDK and subject to change without notice One of my colleagues used one of the classes in his code, which caused javac task in Ant fail to compile our project as the compiler couldn't find the class. Answer from Sun/Oracle says that this is expected behavior of

ant: how to compare contents of two files

别说谁变了你拦得住时间么 提交于 2019-12-10 03:09:32
问题 I want to compare the contents of two files (say file1.txt,file2.txt) using ANT. if files content are same then it should set some 'property' to true, if contents are not same then it should set the 'property' as false. Can anyone suggest me any ANT task that can do this. Thanks in advance. 回答1: You can use something like: <condition property="property" value="true"> <filesmatch file1="file1" file2="file2"/> </condition> This will set the property only if the files are the same. You can then

detecting build configuration (debug or release) within ant script

*爱你&永不变心* 提交于 2019-12-10 03:06:20
问题 I have an ant script that does what it needs to do, but I need to set a few property values based on whether I'm running release or debug. How do I do this? If it makes a difference, my ant script runs some custom utility tasks before performing android build. To answer my own question: The properties to look for are " build.mode.release " and " build.mode.debug ", however there IS a caveat ... if your manifest has debuggable="true" , the system REVERTS to debug mode with a slight 'short

How can I change property values in a file using Ant?

情到浓时终转凉″ 提交于 2019-12-10 02:47:01
问题 Example input: SERVER_NAME=server1 PROFILE_NAME=profile1 ... Example output: SERVER_NAME=server3 PROFILE_NAME=profile3 ... This file will use in applicationContext.xml . I've tried <copy file="${web.dir}/jexamples.css_tpl" tofile="${web.dir}/jexamples.css" > <filterchain> <replacetokens> <token key="SERVER_NAME" value="server2"/> <token key="PROFILE_NAME" value="profi"/> </replacetokens> </filterchain> </copy> but it doesn't work. 回答1: Your filterchain is ok, but your source file should look