Library usage problem

My language references in generator aspect to the junit library. I wanted to know what's best practice. I found the jetbrains.mps.baseLanguage.unitTest.libs where I have all I need for generation. But the problem with that is, how do I export this into an IntelliJ plugin. The other approach was I downloaded the junit.jar and put it into my languages' folder and inserted it into the properties/java and in libraries there. This allows me to build the IntelliJ plugin within MPS with ant. But in IntelliJ following occurs:

AssertionError: No backslashes are allowed in JAR entry path: C:/Users/pfu/.IdeaIC14/config/plugins/MetaUnit/languages/MetaUnit/C:\Users\pfu\.IdeaIC14\config\plugins\MetaUnit\languages\MetaUnit\metaunit-src.jar!/module\junit-4.11.jar

Program Versions:
IntelliJ IDEA 14.1.5
MPS 3.2.3

So should I use anyhow the build-in lib from MPS or the approach with the .jar directly in my language?

The error in Intellij how do I fix it?


I could solve it :). Originally I did it like this, but I left out the steps:

In the common tab click on "add model root", select "javaclasses" and navigate to your lib folder
Now select the jar(s) listed on the right of the properties window and click on the blue "Models" button

Just curious why this steps are necessary?

Thank you very much
The mentioned steps ensure that the jars are actually made part of the solution as stub models.
Ah I see. Anyways the assertion error is now completely gone for me, the only thing I changed was reinstall IntelliJ. Now using IntelliJ Ultimate :)

Thank you!

Please sign in to leave a comment.