The MPS build-language can be used to describe an ant build script for building your languages and solutions from the command line. The solution containing your build script is usually called the build-solution. There is also a section about the build-language in the official MPS docs
This page was written for and with MPS 2022.2
Reload Modules from Disk
(Intention) of that solution/model
jetbrains.mps.build
instead of the jetbrains.mps.core
the wizard generatesdependencies
section of your build script
dependencies:
mps (artifacts location $mps_home)
name.of.the.dependency (artifacts location <no artifacts>)
dependencies
section of your plugin plugin
With the default build script generated by the wizard, I have encountered a problem.
If in the build script of another project depend on the plugin built using that build script,
the location generated in the ant script is <plugin path="${build.tmp}/deps/name.of.the.dependency/name.of.the.dependency.zip/name.of.the.dependency" />
instead of the expected <plugin path="${artifacts.name.of.the.dependency}/name.of.the.dependency" />
.
This leads to the problem, that the plugin cannot be found by the build script when actually running it from the command line.
(Curiously, I’ve found there is no problem when using right-click -> Run on the build script in MPS)
I’ve determined that this is caused by the default layout
of the build script.
The wizard generates the build script in a way, where the default layout contains a zip containing the plugin.
But for the correct path to be generated, the first entry of the default layout must be the plugin itself.
It is fine, if there is a zip entry after the plugin entry.
Therefore, I suggest to change the default layout (of the build script of name.of.the.dependency
) to the following:
default layout:
plugin name.of.the.dependency [ auto packaging ]
# Readonly part ... # end of readonly part
<empty>
zip name.of.the.dependency.zip
plugin name.of.the.dependency [ auto packaging ]
# Readonly part ... # end of readonly part
<empty>
No such path in local layout
still occured after adding the file to the layout.
Unfold <solution name>
on the solution and looking at the dependencies.$project_home/solution/some.solution/libs/some.jar
instead of ./solution/some.solution/libs/some.jar
.$project_home = .
in my case.