Building clock with Barrel in CLI fails

When I build a clock without barrels, it just builds in the CLI. When I build it with a barrel, it fails; while it does just build & run when I build it within Eclipse. It also runs my barrel code, so all should be fine.

I'm getting this error: 

com.garmin.connectiq.common.manifest.ManifestException: [102] The Monkey Barrel dependency MyBarrel (version 0.0.0) could not be resolved. Please make sure the barrel path was linked to within the main application's jungle file.
at com.garmin.monkeybrains.ProjectBuilder.createBarrelContexts(ProjectBuilder.java:426)
at com.garmin.monkeybrains.Monkeybrains.runPRGCompiler(Monkeybrains.java:1234)
at com.garmin.monkeybrains.Monkeybrains.compileApplication(Monkeybrains.java:1024)
at com.garmin.monkeybrains.Monkeybrains.run(Monkeybrains.java:2317)
at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:254)
at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:236)
at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:283)

I guess I'm missing something in the jungle file, but I have no clue what I should add. Can't find anything in the docs about it. Anyone that knows what I'm doing wrong here?

  • What is the command line you're using?  Looking at the command line used in eclipse I see this where the path for both barrels.jungle and monkey.jungle are included:

    -f C:\Users\James\workspace-prod\SimLeanWU\barrels.jungle;C:\Users\James\workspace-prod\SimLeanWU\monkey.jungle  

  • Interesting! Didn't know I had to combine both files after the -f.
    However, still can't get it to work, not sure how I should combine these on Mac (zsh). 

    I'm no running this:
    monkeyc -d venu -f monkey.jungle -o bin/example.prg

    Which works when I copy the lines from the barrels.jungle into the monkey.jungle file. But that isn't the right way I think.

    When I run this, it fails as well. So I'll need a way to combine both jungle files.
    monkeyc -d venu -f monkey.jungle;barrels.jungle -o bin/example.prg

    Is there a way to inspect the commands Eclipse is using underneath?

  • Ok found that, should've looked harder before answering ;)

    Eclipse is -f at the end. If I didn't do that, it could find the -o flag. But now, when I run "monkeyc -d venu -o bin/example.prg -f monkey.jungle;barrels.jungle" I get the following error: ./monkey.jungle: line 1: project.manifest: command not found

    It still seems my zsh 
    doesn't combine the two files correctly and tries to run ./monkey.jungle as a separate command. Not sure why Eclipse is able to run it as one command.

  • Eclipse is showing the exact command it's using.what's the contents of your monkey.jungle file?

    for mine that don't use my own jungles, it's just

    project.manifest = manifest.xml

    for the barrels.jungle (with 2 barrels) it's this:

    # Do not hand edit this file. To make changes right click
    # on the project and select "Configure Monkey Barrels".
    
    BgWu = C:\Users\James\workspace-prod\BgWu\bin\BgWu.barrel
    base.barrelPath = $(base.barrelPath);$(BgWu)
    
    BgSettings = C:\Users\James\workspace-prod\BgSettings\bin\BgSettings.barrel
    base.barrelPath = $(base.barrelPath);$(BgSettings)
    
    

  • Mine looks just the same.

    I've been trying some other stuff, and it appears I needed to do this:
    monkeyc -d venu -o bin/example.prg -f "monkey.jungle;barrels.jungle"

    Wrapping them in quotes made it work. Strange that Eclipse doesn't need to do that while running the command. Anyway, I'm glad I've found the issue.

    Thank you so much for pointing me in the right direction!