ant

Ant : Passing username and password to exec

只谈情不闲聊 提交于 2019-12-12 04:31:51
问题 <exec dir="." executable="osc" failonerror="true" failifexecutionfails="true"> <arg line="-A ${obs.apiurl}/> </exec> Ant executes the following osc which requires user to enter usename and password if user runs the osc command for the first time. According to ant's documentation, any user input in exec task should end with EOF(-1). So, how to pass username and password to the executable. 回答1: <input message="Username : " addproperty="account"> </input> <exec dir="." executable="/bin/sh"

I need help figuring out why Ant is giving me this error messages(setting up Java Pet Store)?

ⅰ亾dé卋堺 提交于 2019-12-12 04:31:45
问题 I have no idea where ContainerBaCommand is coming from, but here's my error: I first had to add javax.jar (which has the servlet ) class into the C:\JEE6SDKglassfish3\glassfish\lib\endorsed directory, and it gave me a new error, here: Buildfile: C:\petstore~svn\trunk\ws\apps\petstore\build.xml check: tools: -pre-deploy: deploy: [exec] Deprecated syntax, instead use: [exec] asadmin --user admin --passwordfile c:/JEE6SDKglassfish3/glassfish/samples/bp-project/passwordfile --host localhost -

How to make Proguard to obfuscate jars within a jar file

巧了我就是萌 提交于 2019-12-12 04:25:40
问题 I have a run-able java jar file let's call it masterProgram.jar . Inside this masterProgram.jar if I extract it using 7Zip or WinRAR there are other jars, lets call it lib1.jar, lib2.jar . Proguard managed to obfuscated the master jar, but when I look-inside the lib jars are not. and because of this the program (masterProgram.jar) breaks at a certain point. I also already set overloadaggressively option in my condig. I'm calling the proguard.jar through an ant build.xml. and here is my config

Maven Ant SCP error

岁酱吖の 提交于 2019-12-12 04:25:37
问题 when I run a "maven-antrun-plugin" (maven 3.0.3) with the ant-command: <scp /> I get: Problem: failed to create task or type scp [ERROR] Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found. I checked in my $ANT_HOME/lib and the jar is there (ant-jsch.jar). What's the problem? BTW I'm using ubuntu 11.10. Ant is downloaded from the website (as from the ubuntu's repository I got the same problem) 回答1: Did you forget to set the task definition <taskdef name="scp"

ivy jar located in my dep lib

拟墨画扇 提交于 2019-12-12 04:16:59
问题 how can I tell ant to find Ivy's jar in my own lib? ant just kept looking at it's home folder even when I've explicitly told it to find the jar somewhere else. 回答1: You can place Ivy binaries in some folder inside you project folder. For example, in my case, it's etc/build/. I put where ivy.jar and jsch.jar. After that provide the correct namespace in project defenfition and load Ivy. <project name="somename" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant"> <target name="ivy-load"> <path id

How to develope a method to substitute repetitive code block

浪尽此生 提交于 2019-12-12 04:16:56
问题 I am new in ant, so I wasn't able to find an approach to make my buld file a bit more elegant. I believe there is an approach to substitute repetitive block of code into my build. So here is build file: <project basedir="../../../" name="do-report" default="zip-all"> <xmlproperty keeproot="false" file="implementation/xml/ant/properties.xml"/> <!-- --> <taskdef resource="net/sf/antcontrib/antcontrib.properties"> <classpath> <pathelement location="${infrastructure-base-dir}/apache-ant-1.9.6/lib

classpath and Ant builds

旧街凉风 提交于 2019-12-12 04:12:37
问题 The ant compile target below compiles all .java files in any of the src folders specified using a <src path="..."/> tag. You can see that a number of items are added to the classpath using <classpath refid=...> tags. <target name="compile"> <echo message="${ant.project.name}: ${ant.file}"/> <deps-load-path conf="core" pathid="core.ivy.classpath" /> <deps-load-path conf="test" pathid="test.ivy.classpath" /> <javac debug="true" includeantruntime="false" debuglevel="source,lines,vars" destdir="$

Running Jmeter multiple independent jmx tests in parallel

Deadly 提交于 2019-12-12 04:07:06
问题 I have a scenario where there are several independent jmx files, each of them has their own threadgroup etc. Using JMeter Ant script I can fire them all in sequence and collect the result in a jtl file. My challenge here is to do the same thing but fire off the tests in parallel. Please note that Include Controller is not an option since I want to use(or honor) the ThreadGroup and User Defined Variables in each jmx files. Thanks for your help 回答1: Perhaps Parallel Ant Task is what you're

Set Ant project name

淺唱寂寞╮ 提交于 2019-12-12 04:05:34
问题 I am trying to change the ant.project.name property after the project declaration. I know this is not advisable but it's the only way I can fix a big problem with my project. I found some interesting posts like this one: Ant - How to set ${ant.project.name} to project folder name? Instead of using: <project basedir="." default="package"> <basename property="ant.project.name" file="${basedir}"/> </project> I'd like to directly set the ant.project.name using a "value" instead of a property

How do I iterate through files in an ant script?

99封情书 提交于 2019-12-12 03:59:17
问题 How would I rewrite this bash script into an ant script? #!/bin/bash # # # First remove files in /removals dir cd "/removals" for file in `ls *.jar` do rm -f "/targetdir/${file}" done # # # Next add new files from /additions cd "/additions" for file in `ls *.jar` do cp -f ${file} /targetdir/${file} done I'm having trouble conceptualizing how to iterate through the files in ant like I can in bash. Thank you in advance. 回答1: Ant uses a concept called filesets for acting on collections of files.