Search code examples
buildbuild-processsencha-cmd

Executing sencha minify command from build.xml


I'm trying to minify an additional file that is not included in the whole build process after the build finished. I think this could be done from within the build.xml file by calling the sencha cmd from the "-after-build" section and tried the following way:

<target name="-after-build">
    <x-sencha-command dir="${build.dir}">
        fs
            minify
                -f additional-file.js
                -t additional-file.min.js
                -yui
    </x-sencha-command>
</target>

Unfortunately this results in an pretty generic error:

[INF] -after-build:
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException
[ERR]
[ERR] Total time: 18 seconds
[ERR] The following error occurred while executing this line:
...\build.xml:31: com.sencha.exceptions.BasicException

Line 31 of build.xml is:

<x-sencha-command dir="${build.dir}">

How can this be done?

Thanks & best regards

ps.: I've already posted this question on the sencha forum but didn't get no repsonse so far: http://www.sencha.com/forum/showthread.php?272190-Executing-sencha-minify-command-from-build.xml


Solution

  • The above task-call was only missing "=" between the parameternames (-t & -f) and their values. So this is working:

    <x-sencha-command>
        fs
            minify
                -f=${build.dir}/bootstrap-app.js
                -t=${build.dir}/bootstrap-app.js
                ${build.compression}
    </x-sencha-command>