You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jakob Fix <ja...@gmail.com> on 2005/09/22 10:22:00 UTC

problem with apply task

Hello,

I am trying to use ant to run ImageMagick's composite command over a
fileset, like this:

<project default="watermark" name="watermark-files" basedir=".">
  <property name="in.dir" value="./in"/>
  <property name="out.dir" value="./out"/>
  <property name="wm.image" value="watermark.png"/>

  <target name="watermark" description="watermark all files">
    <apply executable="composite.exe" dest="${out.dir}">
    <arg value="-dissolve 40%"/>
    <arg value="-tile ${wm.image}"/>
    <srcfile/>
    <targetfile/>
    <fileset dir="${in.dir}" includes="*.png"/>
    <mapper type="glob" from="${in.dir}/*.png" to="${out.dir}/*.png"/>
    </apply>
  </target>
</project>

The commandline for the composite command is this, which I know works:
> composite -dissolve 40% -tile watermark.png in/hsc-c0311d.png out/hsc-c0311d.png

When running the ant file, I get these error messages:

watermark:
    [apply] Current OS is Windows 2000
    [apply] hsc-c0311d.png skipped - don't know how to handle it
    [apply] hsc-c0311e.png skipped - don't know how to handle it
    [apply] hsc-c0311f.png skipped - don't know how to handle it
    [apply] hsc-c0312.png skipped - don't know how to handle it
    [apply] hsc-c0601.png skipped - don't know how to handle it

I tried running the same with the -v and the -d flags, but it's not
telling me anything more than this.  I was hoping for some kind of
summary of the commandline to be executed (like I've seen for the java
task).

Could someone please point out to me what I'm doing wrong? It would be
so great if I could batch watermark all these image files using ant.

Thanks in advance,
--
cheers,
Jakob.

PS: Oh, I am using ant 1.6.1 on Windows 2000.

C:\tools\watermark>ant -version
Apache Ant version 1.6.1 compiled on February 12 2004

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: problem with apply task

Posted by Jakob Fix <ja...@gmail.com>.
Hello Antoine,

thanks for taking an interest in this problem.

On 23/09/05, Antoine Levy-Lambert <an...@gmx.de> wrote:
> Jakob Fix wrote:
>
> >Hello,
> >
> >I am trying to use ant to run ImageMagick's composite command over a
> >fileset, like this:
> >
> >
> >The commandline for the composite command is this, which I know works:
> >
> >>composite -dissolve 40% -tile watermark.png in/hsc-c0311d.png out/hsc-c0311d.png
> >
> >When running the ant file, I get these error messages:
> >
> >watermark:
> >    [apply] Current OS is Windows 2000
> >    [apply] hsc-c0311d.png skipped - don't know how to handle it
> >    [apply] hsc-c0311e.png skipped - don't know how to handle it
> >    [apply] hsc-c0311f.png skipped - don't know how to handle it
> >    [apply] hsc-c0312.png skipped - don't know how to handle it
> >    [apply] hsc-c0601.png skipped - don't know how to handle it
> >
> Hello Jakob,
> can you run ant like this :
> ant -verbose
>
> or
>
> ant -debug
>
> to see the exact command lines issued by Ant.
>
> Maybe it is not what you would like and "composite.exe" has a problem
> with the command.
>
> Cheers,
>
> Antoine

the -debug output is this (which unfortunately still doesn't tell me
more than I already knew, or does it?):

C:\tools\_MYTOOLS\watermark>ant -debug -f watermark.ant watermark
Apache Ant version 1.6.1 compiled on February 12 2004
Buildfile: watermark.ant
Adding reference: ant.PropertyHelper
Detected Java version: 1.4 in: c:\jdk\jre
Detected OS: Windows 2000
Adding reference: ant.ComponentHelper
Setting ro project property: ant.version -> Apache Ant version 1.6.1
compiled on February 12 2004
Setting ro project property: ant.file ->
C:\tools\_MYTOOLS\watermark\watermark.ant
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile C:\tools\_MYTOOLS\watermark\watermark.ant with URI =
file:///C:/tools/_MYTOOLS/watermark/watermark.ant
Setting ro project property: ant.project.name -> watermark-files
Adding reference: watermark-files
Setting ro project property: ant.file.watermark-files ->
C:\tools\_MYTOOLS\watermark\watermark.ant
Project base dir set to: C:\tools\_MYTOOLS\watermark
 +Target:
 +Target: watermark
 +Target: usage
Setting project property: in.dir -> ./in
Setting project property: out.dir -> ./out
Setting project property: wm.image -> bureauveritas.png
Build sequence for target `watermark' is [watermark]
Complete build sequence is [watermark, usage, ]

watermark:
    [apply] Current OS is Windows 2000
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
Could not load a dependent class (org/apache/commons/net/SocketClient)
for type rexec
Could not load class
(org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type cvsversion
Could not load a dependent class (com/starbase/starteam/Item) for type stlist
Could not load a dependent class (org/apache/commons/net/SocketClient)
for type telnet
Could not load a dependent class (org/apache/commons/net/ftp/FTP) for type ftp
Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
Could not load a dependent class (junit/framework/TestListener) for type junit
Could not load a dependent class (com/starbase/starteam/Item) for type stcheckin
Could not load a dependent class (com/starbase/starteam/Item) for type
stcheckout
fileset: Setup scanner in dir C:\tools\_MYTOOLS\watermark\in with
patternSet{ includes: [*.png] excludes: [] }
    [apply] hsc-c0311d.png skipped - don't know how to handle it
    [apply] hsc-c0311e.png skipped - don't know how to handle it
    [apply] hsc-c0311f.png skipped - don't know how to handle it
    [apply] hsc-c0312.png skipped - don't know how to handle it
    [apply] hsc-c0601.png skipped - don't know how to handle it
    [apply] test.png skipped - don't know how to handle it

BUILD SUCCESSFUL
Total time: 1 second


the -verbose output is even more terse:

C:\tools\_MYTOOLS\watermark>ant -verbose -f watermark.ant watermark
Apache Ant version 1.6.1 compiled on February 12 2004
Buildfile: watermark.ant
Detected Java version: 1.4 in: c:\jdk\jre
Detected OS: Windows 2000
parsing buildfile C:\tools\_MYTOOLS\watermark\watermark.ant with URI =
file:///C:/tools/_MYTOOLS/watermark/watermark.ant
Project base dir set to: C:\tools\_MYTOOLS\watermark
Build sequence for target `watermark' is [watermark]
Complete build sequence is [watermark, usage, ]

watermark:
    [apply] Current OS is Windows 2000
    [apply] hsc-c0311d.png skipped - don't know how to handle it
    [apply] hsc-c0311e.png skipped - don't know how to handle it
    [apply] hsc-c0311f.png skipped - don't know how to handle it
    [apply] hsc-c0312.png skipped - don't know how to handle it
    [apply] hsc-c0601.png skipped - don't know how to handle it
    [apply] test.png skipped - don't know how to handle it

BUILD SUCCESSFUL
Total time: 1 second

what else can I do to try to find out where things go wrong?  would it
help to update to the latest version of ant?  again, thanks.

--
cheers,
Jakob.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: problem with apply task

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Jakob Fix wrote:

>Hello,
>
>I am trying to use ant to run ImageMagick's composite command over a
>fileset, like this:
>
>
>The commandline for the composite command is this, which I know works:
>  
>
>>composite -dissolve 40% -tile watermark.png in/hsc-c0311d.png out/hsc-c0311d.png
>>    
>>
>
>When running the ant file, I get these error messages:
>
>watermark:
>    [apply] Current OS is Windows 2000
>    [apply] hsc-c0311d.png skipped - don't know how to handle it
>    [apply] hsc-c0311e.png skipped - don't know how to handle it
>    [apply] hsc-c0311f.png skipped - don't know how to handle it
>    [apply] hsc-c0312.png skipped - don't know how to handle it
>    [apply] hsc-c0601.png skipped - don't know how to handle it
>
>  
>
Hello Jakob,
can you run ant like this :
ant -verbose

or

ant -debug

to see the exact command lines issued by Ant.

Maybe it is not what you would like and "composite.exe" has a problem
with the command.

Cheers,

Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org