ant

How to get fully qualified hostname using Ant

落花浮王杯 提交于 2019-12-10 15:55:04
问题 I am using Ant as our setup script for our server, and we need to get the fully qualified name of our server. How can I get it using Ant, or is is possible in Ant? The fully qualified hostname is like: xxx.company.com 回答1: <exec executable="hostname" outputproperty="computer.hostname"/> will work on linux and windows, otherwise use the groovy solution from Marc O'Connor Also nslookup will work on linux and windows, if you need the fullhostname you have to parse for the entry after Name: in

Dojo 1.7 Build: Out of Memory Errors

坚强是说给别人听的谎言 提交于 2019-12-10 15:54:34
问题 After upgrading to Dojo 1.7.3, our ant build that was working flawlessly for years on previous versions of Dojo is now completely non-operational due to out of memory errors: [java] starting writing resources... [java] java.lang.OutOfMemoryError: GC overhead limit exceeded [java] at org.mozilla.javascript.Interpreter.getArgsArray(Interpreter.java:4623) [java] at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3335) [java] at org.mozilla.javascript.Interpreter.interpret

Is it correct or incorrect for a Java JAR to contain its own dependencies?

感情迁移 提交于 2019-12-10 15:49:10
问题 I guess this is a two-part question. I am trying to write my own Ant task ( MyFirstTask ) that can be used in other project's build.xml buildfiles. To do this, I need to compile and package my Ant task inside its own JAR. Because this Ant task that I have written is fairly complicated, it has about 20 dependencies (other JAR files), such as using XStream for OX-mapping, Guice for DI, etc. I am currently writing the package task in the build.xml file inside the MyFirstTask project (the

How to compile this code with Java 10, Ant and the Eclipse compiler?

自作多情 提交于 2019-12-10 15:28:36
问题 I am trying to compile this simple code using Java 10, Ant and the Eclipse compiler: import java.util.ArrayList; import javax.xml.bind.JAXBException; class Test { void foo() throws JAXBException { throw new JAXBException("hi there"); } void bar() { new ArrayList<String>(); } } This is the Ant file I am using: <project name="Java 10 test"> <target name="compile-javac" depends="clean, print-version-info"> <javac release="10" includeantruntime="false"> <src path="."/> <compilerarg value="--add

Ant immutable properties to mutable

自闭症网瘾萝莉.ら 提交于 2019-12-10 15:27:09
问题 i have a problem. I'm use antrun plugin for maven and do next: i have folder and subfolders(I do not know what are called sub-folders and their number) and i'm do archive for this subfolders with their name(subfolder name - "1", archive name - "1.acp"). <tasks> <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${settings.localRepository}/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar" /> <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${settings

How to do parallel processing in Unix Shell script?

孤者浪人 提交于 2019-12-10 14:59:02
问题 I have a shell script that transfers a build.xml file to a remote unix machine ( devrsp02 ) and executes the ANT task wldeploy on that machine ( devrsp02 ). Now, this wldeploy task takes around 15 minutes to complete and while this is running, the last line at the unix console is - "task {some digit} initialized". Once this task is complete, we get a "task Completed" msg and the next task in the script is executed only after that. But sometimes, there might be a problem with the weblogic

What‘s the difference between ant's property value and property location

落花浮王杯 提交于 2019-12-10 14:57:59
问题 Ant's config file--build.xml has the property element. And according to the offical-doc,the property has the attributes-value and location. But I don't understand why we need location? Can I set the path as a value in property? Then no need for location. 回答1: location is used if you want to do relative paths. notice in this example, they use location. no absolute path needed. http://ant.apache.org/manual/using.html either location or value (mutually exclusive) can be used if you're doing

How to build a Lotus Domino Database using SVN and Ant, Maven or Gradle

岁酱吖の 提交于 2019-12-10 14:56:23
问题 I'm having a database in Domino Designer, which is under Source-Control. Now i want to automatically build this database on a build-server. Does anybody know, how to create an ant-script or maven or gradle, whatever is working, to get a valid database automatically from the build-server or commandline? Thanks in advance 回答1: This presentation by an IBMer given during a user group meeting in late 2012 mentions (page 30) the future possibility of doing command line builds. You might still need

Package and run a Java application with spring dependencies

让人想犯罪 __ 提交于 2019-12-10 14:43:13
问题 I built a stand-alone Java application that has a bunch of dependencies (Apache Commons libs, etc) as well as a dependency on the Spring framework, which in turn has a bunch of dependencies. I built this in Eclipse, where it runs fine. Now I need to deploy it to production and so I'm trying to figure out the best way to package it with all dependencies and also how to even invoke the thing (it will be invoked from the command line). The brute-force way would be to export my project as a jar,

[ant debug] error:Unable to resolve project tar...

。_饼干妹妹 提交于 2019-12-10 14:05:35
例如 ant debug/release 时报错: Unable to resolve project target 'android-16' 问题解释 :由于此应用在此前的开发时 它的最高android平台被定为 android-16 而此次开发所用的平台为 android-18 所以ant debug/release 时由于找不到合适版本而不能正确执行 解决办法 :修改AndroidManifest.xml的最后一行 将16 ——>18 修改project.properties 的最后一行 将16 ——>18 问题解决 可以ant debug/release 了 来源: oschina 链接: https://my.oschina.net/u/923930/blog/160361