ant

How to run all JUnit tests in a category/suite with Ant?

﹥>﹥吖頭↗ 提交于 2019-12-17 09:32:35
问题 I'm using JUnit Categories and ClassPathSuite in a setup similar to that described in this answer. To recap: public interface FastTests { } @RunWith(Categories.class) @Categories.IncludeCategory(FastTests.class) @Suite.SuiteClasses(AllTests.class) public class FastTestSuite { } @RunWith(ClasspathSuite.class) public class AllTests { } ...where AllTests makes use of the ClasspathSuite library. A test class that's part of the FastTests category would look like this: @Category(FastTests.class)

URLConnection FileNotFoundException for non-standard HTTP port sources

Deadly 提交于 2019-12-17 06:38:09
问题 I was trying to use the Apache Ant Get task to get a list of WSDLs generated by another team in our company. They have them hosted on a weblogic 9.x server on http://....com:7925/services/. I am able to get to the page through a browser, but the get task gives me a FileNotFoundException when trying to copy the page to a local file to parse. I was still able to get (using the ant task) a URL without the non-standard port 80 for HTTP. I looked through the Ant source code, and narrowed the error

Ivy fails to resolve a dependency, unable to find cause

£可爱£侵袭症+ 提交于 2019-12-17 06:35:19
问题 While using ivy:retrieve , it fails to resolve the dependency that should be downloaded. The output looks like this: Buildfile: C:\Users\Simon\workspace\apollo\build.xml init: resolve: BUILD FAILED C:\Users\Simon\workspace\apollo\build.xml:42: Problem: failed to create task or type antlib:org.apache.ivy.ant:retrieve Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations

Ant, download fileset from remote machine

删除回忆录丶 提交于 2019-12-17 06:18:23
问题 As I've readen ant doesn't provide 'fileset' attribute when downloading files from remote machine via scp task. It works when sending files from local machine, but It doesn't work when starting in remote machine. That's from documentation. So in remote machine I have some folders and load of files in every directory. I want to download all folders and one specified file from every of them. Downloading all files and then deleting unneeded files won't be solution beacuse there are thousands of

Learning Ant path style

给你一囗甜甜゛ 提交于 2019-12-17 05:36:27
问题 Where can I find resources to learn Ant path style conventions? I've gone to the Ant site itself, but couldn't find any information on path styles. 回答1: Ant-style path patterns matching in spring-framework: The mapping matches URLs using the following rules: ? matches one character * matches zero or more characters ** matches zero or more 'directories' in a path {spring:[a-z]+} matches the regexp [a-z]+ as a path variable named "spring" Some examples: com/t?st.jsp - matches com/test.jsp but

Test for floating point equality. (FE_FLOATING_POINT_EQUALITY)

我是研究僧i 提交于 2019-12-17 03:41:22
问题 I am using a findbugs in an ANT script and I can't figure out how to fix two of my errors. I have read the documentation, but don't understand. Here are my errors and the code that goes with them: Error 1: Test for floating point equality. (FE_FLOATING_POINT_EQUALITY) private boolean equals(final Quantity other) { return this.mAmount == convertedAmount(other); } Error 2: EQ_COMPARETO_USE_OBJECT_EQUALS public final int compareTo(final Object other) { return this.description().compareTo((

Replacing characters in Ant property

♀尐吖头ヾ 提交于 2019-12-17 03:01:31
问题 Is there a simple way of taking the value of a property and then copy it to another property with certain characters replaced? Say propA=This is a value . I want to replace all the spaces in it into underscores, resulting in propB=This_is_a_value . 回答1: Use the propertyregex task from Ant Contrib. I think you want: <propertyregex property="propB" input="${propA}" regexp=" " replace="_" global="true" /> Unfortunately the examples given aren't terribly clear, but it's worth trying that. You

Replacing characters in Ant property

为君一笑 提交于 2019-12-17 03:01:04
问题 Is there a simple way of taking the value of a property and then copy it to another property with certain characters replaced? Say propA=This is a value . I want to replace all the spaces in it into underscores, resulting in propB=This_is_a_value . 回答1: Use the propertyregex task from Ant Contrib. I think you want: <propertyregex property="propB" input="${propA}" regexp=" " replace="_" global="true" /> Unfortunately the examples given aren't terribly clear, but it's worth trying that. You

Clean way to combine multiple jars? Preferably using Ant

旧街凉风 提交于 2019-12-17 02:26:55
问题 I have runtime dependencies on some external jars that I would like to "rejar" into a single jar. These external dependencies are stored in an external_jars directory, and I'd like to be able to not have to list them all (i.e., not to need to change my build scripts if my dependencies change). Any thoughts? Google gave me a good answer on how to do this - if you don't mind listing out each jar as a dependency: http://markmail.org/message/zijbwm46maxzzoo5 Roughly, I want something along the

Randomly test case fails - Forked JVM exits abnormally.

眉间皱痕 提交于 2019-12-14 04:19:39
问题 I have suite of Junit tests which passes every time I run locally. I have setup a job to run the suite, hudson uses ANT to invoke the tests.This suite was passing in the hudson machine for quite some time. But from last 3 days one test fails some times (randomly). And We have not changed to code. The error is : Error Message Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit. Stacktrace junit.framework.AssertionFailedError: Forked