Jar Stub library should be extracted into build script

Hi all,

While Generating my custom plugin using build solution, I am getting the error saying jar stub library should be extracted in build script. I am using third party jar in my plugin solution(added them as a java_stubs). please let me know how to resolve the above mentioned error.

Thanks
Raju
6 comments
You may try to Alt+Enter on the error and pick the "Load required ..." option. This will extract all dependencies defined in the solution into the build script.
0
Hi Vaclav,
Thanks for the reply.I tried with Alt+Enter and picked "Load required option" on the error which removed the error but when i tried compiling/generation, i can see same error "cannot find `mythirdparty.jar' in local layout".I am using MPS 3.1

Thanks
0
You are most likely not including the jar file in the plugin, because it is not located at the default expected location. You may try take inspiration from the attached snipped.

Vaclav
0
Hi Vaclav,

As you mentioned i have added the "thirdparty.jar" in the project structure and default layout sections in the build model.After that also i am  still facing same error as  "cannot find `thirdparty.jar' in local layout", below is my build file snippet, Please let me know how to resolve this,


project structure:
java library lib
  external jar //plugins/myplugin/runtime-libraries/thirdparty.jar

default layout:
import mpsStandalone::languages
import mpsStandalone::license
folder bin
  import files from mpsStandalone::bin
    include log.xml
    include log4j.dtd
  file $mps_home/bin/idea.properties
    replace regex "\.MPS(\w+)" /g -> \.${build.number}
   
folder lib
  import files from mpsStandalone::lib
    exclude MPS-src.zip
    exclude branding.jar
  jar branding.jar
    files of idea branding myplugin
     
folder plugins
  import mpsStandalone::plugins/svn4idea
  import mpsStandalone::plugins/cvsIntegration
  import mpsStandalone::plugins/git4idea
  import mpsStandalone::plugins/mps-core
  plugin myplugin
    folder runtime-libraries
      file $mps_home/lib/thirdparty.jar


Thanks
1

hi,

I actually face the same problem! I have added my jars and could clear the "cannot find `xyz.jar' in local layout" by adding them to the default layout (in the folder lib). however upon doing that the following error is "cannot build relative path to `xyz.jar': cannot build relative path for BuildLayout_Jar" Any idea how to solve this?

thanks!

0

I could solve my issue! I wongly used

 

default layout:

folder lib
  jar myjar.jar
       path/to/myjar.jar

[...] 

 

But the correct way is:

 

default layout:

  folder plugins
    plugin myPlugin 
      file path/to/myjar.jar
[...] 

1

Please sign in to leave a comment.