Creating a custom Job DSL framework jar

16 views
Skip to first unread message

Substance586

unread,
Feb 7, 2018, 5:05:39 PM2/7/18
to job-dsl-plugin
We have been using Job DSL in my organization for almost 3 years and we have been using a customized copy of the Job DSL Gradle Example project up until now and it has worked very well for us.   However all this success with Job DSL has led to a very large project and now I would like to create a separation between our reusable framework pieces (essentially everything in our current Job DSL workspace's src/main/ folder) and the pipelines created by various teams.  

I figured this would be as easy as:
  1. Copy our existing Job DSL workspace into a new workspace, where the former will become the framework code workspace and the latter will mainly just contain the existing jobs/ folder (and could be the first of many such workspaces)
  2. Package our existing Job DSL workspace as a jar and store it on our binary repository
  3. Add the jar created in step 1 as a dependency in the new workspace
  4. Remove the now-redundant framework code (src/main/**) from the new workspace and rely on the framework code provided in the jar
This seems straightforward enough but things go haywire in step 4, where it appears that I'm able to pull my jar into the new workspace just fine (I can see it in /build/libs/) but I can't get the workspace to recognize the framework classes.

My first question is if this is a valid approach for sharing Job DSL code within my organization?  If so, then I'll get into the specific errors that I'm seeing.  
Reply all
Reply to author
Forward
0 new messages