Lynne` Ready | 1 Mar 02:02 2010
Picon

error details missing on javac failure - only stack trace shows


All,

I have searched the manual, web, bug archive and have not found an answer to this issue.  It has manifested in
two projects.  Both projects are on Linux.  The first uses java 1.5, ant 1.6.5 and the second uses java 1.6,
ant 1.7.1.  Both take advantage of many build files, including some that overlap projects.  The issue is
manifesting in one of these "well-exercised", overlapping build files.

When I run ant and the build fails on a javac task, the stack trace is output and instructs, "see the compiler
output for details", but the error details are not output, leaving me with no guidance on the actual error. 
-verbose, -debug, and logging to a file have no affect on this.  The issue disappeared just as unexpectedly
as it came and has now returned again.

Any help would be appreciated.

Thanks,

L
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/201469226/direct/01/
Sascha Ernst | 1 Mar 15:35 2010

problems with empty directories and copy task

Hello,

I have a problem with a fileset/patternset and a copy task.

In the structure I'd like to copy there are (besides "normal" folders and files)

-          Empty directories

-          OS-specific folders

I'd like to copy everything (incl. the empty directories) but NOT the OS-specific folders not matching
the desired OS-architecture.

Currently my copy-task looks like this (the ignore.<os-arch>-properties tell which OS-architecture to
ignore ):

                <patternset id="os.stuff.to.ignore">
                  <exclude name="**/win-i386/**/*" if="ignore.win-i386" />
                  <exclude name="**/win-amd64/**/*" if="ignore.win-amd64" />
                  <exclude name="**/solaris-x86/**/*" if="ignore.solaris-x86" />
                  <exclude name="**/solaris-amd64/**/*" if="ignore.solaris-amd64" />
                  <exclude name="**/linux-i386/**/*" if="ignore.linux-i386" />
                  <exclude name="**/linux-amd64/**/*" if="ignore.linux-amd64" />
                  <exclude name="**/solaris-sparc/**/*" if="ignore.solaris-sparc" />
                </patternset>

                <copy todir="${bin.dir}/../.."
                      overwrite="true"
                                 includeEmptyDirs="true"
                                 failonerror="true"
(Continue reading)

achhayya | 1 Mar 16:14 2010
Picon

facing the issue while creating ejb jar file


I am facing the issue while creating ejb jar file. I tried with ejb jar ant
task, but it is only compiling and packaging the ejb related class files. 

<ejbjar srcdir="${searchServiceIRAMS.build.dir}/classes"
descriptordir="${searchServiceIRAMS.src.dir}/META-INF"
destdir="${searchServiceIRAMS.dist.dir}">
          <include name="**/ejb-jar.xml"/>
       <include name="${searchServiceIRAMS.build.dir}/classes"/>
  </ejbjar>

For instance, One application is having 5 java files and one ejb java file.
Ejbjar ant task is only packaging the ejb java file into jar file. How to
package other .class files into ejbjar file?

Attached build xml is the one we have created.

Please let me know if you need more information.

   
http://old.nabble.com/file/p27744828/searchServiceIRAMSbuild.xml
searchServiceIRAMSbuild.xml :-((
--

-- 
View this message in context: http://old.nabble.com/facing-the-issue-while-creating-ejb-jar-file-tp27744828p27744828.html
Sent from the Ant - Users mailing list archive at Nabble.com.
Murray, Mike | 1 Mar 16:59 2010

1.8 Performance Degradation

Has anyone else noticed a degradation with 1.8.0?  

I noticed a target that took 34 minutes to run with 1.7.1, now takes 68
minutes.  This target iterates through 600 or 700 Ant projects and runs
the init target on each.  I'm having trouble pinpointing where it is,
but it seems to be in the project startup.  Running init on an
individual project takes significantly longer with 1.8.   The second
time init, which does little more than determine nothing needs to be
done also takes longer.

            1.7.1       1.8.0

        ----------------------

init 1      2 secs      7 secs

init 2      1 secs      4 secs

A detailed comparison of verbose output doesn't show any additional
steps being run, so one or more of the existing steps has slowed for
some reason.  If anyone has any insights, please let me know.  This
small difference is resulting in a full build taking 3 or 4 hours more
with 1.8.0.

Thanks, Mike

Stefan Bodewig | 1 Mar 17:22 2010
Picon

Re: 1.8 Performance Degradation

On 2010-03-01, Murray, Mike <mbm <at> ptc.com> wrote:

> Has anyone else noticed a degradation with 1.8.0?

Yes, for any <exec> type of task on Windows (this includes, for example,
<attrib>) that used to take way less than a second.

Currently each such <exec> takes at least a second (give or take a few
millis) so if you are using a lot of little <exec>s this will sum up.

The reason behind this is that Ant 1.7.1's logic could make processes
hang on Windows and the revised logic involves timed joins to simulate
async reads.  We may get through with making the sleep interval a little
bit smaller in future versions - or we may find a better fix for
<https://issues.apache.org/bugzilla/show_bug.cgi?id=5003>

Stefan
Shawn Castrianni | 1 Mar 17:28 2010

Detect command line properties

Is there a way to tell the difference between ant properties specified by the user on the command line versus
those that come from property files are or hardcoded in the build.xml?  I have an ant build that execs to
another ant build (I use exec instead of <ant> or other similar tasks because I have special setup in my
custom bat/sh scripts that invoke ant) and I would like the command line properties specified by the user
to be forwarded to the child ant build that I exec.  If I can detect them, then I can modify my exec command line
to include them.

---
Shawn Castrianni

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the
sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly
prohibited.  If you are not the intended recipient (or authorized to receive information for the intended
recipient), please contact the sender by reply e-mail and delete all copies of this message.
Christian Beil | 1 Mar 20:35 2010
Picon

The new archives task

Hi,

this seems to be a common question which has been asked and answered 
many times.
For example here: http://marc.info/?l=ant-user&m=121240932031764&w=2

But I still don't know how to do it.
And since the new archives task 
(http://ant.apache.org/manual/CoreTypes/resources.html#archives) somehow 
seems to be the answer, I though I'd ask.

How do I package my application together with its dependencies in a 
single jar file (flattening the dependency jars)?
Somehow like this:
<jar jarfile="${jar.file}">
    <fileset dir="${classes.dir}"/>
    <fileset file="UnicodeCharacters.ini"/>
    <zipgroupfileset dir="${lib.dir}"/>
    <manifest>
        ...
    </manifest>
</jar>

But what if I want to filter the files in the dependency jars somehow, 
and not the jar files themself.
I thought I could use <archives> and <zips>, but they don't seem to be 
supported as sub-tasks of <jar>.
Am I missing something?
Can someone please shed some light on this?

(Continue reading)

Rez P | 1 Mar 20:46 2010
Picon

Filemapper or globmapper


I would like to copy files with certain extensions (normally the destination environment is used to
determine the file extension) to a location and strip off the extensions. But I currently resort to using
the copy tasks with the file and tofile attributes to accomplish this as in the example below. But the
problem is that every time a new application is introduced into the equation, its jar file, as in app2,
needs to be copied too, therefore, I will end up having so many copy statements.  Is there anyway to use
filemapper, globmapper or any tasks to accomplish what I'm trying to do?

<copy file="${dist}/app1.war.qa"
tofile="${local.dir}/${build.version}.${build.number}/qa/${appname}.war" overwrite="true"/>

<copy file="${dist}/app1.jar.qa"
tofile="${local.dir}/${build.version}.${build.number}/qa/${appname}.jar" overwrite="true"/>

<copy file="${dist}/app2.jar.qa"
tofile="${local.dir}/${build.version}.${build.number}/qa/${appname}.jar" overwrite="true"/>
.
.
.

How can I turn the above example into one copy task like 

<copy file="${dist}/*.war.*"
tofile="${local.dir}/${build.version}.${build.number}/qa/${appname}.war" overwrite="true"/>

Obviously I can't use the todir attribute because it's going to copy the files with their extensions intact.

Thanks
 		 	   		  
_________________________________________________________________
(Continue reading)

Dominique Devienne | 1 Mar 22:59 2010
Picon

Re: Detect command line properties

On Mon, Mar 1, 2010 at 10:28 AM, Shawn Castrianni
<Shawn.Castrianni <at> halliburton.com> wrote:
> Is there a way to tell the difference between ant properties specified by the user on the command line
versus those that come from property files are or hardcoded in the build.xml?  I have an ant build that
execs to another ant build (I use exec instead of <ant> or other similar tasks because I have special setup
in my custom bat/sh scripts that invoke ant) and I would like the command line properties specified by the
user to be forwarded to the child ant build that I exec.  If I can detect them, then I can modify my exec
command line to include them.

<ant> supports a nested <propertyset builtin="commandline">, which
sounds like what you want (gets the User Properties), but <exec>
doesn't; so close ;)

OTOH, since you are exec'ing Ant, and Ant accepts a -propertyfile, if
you write a little task that can write a property set as a properties
file, you'd be all set I think.

You could also modify <exec> to take a <propertyset> with some
formatting rules (-D%name%=%value% in your case) to convert the
properties to command line arguments I guess. --DD
Shawn Castrianni | 1 Mar 23:15 2010

RE: Detect command line properties

Thanks, I think that will help.  I am already using my own exec task I call smartexec.  I added a lot of features
similar to the cpptasks so that I can setup argsets with an ID that can be reused for multiple smartexec
tasks with REFID.  Each argset and arg inside can have if/unless attributes as well as ifexpr/unlessexpr
that support the full JEP expression syntax.  This allows me to reuse argsets across platforms by
qualifying the platform specific stuff with the if/unless stuff.

Therefore, I should be able to enhance my own smartexec with this feature.  Thanks.

---
Shawn Castrianni

-----Original Message-----
From: Dominique Devienne [mailto:ddevienne <at> gmail.com] 
Sent: Monday, March 01, 2010 3:59 PM
To: Ant Users List
Subject: Re: Detect command line properties

On Mon, Mar 1, 2010 at 10:28 AM, Shawn Castrianni
<Shawn.Castrianni <at> halliburton.com> wrote:
> Is there a way to tell the difference between ant properties specified by the user on the command line
versus those that come from property files are or hardcoded in the build.xml?  I have an ant build that
execs to another ant build (I use exec instead of <ant> or other similar tasks because I have special setup
in my custom bat/sh scripts that invoke ant) and I would like the command line properties specified by the
user to be forwarded to the child ant build that I exec.  If I can detect them, then I can modify my exec
command line to include them.

<ant> supports a nested <propertyset builtin="commandline">, which
sounds like what you want (gets the User Properties), but <exec>
doesn't; so close ;)

(Continue reading)


Gmane