You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Steve Prior <sp...@geekster.com> on 2011/02/04 23:55:33 UTC

Does ivy add any default filters used by the ant copy task?

I know this is a long shot, but I'm running out of ideas.  I'm trying to build a 
war file from ant using ivy dependencies, but the resulting war file is not 
working and I've determined that the .class files built in the webapp project 
itself are getting corrupted during an ant copy task.  After some research I see 
that this is possible if you have any filters enabled, but as far as I know I 
don't have any, yet the corruption happens anyway.  The code for the copy 
invocation is:

<copy todir="${dir.build.tmp}/WEB-INF/classes">
    <fileset dir="${dir.build.classes.main}">
       <include name="**/*.class"/>
       <include name="**/*.properties"/>
    </fileset>
</copy>

See, no filters at all.

So the question is by any chance does the inclusion of ivy into the mix by some 
chance add in any global filters which might be kicking in and causing the 
problem?  This problem is happening on a Windows XP machine.  I haven't done 
anything to set LANG because as far as I know it's needed when filters are 
involved and I don't (knowingly) have any.  If not, any other ideas?

I'm asking on this list because even though you don't see any ivy code in the 
above fragment, it's all around it in the build.xml I'm using.

Thanks in advance
Steve

Re: Does ivy add any default filters used by the ant copy task?

Posted by Maarten Coene <ma...@yahoo.com>.
Ivy doesn't has any impact on other ant tasks, like the copy task.

If your classes are getting corrupted during a copy, the problem is not related 
to Ivy.
Perhaps you could post your question to the ant-user mailinglist?

Maarten



----- Original Message ----
From: Steve Prior <sp...@geekster.com>
To: ivy-user@ant.apache.org
Sent: Fri, February 4, 2011 11:55:33 PM
Subject: Does ivy add any default filters used by the ant copy task?

I know this is a long shot, but I'm running out of ideas.  I'm trying to build a 
war file from ant using ivy dependencies, but the resulting war file is not 
working and I've determined that the .class files built in the webapp project 
itself are getting corrupted during an ant copy task.  After some research I see 
that this is possible if you have any filters enabled, but as far as I know I 
don't have any, yet the corruption happens anyway.  The code for the copy 
invocation is:

<copy todir="${dir.build.tmp}/WEB-INF/classes">
   <fileset dir="${dir.build.classes.main}">
      <include name="**/*.class"/>
      <include name="**/*.properties"/>
   </fileset>
</copy>

See, no filters at all.

So the question is by any chance does the inclusion of ivy into the mix by some 
chance add in any global filters which might be kicking in and causing the 
problem?  This problem is happening on a Windows XP machine.  I haven't done 
anything to set LANG because as far as I know it's needed when filters are 
involved and I don't (knowingly) have any.  If not, any other ideas?

I'm asking on this list because even though you don't see any ivy code in the 
above fragment, it's all around it in the build.xml I'm using.

Thanks in advance
Steve



      

Re: Does ivy add any default filters used by the ant copy task?

Posted by Steve Prior <sp...@geekster.com>.
In fact I did switch to using the war task and avoided doing the copy which was 
causing problems, but I think finding the answer to why it happened is still 
important or else I'll never know when to trust the copy task again.

I should have mentioned before that I'm using ant 1.8.1 and ivy 2.2.0.

Steve

On 2/4/2011 6:39 PM, Filipe Sousa wrote:
> I'm new to the ANT world, but why don't you use the war task?
> http://ant.apache.org/manual/Tasks/war.html

>>
>> <copy todir="${dir.build.tmp}/WEB-INF/classes">
>>    <fileset dir="${dir.build.classes.main}">
>>       <include name="**/*.class"/>
>>       <include name="**/*.properties"/>
>>    </fileset>
>> </copy>
>>
>> See, no filters at all.

Re: Does ivy add any default filters used by the ant copy task?

Posted by Filipe Sousa <na...@gmail.com>.
I'm new to the ANT world, but why don't you use the war task?
http://ant.apache.org/manual/Tasks/war.html

