Diana Andrews | 30 Mar 2013 20:42
Picon

Re: user Digest 26 Mar 2013 05:42:09 -0000 Issue 3248

On Monday, March 25, 2013,  <user-digest-help <at> ant.apache.org> wrote:
>
> user Digest 26 Mar 2013 05:42:09 -0000 Issue 3248
>
> Topics (messages 72671 through 72672)
>
> Get dependant Libarary without -lib
>         72671 by: Harold Putman
>
> Ant Command Line args to be passed to all the Java Tasks
>         72672 by: Raja Nagendra Kumar
>
> Administrivia:
>
> ---------------------------------------------------------------------
> To post to the list, e-mail: user <at> ant.apache.org
> To unsubscribe, e-mail: user-digest-unsubscribe <at> ant.apache.org
> For additional commands, e-mail: user-digest-help <at> ant.apache.org
>
> ----------------------------------------------------------------------
>
>

--

-- 
Sent from Gmail Mobile
Marc Benstein | 28 Mar 2013 01:27
Favicon

Java 5 fails to run jar files created with Ant 1.9.0

Howdy,

Java 5 fails to execute jars created with Ant 1.9.0. Java 6 and 7 work
fine to execute the jar.

The message I am seeing in Java 5 is "Invalid or corrupt jarfile"

I have tried my target JVM of 1.5.0_06 on Windows 7 and Linux and I get
the same output. I have also tried 1.5.0_22 with the same results.

Any help would be appreciated.

Thanks
--
Marc Benstein

Ultramain Systems, Inc.
8100 Lang Avenue NE
Albuquerque, NM 87109
USA

TEL 505.828.9000
FAX 505.823.1841
www.ultramain.com


Confidentiality Notice: This email message and any files transmitted with it may contain confidential
information intended only for the person(s) to whom this email is addressed. If you have received this
email in error, please notify the sender immediately by phone or email and destroy the original message
without making a copy. Thank you.
(Continue reading)

Edoardo Vacchi | 26 Mar 2013 18:25
Picon
Gravatar

Ant System Class Loader does not honor $CLASSPATH, honors $LOCALCLASSPATH

Hi to everybody on the list,

I am forwarding the question I've asked on stackoverflow
http://stackoverflow.com/questions/15383099/ant-system-class-loader-does-not-honor-classpath-honors-localclasspath
as I did not have any feedback in several days. I hope I will find an
answer here.

Thanks in advance

------

I am implementing an ant task as a wrapper for another class, which
loads other several classes using the system class loader. Now, the
task is in the same jar of these other classes, so I wonder why it is
not finding them, since the task *is* running

Please notice that my classes are in the `$CLASSPATH` env variable.
The problem will not occur if I `export LOCALCLASSPATH=$CLASSPATH`

Minimal example:

    <taskdef name="mytask" classname="my.package.MyTask"  />

    <target name="compile">
        <mytask />
    </target>

you can easily see the problem here

    public class MyTask extends Task {
(Continue reading)

Raja Nagendra Kumar | 26 Mar 2013 06:41
Gravatar

Ant Command Line args to be passed to all the Java Tasks

Hi,

I would like to invoke java applications using the ant task , however all
the -D options used to invoke ant should be available to <java task invoked
application

e.g

if I say

ant -Dprop=d2 -Dhost=ab.com etc.. 

then the respective java invoked application should be able to know the
value of system properties prop and host.

My java taks has option of fork=true. I tried with option clonevm=true but
jdk gives an error 

run.retry:
     [java] Error occurred during initialization of VM
     [java] java.lang.ExceptionInInitializerError
     [java]     at java.lang.Runtime.loadLibrary0(Runtime.java:841)
     [java]     at java.lang.System.loadLibrary(System.java:1084)
     [java]     at java.lang.System.initializeSystemClass(System.java:1145)
     [java] Caused by: java.lang.StringIndexOutOfBoundsException: String
index o
ut of range: 0
     [java]     at java.lang.String.charAt(String.java:658)
     [java]     at
java.io.Win32FileSystem.&lt;init>(Win32FileSystem.java:40)
(Continue reading)

Harold Putman | 21 Mar 2013 15:49
Favicon
Gravatar

Get dependant Libarary without -lib

I am using the <ftp> task which requires commons-net-3.2.jar.

I can make this work by specifying "-lib commons-net-3.2.jar" when I invoke
ant, but I would like to put something in my build file to load this
library without needed -lib.

This article from 2009 explains how to solve it
http://stackoverflow.com/questions/472559/how-to-load-an-optional-task-into-ant-without-lib-or-global-installation/858744#858744

But it doesn't work for me (ant 1.8.4). Is there a new way to do this now?

Thanks in advance.
salvador | 19 Mar 2013 19:36
Picon

embedded jetty and remote server

Hi,

writing servers is very new to me, so I have some basic question.

I have java classes, which start the jetty server and which define servlets.
I don't use any web.xml-files, all code is in java. In java code is the
server adress defined (for now only localhost)

Now I want to build the project with ant, and I need to start my server by
remote access, so I need to use deployment. But all examples, that i saw use
the standard webapp and not embedded server. In these examples the remote
server addresse is defined in deploy task.

I thought, I need to replace mylocalhost in the java code with the remote
server address, build the jar, and then use deploy task depending on
building the jar file and then use ant run. Am i correct?

for now, my script compiles source, builds the jar and executes it with run
task, i can start the server on my local host.

what exactly i need to add to my ant or java code, to start the server
remotely?

Thanks for any help

--
View this message in context: http://ant.1045680.n5.nabble.com/embedded-jetty-and-remote-server-tp5713968.html
Sent from the Ant - Users mailing list archive at Nabble.com.
Stefan Bodewig | 14 Mar 2013 18:08
Picon
Favicon
Gravatar

[ANNOUNCE] Apache Commons Compress 1.5 Released


The Apache Commons Team is pleased to announce the release of Apache
Commons Compress 1.5.

The Apache Commons Compress Library defines a Java API for working with
ar, cpio, tar, zip, dump, gzip, pack200, bzip2 and xz files.

The 1.5 release is mainly a bug fix release with more than 20 fixes,
mostly to the tar and zip packages.  It also allows (OSGi) deployments
without XZ for Java being present.

Source and binary distributions are available for download from the
Apache Commons download site:

http://commons.apache.org/proper/commons-compress/download_compress.cgi

When downloading, please verify signatures using the KEYS file available
at the above location when downloading the release.

Changes in this version include:

New features:

o CompressorStreamFactory has an option to create decompressing
  streams that decompress the full input for formats that support
  multiple concatenated streams.
  Issue: COMPRESS-220.

Fixed Bugs:

(Continue reading)

Antoine Levy Lambert | 11 Mar 2013 01:28
Picon
Picon

[ANNOUNCE] Apache Ant 1.9.0 Released

Hi,

I am pleased to announce the release of Apache Ant 1.9.0.

Apache Ant is a Java based build tool.

- Version 1.9.0 is the first Ant release which requires at least Java 1.5.
- support for  <at> Ignore annotation and requirement of JUnit 4.11
- the zip, bzip2 and tar are improved
- removal of the Perforce Ant tasks; users of these tasks can use the tasks supplied by Perforce Inc.
instead, which contain more functionality and connect natively to the Perforce servers
- numerous bug fixes and improvements as documented in Bugzilla and in the release notes

Source and binary distributions are available from the Apache Ant
download site:

http://ant.apache.org/bindownload.cgi

and

http://ant.apache.org/srcdownload.cgi

Please verify signatures using the KEYS file available at the above
location when downloading the release.

For complete information on Ant, including instructions on how to submit
bug reports, patches, or suggestions for improvement, see the Apache Ant
website:

http://ant.apache.org/index.html
(Continue reading)

Picon

Changing my ant classpath

I'm trying to run ant. It worked fine yesterday, but today I installed a newer version of Java and now ant
throws this error: 

 ant --execdebug
exec "/usr/lib/jvm/jdk1.7.0_15/jre/bin/java" -classpath "/usr/lib/ant-launcher.jar"
-Dant.home="/usr" -Dant.library.dir="/usr/lib" org.apache.tools.ant.launch.Launcher -cp "/home/katie/workspace/clojure-1.4.0/clojure-1.4.0.jar"
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher

the path to the ant-launcher.jar file is incorrect. How would I go about changing this path to the correct one?

Thanks!
K
salt2012 | 22 Feb 2013 22:28
Picon

Automating cvs modules checkout with build.psf using Ant Script

Hi All,

I am able to checkout the projects directly in ant script using cvs commands 
but i need an sample for the following requirement. Please help.

Need to run build.xml ant script with project name as argument. Ihe script
should take the build.psf and needs to checkout the required projects to the
local workspace.

Thanks in advance.
Salt

--
View this message in context: http://ant.1045680.n5.nabble.com/Automating-cvs-modules-checkout-with-build-psf-using-Ant-Script-tp5713862.html
Sent from the Ant - Users mailing list archive at Nabble.com.
KARR, DAVID | 16 Feb 2013 00:21
Picon
Favicon

Why is javac for unit tests working for me, but not someone else?

I implemented a target in a base build script for compiling and running unit tests with cobertura.  It's
working fine in my environment.  Someone I work with is trying to use it in their environment.  As expected,
it bombs completely in his environment.  I'm trying to find some clues that tell me what might be wrong.

I'm using Ant 1.7.1 and JDK 1.6.0_30, and he's using Ant 1.7.0 and JDK 1.6.0_35.

I've run "ant -v" in both environments and compared the output.

The build eventually gets to a target I've named "compile-unit-test".

In my environment, this proceeds to compile the unit test classes.  In the other environment, I see this:

...\build.xml:636: gen/test/classes is not a legal value for this attribute
	at org.apache.tools.ant.types.EnumeratedAttribute.setValue(EnumeratedAttribute.java:94)
	at org.apache.tools.ant.IntrospectionHelper$8.set(IntrospectionHelper.java:1004)
	at org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper.java:400)
	at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:392)
	at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:349)
	at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:565)
	at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:343)
	at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:198)
	at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:160)
	at org.apache.tools.ant.Task.perform(Task.java:347)

The following is the "compile-unit-test" target:

<target name="compile-unit-test" depends="init">
        <property name="testbuildclasspath" refid="testbuild.classpath" />
        <mkdir dir="${test.classes.dir}"/>
        <javac srcdir="${test.src.dir}" 
(Continue reading)


Gmane