Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Sencha Cmd v5.0.1.231 :: Difference in Ant usage from v5.0.0.160

    Success! Looks like we've fixed this one. According to our records the fix was applied for SDKTOOLS-1060 in 5.1.3.61.
  1. #1
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Posts
    59

    Default Sencha Cmd v5.0.1.231 :: Difference in Ant usage from v5.0.0.160

    I have a maven CI build building my app with Cmd v5.0.0.160 using the following antrun configuration:

    Code:
    <configuration>
    <target>
                                    <property name="cmd.dir" value="${sencha.command.location}"/>
                                    <property name="maven.target.dir" value="${project.build.directory}"/>
    
                                    <taskdef resource="com/sencha/ant/antlib.xml"
                                             classpath="${cmd.dir}/sencha.jar"/>
    
                                    <x-sencha-init/>
    
                                    <x-sencha-command dir="${project.basedir}/src/main/javascript/app">
                                        app
                                        build
                                    </x-sencha-command>
                                </target>
                            </configuration>
    Upgrading to Cmd v5.0.1.231 causes the following error:

    Code:
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (compile-extjs) on project xxxx-ui: An Ant BuildException has occured: The following error occurred while executing this line:
    [ERROR] jar:file:/Users/xxxx/bin/Sencha/Cmd/5.0.1.231/sencha.jar!/com/sencha/ant/antlib.xml:8: typedef class com.sencha.ant.Subtraction cannot be found
    [ERROR] using the classloader AntClassLoader[/Users/xxxx/bin/Sencha/Cmd/5.0.1.231/lib/ant-contrib-1.0b3.jar]
    [ERROR] around Ant part ...<taskdef resource="com/sencha/ant/antlib.xml" classpath="${cmd.dir}/sencha.jar"/>... @ 7:84 in /Users/xxxx/xxxx/xxx/xxxx/xxxx-ui/target/antrun/build-main.xml
    [E
    I had a dig around in the antlib.xml and noticed that there is a loaderref specified on the typedef.

    Changing the antrun configuration as follows fixes the issue:

    Code:
                            <configuration>
                                <target>
                                    <property name="cmd.dir" value="${sencha.command.location}"/>
                                    <property name="maven.target.dir" value="${project.build.directory}"/>
    
                                    <taskdef resource="com/sencha/ant/antlib.xml"
                                             classpath="${cmd.dir}/sencha.jar"
                                             loaderref="senchaloader"/>
    
                                    <x-sencha-init/>
    
                                    <x-sencha-command dir="${project.basedir}/src/main/javascript/kuro">
                                        app
                                        build
                                    </x-sencha-command>
                                </target>
                            </configuration>
    Is this intended or an unnoticed side effect as the documentation doesn't refer to specifying the loaderref?

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108

    Default

    I know there were some issues with 5.0.1 and Cmd 5.0.2 was released on Friday. Is the behavior the same with Cmd 5.0.2?
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Posts
    59

    Default

    Tested with 5.0.2.250 and the issue is still present.

  4. #4
    Sencha User
    Join Date
    Dec 2011
    Location
    Bratislava
    Posts
    12

    Default

    Thank you Miggins for sharing the solution, it saved me a lot of time!

  5. #5
    Sencha Premium Member
    Join Date
    Jul 2014
    Location
    Gilbert, AZ
    Posts
    8

    Default

    And 5.0.3.324

  6. #6
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Posts
    59

    Default

    ...and 5.1.0.13...

  7. #7
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default

    The "senchaloader" there is important for Ant to use a common class loader. Without it, we'd see a huge increase in memory consumption as classes get loaded repeatedly into multiple class loaders.
    Don Griffin

    "Use the source, Luke!"

  8. #8
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Posts
    59

    Default

    That's fine - but you need to update your documentation as it doesn't mention the new requirement for specifying 'loaderref'.

    I only got this working after unpacking sencha.jar and looking in the antlib.xml which is obviously not ideal.

  9. #9
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default

    Yikes! You're right that doc didn't get updated when we added that option. I've posted a fix - should show up next time we sync docs to production. Sorry for the hassle there.
    Don Griffin

    "Use the source, Luke!"

  10. #10
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748
    Don Griffin

    "Use the source, Luke!"

Page 1 of 2 12 LastLast

Posting Permissions

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