On Fri, Feb 4, 2011 at 10:55 PM, Steve Prior <sp...@geekster.com> wrote:
> I know this is a long shot, but I'm running out of ideas.  I'm trying to
> build a war file from ant using ivy dependencies, but the resulting war file
> is not working and I've determined that the .class files built in the webapp
> project itself are getting corrupted during an ant copy task.  After some
> research I see that this is possible if you have any filters enabled, but as
> far as I know I don't have any, yet the corruption happens anyway.  The code
> for the copy invocation is:
>
> <copy todir="${dir.build.tmp}/WEB-INF/classes">
>   <fileset dir="${dir.build.classes.main}">
>      <include name="**/*.class"/>
>      <include name="**/*.properties"/>
>   </fileset>
> </copy>
>
> See, no filters at all.
>
> So the question is by any chance does the inclusion of ivy into the mix by
> some chance add in any global filters which might be kicking in and causing
> the problem?  This problem is happening on a Windows XP machine.  I haven't
> done anything to set LANG because as far as I know it's needed when filters
> are involved and I don't (knowingly) have any.  If not, any other ideas?
>
> I'm asking on this list because even though you don't see any ivy code in
> the above fragment, it's all around it in the build.xml I'm using.
>
> Thanks in advance
> Steve
>



-- 
Filipe Sousa

Re: Does ivy add any default filters used by the ant copy task?

Posted by Steve Prior <sp...@geekster.com>.
On 2/4/2011 7:53 PM, Geoff Clitheroe wrote:
> We're using Netbeans generated build files with Ivy for the dependency
> management and it works just fine.  The copy looks similar
>
>        <copy todir="${build.web.dir}/WEB-INF">
>              <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
>          </copy>
>
> What's interesting is that all the Netbeans copy tasks seem to avoiding
> mixing binary and text files even though there are no filters at all.  It
> would be interesting if you could try moving the properties to a separate
> copy task and see if the problem persists.
>>
>> <copy todir="${dir.build.tmp}/WEB-INF/classes">
>>    <fileset dir="${dir.build.classes.main}">
>>       <include name="**/*.class"/>
>>       <include name="**/*.properties"/>
>>    </fileset>
>> </copy>

I just broke it into two tasks, one for .class and one for .properties and got 
the same (bad) result.  I think the reason you'll see them separate is because 
if someday you do decide to add a filter you want to make sure to do it on just 
the text and not binary files, but in this case I'm not knowingly using any filters.

Steve

Re: Does ivy add any default filters used by the ant copy task?

Posted by Geoff Clitheroe <g....@gmail.com>.
We're using Netbeans generated build files with Ivy for the dependency
management and it works just fine.  The copy looks similar

      <copy todir="${build.web.dir}/WEB-INF">
            <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
        </copy>

What's interesting is that all the Netbeans copy tasks seem to avoiding
mixing binary and text files even though there are no filters at all.  It
would be interesting if you could try moving the properties to a separate
copy task and see if the problem persists.

We're using all linux (Fedora or Centos).

FWIW: If you're using Netbeans I'm happy to share out Ant build-base files
but it's not doing much more than all the boot strap Ivy stuff and set up
the class path etc.

Cheers,
Geoff



On Sat, Feb 5, 2011 at 11:55 AM, Steve Prior <sp...@geekster.com> wrote:

> I know this is a long shot, but I'm running out of ideas.  I'm trying to
> build a war file from ant using ivy dependencies, but the resulting war file
> is not working and I've determined that the .class files built in the webapp
> project itself are getting corrupted during an ant copy task.  After some
> research I see that this is possible if you have any filters enabled, but as
> far as I know I don't have any, yet the corruption happens anyway.  The code
> for the copy invocation is:
>
> <copy todir="${dir.build.tmp}/WEB-INF/classes">
>   <fileset dir="${dir.build.classes.main}">
>      <include name="**/*.class"/>
>      <include name="**/*.properties"/>
>   </fileset>
> </copy>
>
> See, no filters at all.
>
> So the question is by any chance does the inclusion of ivy into the mix by
> some chance add in any global filters which might be kicking in and causing
> the problem?  This problem is happening on a Windows XP machine.  I haven't
> done anything to set LANG because as far as I know it's needed when filters
> are involved and I don't (knowingly) have any.  If not, any other ideas?
>
> I'm asking on this list because even though you don't see any ivy code in
> the above fragment, it's all around it in the build.xml I'm using.
>
> Thanks in advance
> Steve
>