Jenkins build

Hugo Cura's Avatar

Hugo Cura

03 Dec, 2014 02:53 PM

Hi,

I'm having trouble building my project on jenkins at the compileFlex task. Here's the error:

14:37:35 :spacelandzero:compileFlex[ant:java] Java Result: 1
14:37:35 FAILED
14:37:35
14:37:35 FAILURE: Build failed with an exception.
14:37:35
14:37:35 * What went wrong:
14:37:35 Execution failed for task ':spacelandzero:compileFlex'.
14:37:35 > java.lang.Exception: compc execution failed: Loading configuration file /home/jenkins/workspace/compartir.experimental/gradleFx/sdks/ba29ac275f02078f771853b488e4121ef6314ef4/frameworks/flex-config.xml
14:37:35 Apache Flex compc (Component Compiler)
14:37:35 Version 4.13.0 build 20140701
14:37:35 Copyright 2014 The Apache Software Foundation.
14:37:35
14:37:35 command line: Error: unable to open '/home/jenkins/workspace/compartir.experimental/gradleFx/sdks/ba29ac275f02078f771853b488e4121ef6314ef4/frameworks/libs/OSMF.swc'

I've defined flex sdk as dependency and locally it runs fine. Here's my gradle file:

apply plugin: 'gradlefx'

type = 'swc'

additionalCompilerOptions = [
        '-define=SPACELAND::LOGGER,false',
        '-define=SPACELAND::STATS,false',
        '-define=SPACELAND::ASSERT,false'
]

sdkAutoInstall {
    showPrompts = false
}

flexUnit {
    template = 'src/test/resources/FlexUnitRunner.mxml'
    timeout = 20000
    verbose = true
    haltOnFailure = true
}

dependencies {
    flexSDK group: 'org.apache', name: 'apache-flex-sdk', version: '4.13.0', ext: 'zip'

    merged group: 'king', name: 'gamedev_shared', version: '0.4.23', configuration: 'runtime'
    merged group: 'king', name: 'flatland', version: '0.6.6', configuration: 'runtime'
    merged group: 'king', name: 'spaceland', version: '0.43.4', configuration: 'runtime'

    test group: 'org.flexunit', name: 'flexunit', version: '4.2.0', ext: 'swc', classifier: 'flex'
    test group: 'org.flexunit', name: 'flexunit-uilistener', version: '4.2.0', ext: 'swc'
    test group: 'org.flexunit', name: 'flexunit-cilistener', version: '4.2.0', ext: 'swc'
    test group: 'org.flexunit', name: 'flexunit-tasks', version: '4.2.0'
}

Any ideas?

  1. Support Staff 1 Posted by Yennick Trevels on 03 Dec, 2014 03:22 PM

    Yennick Trevels's Avatar

    I experienced the same problem on my jenkins build server. locally you probably aren't running on Linux, but your jenkins probably is. Thing is that in the latest Flex SDK builds there's a mismatch in the naming of the osmf swc, where in one location it's mentioned in uppercase and somewhere else in lowercase. This causes this issue.

    I have logged this issue with Apache Flex, but it hasn't been resolved yet it seems: https://issues.apache.org/jira/browse/FLEX-34452

  2. 2 Posted by Hugo Cura on 03 Dec, 2014 03:36 PM

    Hugo Cura's Avatar

    Oh, damn. I'm running on a mac and jenkins is on linux. If I define flex sdk as an environment variable instead of a dependency, will it work?

  3. Support Staff 3 Posted by Yennick Trevels on 03 Dec, 2014 06:17 PM

    Yennick Trevels's Avatar

    What you maybe can do is the following:

    • keep the Flex SDK as a dependency
    • copy the flex-config.xml file into your project, and change the following to lowercase osmf.swc:

      <runtime-shared-library-path>
      <path-element>libs/OSMF.swc</path-element>
      <rsl-url>osmf_4.13.0.20140701.swf</rsl-url>
      
    • reference your custom flex-config.xml in your gradle build:

      additionalCompilerOptions = [ '-load-config', projectDir + '/flex-config.xml' ]

  4. 4 Posted by Hugo Cura on 04 Dec, 2014 03:19 PM

    Hugo Cura's Avatar

    I did what you suggested and now I'm getting this:

    * What went wrong:
    15:17:34.775 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':spacelandzero:compileFlex'.
    15:17:34.776 [ERROR] [org.gradle.BuildExceptionReporter] > java.lang.Exception: compc execution failed: Loading configuration file /Users/hugocura/Work/compartir/git/spacelandzero/flex-config.xml
    15:17:34.777 [ERROR] [org.gradle.BuildExceptionReporter] Apache Flex compc (Component Compiler)
    15:17:34.778 [ERROR] [org.gradle.BuildExceptionReporter] Version 4.13.0 build 20140701
    15:17:34.778 [ERROR] [org.gradle.BuildExceptionReporter] Copyright 2014 The Apache Software Foundation.
    15:17:34.779 [ERROR] [org.gradle.BuildExceptionReporter]
    15:17:34.780 [ERROR] [org.gradle.BuildExceptionReporter] /Users/hugocura/Work/compartir/git/spacelandzero/flex-config.xml(65): Error: unable to open 'libs/player/14.0/playerglobal.swc'
    15:17:34.780 [ERROR] [org.gradle.BuildExceptionReporter]
    15:17:34.781 [ERROR] [org.gradle.BuildExceptionReporter] </external-library-path>

    I've checked gradle cache and this file is inside the sdk. Any ideas?

  5. Support Staff 5 Posted by Yennick Trevels on 04 Dec, 2014 08:54 PM

    Yennick Trevels's Avatar

    Not really. It should look for that file relative from the 'frameworks' folder in the SDK, but that doesn't seem to happen.

  6. 6 Posted by Hugo Cura on 05 Dec, 2014 12:39 PM

    Hugo Cura's Avatar

    Ok. thanks. I'll try to think of something else.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac