From: Stephen C. <ste...@ot...> - 2024-04-08 22:47:40
|
I am using Jason for the first time since the command-line interface was introduced. The interactive shell and the ability to write scripts are very useful features. However, they don't seem to be as easy to use with .mas2j files as they could be. My app needs a custom internal action that has a dependency on a jar file. Therefore, I ran these CLI commands: jason app create test --console cd test jason app add-ia <internal-action-class> [ I then edited the internal action code ] jason app add-gradle In the build.gradle file I noticed the dependency entry "implementation fileTree(dir: 'lib', include: '*.jar'), so I created a lib folder in my project and put the jar file in it. I could then run my MAS using "jason test.mas2j". However, this must be done before beginning an interactive jason shell. There does not seem to be a way to just start the MAS using Gradle within the shell. Is there a way to do that? Just entering "test.mas2j" (the CLI command with the initial "jason" removed) did not work. If I enter the interactive shell and do not start a new MAS then most CLI commands detect that my "test" MAS is running and use that. However, the command "agent run-as ..." results in the error message: "no local running MAS, so, no agent to run the commands". The "agent run-as" command also does not support the -mas-name argument. These two limitations seem unique to "agent run-as". For example, "agent start" detects a running MAS and also supports the -mas-name argument. Regards, Stephen Stephen Cranefield School of Computing University of Otago PO Box 56, Dunedin, New Zealand http://www.infosci.otago.ac.nz/stephen-cranefield/ |