Results 1 to 5 of 5

Thread: Ant Sencha CMD

  1. #1
    Sencha User
    Join Date
    Oct 2013
    Posts
    6

    Default Ant Sencha CMD

    We are building Sencha in our TFS.<br><br>Directly calling the ant build target in the build.xml did not produce the same results as with the senchaCMD CLI.<br><br>So I wrote this:<br>
    Code:
    <div>&lt;?xml version="1.0" encoding="utf-8"?&gt;</div><div>&lt;project name="tfs" default="tfs-build"&gt;</div><div>&nbsp; &lt;import file="${basedir}/.sencha/app/build-impl.xml"/&gt;</div><div><br></div><div>&nbsp; &nbsp; &lt;target name="tfs-build" depends="init"&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;attrib file="${basedir}/resources/default/app.css" readonly="false" /&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;taskdef resource="com/sencha/ant/antlib.xml"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;classpath&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;pathelement location="${cmd.dir}/sencha.jar"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;/classpath&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;/taskdef&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;x-sencha-init dir="${basedir}"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;x-sencha-command dir="${basedir}"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;!-- for changing the theme --&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;!--&lt;property name="app.theme" value="theme-1"/&gt;--&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; app</div><div>&nbsp; &nbsp; &nbsp; &nbsp; build</div><div>&nbsp; &nbsp; &nbsp; &lt;/x-sencha-command&gt;</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &lt;/target&gt;</div><div>&lt;/project&gt;</div><div><br></div>
    <br>But no matter what I tried out (with or without build-impl.xml/with or without taskdef etc./with "com/sencha/ant/" or "com/sencha/command/compass/ant/" it always give me an error when calling x-sencha-command. Why does x-sencha-command target search for com/sencha/ant if it's obviously com/sencha/command/compass/ant? Is this a bug? Please give a solution.<br>Logfile related to above build xml<br>
    Code:
    <div>Buildfile: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xml</div><div><br></div><div>-before-init-local:</div><div><br></div><div>-init-local:</div><div><br></div><div>-after-init-local:</div><div><br></div><div>init-local:</div><div><br></div><div>find-cmd:</div><div>[exec] Sencha Cmd v3.1.2.342</div><div>[exec] C:/Users/xxxxxxxxxxxxxxxxxxxxxxxx/bin/Sencha/Cmd/3.1.2.342/</div><div>[exec]</div><div>[delete] Deleting: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\$cmddir$</div><div>[echo] Using Sencha Cmd from C:/Users/xxxxxxxxxxxxxxxxxxxx/bin/Sencha/Cmd/3.1.2.342/</div><div><br></div><div>-before-init:</div><div><br></div><div>-init:</div><div>[x-sencha-init] Initializing Sencha Cmd ant environment</div><div>[x-sencha-init] Adding antlib taskdef for com/sencha/command/compass/ant/antlib.xml</div><div>[x-verify-version] The application was last modified by an older version of Sencha Cmd (3.1.1.274), current is 3.1.2.342. Please run 'sencha app upgrade -noframework' to update to 3.1.2.342.</div><div><br></div><div>-after-init:</div><div><br></div><div>init:</div><div><br></div><div>tfs-build:</div><div>[x-sencha-init] Initializing Sencha Cmd ant environment</div><div>[x-sencha-init] Adding antlib taskdef for com/sencha/command/compass/ant/antlib.xml</div><div>[x-sencha-command] &nbsp; [taskdef] Could not load definitions from resource com/sencha/ant/antlib.xml. It could not be found.</div><div>[x-sencha-command]</div><div>[x-sencha-command] init-plugin:</div><div>[x-sencha-command] &nbsp; [taskdef] Could not load definitions from resource com/sencha/ant/antlib.xml. It could not be found.</div><div>[x-sencha-command] &nbsp; [taskdef] Could not load definitions from resource com/sencha/ant/antlib.xml. It could not be found.</div><div>[x-sencha-command] &nbsp; [taskdef] Could not load definitions from resource com/sencha/ant/antlib.xml. It could not be found.</div><div>[x-sencha-command]</div><div>[x-sencha-command] cmd-root-plugin.init-properties:</div><div>[x-sencha-command]</div><div>[x-sencha-command] init-properties:</div><div>[x-sencha-command]</div><div>[x-sencha-command] init-sencha-command:</div><div>[x-sencha-command] &nbsp; [taskdef] Could not load definitions from resource com/sencha/ant/antlib.xml. It could not be found.</div><div>[x-sencha-command]</div><div>[x-sencha-command] init:</div><div>[x-sencha-command] InvocationTargetException: null</div><div><br></div><div>BUILD FAILED</div><div>com.sencha.exceptions.BasicException: Problem: failed to create task or type x-script-def</div><div>Cause: The name is undefined.</div><div>Action: Check the spelling.</div><div>Action: Check that any custom tasks/types have been declared.</div><div>Action: Check that any &lt;presetdef&gt;/&lt;macrodef&gt; declarations have taken place.</div><div><br></div><div>?at com.sencha.exceptions.BasicException.wrap(BasicException.java:44)</div><div>?at com.sencha.cli.Command.dispatch(Command.java:64)</div><div>?at com.sencha.cli.Commands.dispatch(Commands.java:62)</div><div>?at com.sencha.cli.Commands.dispatch(Commands.java:62)</div><div>?at com.sencha.command.Sencha.dispatch(Sencha.java:78)</div><div>?at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:131)</div><div>?at com.sencha.ant.SenchaCommandTask.doExecute(SenchaCommandTask.java:65)</div><div>?at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:29)</div><div>?at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)</div><div>?at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)</div><div>?at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div>?at java.lang.reflect.Method.invoke(Method.java:606)</div><div>?at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)</div><div>?at org.apache.tools.ant.Task.perform(Task.java:348)</div><div>?at org.apache.tools.ant.Target.execute(Target.java:435)</div><div>?at org.apache.tools.ant.Target.performTasks(Target.java:456)</div><div>?at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)</div><div>?at org.apache.tools.ant.Project.executeTarget(Project.java:1364)</div><div>?at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)</div><div>?at org.apache.tools.ant.Project.executeTargets(Project.java:1248)</div><div>?at org.apache.tools.ant.Main.runBuild(Main.java:851)</div><div>?at org.apache.tools.ant.Main.startAnt(Main.java:235)</div><div>?at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)</div><div>?at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)</div><div>Caused by: C:\Users\xxxxxxxx\bin\Sencha\Cmd\3.1.2.342\plugin.xml:15: Problem: failed to create task or type x-script-def</div><div>Cause: The name is undefined.</div><div>Action: Check the spelling.</div><div>Action: Check that any custom tasks/types have been declared.</div><div>Action: Check that any &lt;presetdef&gt;/&lt;macrodef&gt; declarations have taken place.</div><div><br></div><div>?at org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:499)</div><div>?at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:431)</div><div>?at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)</div><div>?at org.apache.tools.ant.Task.perform(Task.java:347)</div><div>?at org.apache.tools.ant.Target.execute(Target.java:435)</div><div>?at org.apache.tools.ant.Target.performTasks(Target.java:456)</div><div>?at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)</div><div>?at org.apache.tools.ant.Project.executeTarget(Project.java:1364)</div><div>?at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)</div><div>?at org.apache.tools.ant.Project.executeTargets(Project.java:1248)</div><div>?at com.sencha.ant.AntScript.execute(AntScript.java:127)</div><div>?at com.sencha.command.plugin.PluginManager.execute(PluginManager.java:93)</div><div>?at com.sencha.command.plugin.PluginManager.executeReverseFirst(PluginManager.java:134)</div><div>?at com.sencha.command.environment.BuildEnvironment.execute(BuildEnvironment.java:66)</div><div>?at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:23)</div><div>?at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:120)</div><div>?at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div>?at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</div><div>?at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div>?at java.lang.reflect.Method.invoke(Method.java:606)</div><div>?at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:174)</div><div>?at com.sencha.cli.Command.dispatch(Command.java:42)</div><div>?... 22 more</div><div><br></div><div>Total time: 9 seconds</div><div><br></div><div>BUILD FAILED</div><div>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\build.tfs.xml:8: com.sencha.exceptions.BasicException: Problem: failed to create task or type x-script-def</div><div>Cause: The name is undefined.</div><div>Action: Check the spelling.</div><div>Action: Check that any custom tasks/types have been declared.</div><div>Action: Check that any &lt;presetdef&gt;/&lt;macrodef&gt; declarations have taken place.</div><div><br></div><div>?at com.sencha.exceptions.BasicException.wrap(BasicException.java:44)</div><div>?at com.sencha.cli.Command.dispatch(Command.java:64)</div><div>?at com.sencha.cli.Commands.dispatch(Commands.java:62)</div><div>?at com.sencha.cli.Commands.dispatch(Commands.java:62)</div><div>?at com.sencha.command.Sencha.dispatch(Sencha.java:78)</div><div>?at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:131)</div><div>?at com.sencha.ant.SenchaCommandTask.doExecute(SenchaCommandTask.java:65)</div><div>?at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:29)</div><div>?at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)</div><div>?at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)</div><div>?at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div>?at java.lang.reflect.Method.invoke(Method.java:606)</div><div>?at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)</div><div>?at org.apache.tools.ant.Task.perform(Task.java:348)</div><div>?at org.apache.tools.ant.Target.execute(Target.java:435)</div><div>?at org.apache.tools.ant.Target.performTasks(Target.java:456)</div><div>?at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)</div><div>?at org.apache.tools.ant.Project.executeTarget(Project.java:1364)</div><div>?at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)</div><div>?at org.apache.tools.ant.Project.executeTargets(Project.java:1248)</div><div>?at org.apache.tools.ant.Main.runBuild(Main.java:851)</div><div>?at org.apache.tools.ant.Main.startAnt(Main.java:235)</div><div>?at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)</div><div>?at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)</div><div>Caused by: C:\Users\xxxxxxxxxxx\bin\Sencha\Cmd\3.1.2.342\plugin.xml:15: Problem: failed to create task or type x-script-def</div><div>Cause: The name is undefined.</div><div>Action: Check the spelling.</div><div>Action: Check that any custom tasks/types have been declared.</div><div>Action: Check that any &lt;presetdef&gt;/&lt;macrodef&gt; declarations have taken place.</div><div><br></div><div>?at org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:499)</div><div>?at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:431)</div><div>?at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)</div><div>?at org.apache.tools.ant.Task.perform(Task.java:347)</div><div>?at org.apache.tools.ant.Target.execute(Target.java:435)</div><div>?at org.apache.tools.ant.Target.performTasks(Target.java:456)</div><div>?at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)</div><div>?at org.apache.tools.ant.Project.executeTarget(Project.java:1364)</div><div>?at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)</div><div>?at org.apache.tools.ant.Project.executeTargets(Project.java:1248)</div><div>?at com.sencha.ant.AntScript.execute(AntScript.java:127)</div><div>?at com.sencha.command.plugin.PluginManager.execute(PluginManager.java:93)</div><div>?at com.sencha.command.plugin.PluginManager.executeReverseFirst(PluginManager.java:134)</div><div>?at com.sencha.command.environment.BuildEnvironment.execute(BuildEnvironment.java:66)</div><div>?at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:23)</div><div>?at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:120)</div><div>?at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div>?at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)</div><div>?at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div>?at java.lang.reflect.Method.invoke(Method.java:606)</div><div>?at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:174)</div><div>?at com.sencha.cli.Command.dispatch(Command.java:42)</div><div>?... 22 more</div><div><br></div><div>Total time: 9 seconds</div>
    <div><br></div><br>

  2. #2
    Sencha User
    Join Date
    Oct 2013
    Posts
    6

    Default

    Sorry for the html tags, but your forums software created it... another bug

    Here is the log again.. look for x-sencha-command asking for com/sencha/ant instead of the compass path
    Code:
    [x-sencha-init] Initializing Sencha Cmd ant environment
    [x-sencha-init] Adding antlib taskdef for com/sencha/command/compass/ant/antlib.xml
    [x-sencha-command]   [taskdef] Could not load definitions from resource com/sencha/ant/antlib.xml. It could not be found.
    [x-sencha-command]
    [x-sencha-command] init-plugin:
    [x-sencha-command]   [taskdef] Could not load definitions from resource com/sencha/ant/antlib.xml. It could not be found.
    [x-sencha-command]   [taskdef] Could not load definitions from resource com/sencha/ant/antlib.xml. It could not be found.
    [x-sencha-command]   [taskdef] Could not load definitions from resource com/sencha/ant/antlib.xml. It could not be found.
    [x-sencha-command]
    [x-sencha-command] cmd-root-plugin.init-properties:
    [x-sencha-command]
    [x-sencha-command] init-properties:
    [x-sencha-command]
    [x-sencha-command] init-sencha-command:
    [x-sencha-command]   [taskdef] Could not load definitions from resource com/sencha/ant/antlib.xml. It could not be found.
    [x-sencha-command]
    [x-sencha-command] init:
    [x-sencha-command] InvocationTargetException: null

  3. #3
    Sencha User
    Join Date
    Oct 2013
    Posts
    6

    Default

    and again readable the according build.tfs.xml (laying besides the projects' own build.xml)

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <project name="tfs" default="tfs-build">
      <import file="${basedir}/.sencha/app/build-impl.xml"/>
    
    
        <target name="tfs-build" depends="init">
          <attrib file="${basedir}/resources/default/app.css" readonly="false" />
          <taskdef resource="com/sencha/ant/antlib.xml">
            <classpath>
              <pathelement location="${cmd.dir}/sencha.jar"/>
            </classpath>
          </taskdef>
          <x-sencha-init dir="${basedir}"/>
          <x-sencha-command dir="${basedir}">
            <!-- for changing the theme -->
            <!--<property name="app.theme" value="theme-1"/>-->
            app
            build
          </x-sencha-command>
        
        </target>
    </project>

  4. #4
    Sencha User
    Join Date
    Oct 2013
    Posts
    6

    Default

    *bump

  5. #5
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165

    Default

    Can you talk more about what you're attempting to do by creating the custom target?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •