1. #21
    Sencha User
    Join Date
    May 2009
    Posts
    136
    Vote Rating
    5
    DiscoBoy is on a distinguished road

      0  

    Default


    I finally made it starting to compile, at least I get some trailing comma warnings...
    But then, (3.1.1) suddenly stops with a "java.lang.OutOfMemoryError: Java heap space" error. I'm using it with JRE7 from within Eclipse and the following ANT script:

    Code:
        <property name="cmd.dir" location="build/lib/sencha-cmd-${senchaCMD}" />
        <taskdef resource="com/sencha/ant/antlib.xml" classpath="${cmd.dir}/sencha.jar" />
        <x-extend-classpath>
            <jar path="${cmd.dir}/sencha.jar" />
        </x-extend-classpath>
        <x-sencha-init prefix="" />
        
        <!-- Sencha Compile -->
        <target name="compile">
            <property name="app.dir" location="${basedir}/app" />
            <property name="sdk.dir" location="${basedir}/lib/${extjs}" />
            <property name="out.dir" location="${basedir}/tests" />
            
            <x-sencha-command>
                compile
                --classpath=${app.dir},${sdk.dir}
                --debug=true
                page
                    --yui
                    --in=../build.html
                    --out=${out.dir}/index.html
            </x-sencha-command>
        </target>
    I have no .sencha configuration folder in my project as this was previously stopping any compilation with a NULLPointer exception. Is this cfg folder realy necessary?

    This is the HTML file I use for the compilation:

    HTML Code:
    <html>
        <head>
            <!-- Stylesheets -->
            <link rel="stylesheet" type="text/css" href="lib/ext-4.1.1a/resources/css/ext-all-gray.css" />
            <link rel="stylesheet" type="text/css" href="resources/global/css/application.css" />
            
            <!-- Scripts -->
            <script type="text/javascript">appConfig={dev:false}</script>
            
            <!-- <x-compile> -->
                <!-- <x-bootstrap> -->
                <script type="text/javascript" src="lib/ext-4.1.1a/ext-debug.js"></script>
                <!-- </x-bootstrap> -->
            <script type="text/javascript" src="dev.js"></script>
            <!-- </x-compile> -->
            
        </head>
    </html>

  2. #22
    Sencha User
    Join Date
    Apr 2011
    Posts
    29
    Vote Rating
    0
    jonathanmv is on a distinguished road

      0  

    Default Sencha CMD and Jenkins

    Sencha CMD and Jenkins


    Hi,

    Has anyone tried to run sencha app build from a Jenkins Job?
    I'm stuck with this. I would like to define a job in Jenkins to run the sencha app build command in order to get the built package of my extjs app.

    Here's the command I run as 'Execute Shell' in the build section:

    Code:
    chdir ${WORKSPACE}
    export PATH=/home/jonathanmv/bin/Sencha/Cmd/3.1.2.342:$PATH
    export SENCHA_CMD_3_0_0="/home/jonathanmv/bin/Sencha/Cmd/3.1.2.342"
    sencha app build
    and this is the output I get from the Failed build:

    Code:
    Started by user anonymous
    Building in workspace /var/lib/jenkins/jobs/JenkinsTest/workspace
    [workspace] $ /bin/sh -xe /tmp/hudson6041604974211107502.sh
    + chdir /var/lib/jenkins/jobs/JenkinsTest/workspace
    + export PATH=/home/jonathanmv/bin/Sencha/Cmd/3.1.2.342:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
    + export SENCHA_CMD_3_0_0=/home/jonathanmv/bin/Sencha/Cmd/3.1.2.342
    + sencha app build
    [INF] Including theme package ext-theme-classic for app.theme=ext-theme-classic build
    Sencha Cmd v3.1.2.342
    [INF] 
    [INF] init-plugin:
    [INF] 
    [INF] cmd-root-plugin.init-properties:
    [INF] 
    [INF] init-properties:
    [INF] 
    [INF] init-sencha-command:
    [INF] 
    [INF] init:
    [INF] 
    [INF] app-build-impl:
    [INF] 
    [INF] -before-init-local:
    [INF] 
    [INF] -init-local:
    [INF] 
    [INF] -after-init-local:
    [INF] 
    [INF] init-local:
    [INF] 
    [INF] find-cmd:
    [INF] 
    [INF] -before-init:
    [INF] 
    [INF] -init:
    [INF] Initializing Sencha Cmd ant environment
    [INF] Including theme package ext-theme-classic for app.theme=ext-theme-classic build
    [INF] Adding antlib taskdef for com/sencha/command/compass/ant/antlib.xml
    [INF] [x-load-properties] Loading optional properties file /var/lib/jenkins/jobs/JenkinsTest/workspace/.sencha/app/production.properties
    [INF] [x-load-properties] Loading required properties file /var/lib/jenkins/jobs/JenkinsTest/workspace/.sencha/app/build.properties
    [INF] 
    [INF] -after-init:
    [INF] 
    [INF] -before-init-default:
    [INF] 
    [INF] -init-default:
    [INF] 
    [INF] -after-init-default:
    [INF] 
    [INF] init:
    [INF] 
    [INF] -before-build:
    [INF] 
    [INF] page:
    [INF] 
    [INF] -before-page:
    [INF] 
    [INF] -page:
    [INF] Including theme package ext-theme-classic for app.theme=ext-theme-classic build
    [INF] Including theme package ext-theme-classic for app.theme=ext-theme-classic build
    [INF] Compiling page full-page
    [ERR] Error executing page compilation com.sencha.exceptions.BasicException: Cannot find file: /var/lib/jenkins/jobs/JenkinsTest/workspace/sencha-compile-temp-dir/8c241e1e-9d9b-448e-9c9c-9a9b938e5eaa/script-file-1.js
    [ERR] 
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExBuild: com.sencha.exceptions.ExBuild: com.sencha.exceptions.BasicException: Cannot find file: /var/lib/jenkins/jobs/JenkinsTest/workspace/sencha-compile-temp-dir/8c241e1e-9d9b-448e-9c9c-9a9b938e5eaa/script-file-1.js
    [ERR] 
    [ERR] Total time: 2 seconds
    [ERR] The following error occurred while executing this line:
    /var/lib/jenkins/jobs/JenkinsTest/workspace/.sencha/app/build-impl.xml:596: The following error occurred while executing this line:
    /var/lib/jenkins/jobs/JenkinsTest/workspace/.sencha/app/build-impl.xml:556: com.sencha.exceptions.ExBuild: com.sencha.exceptions.ExBuild: com.sencha.exceptions.BasicException: Cannot find file: /var/lib/jenkins/jobs/JenkinsTest/workspace/sencha-compile-temp-dir/8c241e1e-9d9b-448e-9c9c-9a9b938e5eaa/script-file-1.js
    Build step 'Execute shell' marked build as failure
    Finished: FAILURE
    Could somebody guide me please? Maybe I am focusing on the wrong things or missing the obvious ones.

    Thank you in advance

  3. #23
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,428
    Vote Rating
    151
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    Quote Originally Posted by jonathanmv View Post
    and this is the output I get from the Failed build:

    Code:
    Started by user anonymous
    Building in workspace /var/lib/jenkins/jobs/JenkinsTest/workspace
    [workspace] $ /bin/sh -xe /tmp/hudson6041604974211107502.sh
    + chdir /var/lib/jenkins/jobs/JenkinsTest/workspace
    + export PATH=/home/jonathanmv/bin/Sencha/Cmd/3.1.2.342:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
    + export SENCHA_CMD_3_0_0=/home/jonathanmv/bin/Sencha/Cmd/3.1.2.342
    + sencha app build
    [INF] Including theme package ext-theme-classic for app.theme=ext-theme-classic build
    Sencha Cmd v3.1.2.342
    [INF] 
    ...
    [INF] Compiling page full-page
    [ERR] Error executing page compilation com.sencha.exceptions.BasicException: Cannot find file: /var/lib/jenkins/jobs/JenkinsTest/workspace/sencha-compile-temp-dir/8c241e1e-9d9b-448e-9c9c-9a9b938e5eaa/script-file-1.js
    [ERR] 
    [ERR] BUILD FAILED
    Could somebody guide me please? Maybe I am focusing on the wrong things or missing the obvious ones.

    Thank you in advance
    Looks like the index.html content is having some troubles. The script-file-1.js file is generated from the x-compile block of your page. Can you provide that here?

    Also, does your build run locally? If so, it may be some kind of permissions issue - maybe Cmd was unable to write the file and that later causes the file not found issue. Hard to say for sure here but starting with a locally runnable build is key.
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  4. #24
    Sencha User
    Join Date
    May 2014
    Posts
    5
    Vote Rating
    0
    nikhil14 is on a distinguished road

      0  

    Default


    Quote Originally Posted by paul_wang View Post
    Ah, I found the file it wants. It's looking for sencha.cfg. If I copy the file to the current directory then it works.

    Is there a reason this dependency exists? Thanks.
    Hi Paul,
    Can you please tell me did you copied the sencha.cfg file manually or included it in ant script?