sling starter maven plugin - placing files to WEB-INF/lib

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

sling starter maven plugin - placing files to WEB-INF/lib

marc.davenport
Hello all,
In our previous application  based on Sling6 we used a maven assembly to build our application war.  In the assembly we placed some classes into WEB-INF/lib and made felix provide these.  I'm trying to shift us to use the sling start plugin so we can keep our features held together better by way of the model.txt files. We'd still like to include those files in WEB-INF/lib but I can not figure out how to put them there with the plugin, so I'm still using an assembly to unpack the war from SlingStart plugin and add our files.  We are using a property that we set in boot.txt to made felix provide the classes we want.  Just can't figure out how to get the libraries into the right place without taking two steps.

Any suggestions on how to do this?

Thanks,
Marc
Reply | Threaded
Open this post in threaded view
|

Re: sling starter maven plugin - placing files to WEB-INF/lib

Robert Munteanu-2
Hi Marc,

On Sat, 2019-03-02 at 13:58 -0800, Marc Davenport wrote:

> Hello all,
> In our previous application  based on Sling6 we used a maven assembly
> to build our application war.  In the assembly we placed some classes
> into WEB-INF/lib and made felix provide these.  I'm trying to shift
> us to use the sling start plugin so we can keep our features held
> together better by way of the model.txt files. We'd still like to
> include those files in WEB-INF/lib but I can not figure out how to
> put them there with the plugin, so I'm still using an assembly to
> unpack the war from SlingStart plugin and add our files.  We are
> using a property that we set in boot.txt to made felix provide the
> classes we want.  Just can't figure out how to get the libraries into
> the right place without taking two steps.
>
> Any suggestions on how to do this?

I took a quick look at the slingstart-maven-plugin source code and it
does not look like this is possible right now.

It may be possible to update the plugin to do that, so feel free to
file a Jira issue. I suspect that with all the attention that the
feature model is getting this maybe not be at the top of anyone's list,
so a pull request would go a long way towards making it happen.

I would also suggest that you try and stop relying in jar files in WEB-
INF/lib, but I guess you already tried that and it's not trivial.

Robert

Reply | Threaded
Open this post in threaded view
|

Re: sling starter maven plugin - placing files to WEB-INF/lib

marc.davenport
In reply to this post by marc.davenport
Thanks Robert.  I didn't see anything that indicated I could do this in the code, but I was also open to the idea that I was reading the wrong part of the model parsing. I think the person put things in WEB-INF because they were jars that were not OSGI bundles. I have seen people wrapping jars or injecting osgi meta data into the jars, but at this point I'm not sure the juice is worth the squeeze. I might have to just live with my current solution considering my time limit. If the feature model wasn't on the horizon, I'd definitely consider a pull request to making it happen.

Marc


----- Original Message -----
From: [hidden email]
To: [hidden email]
Sent: Monday, March 4, 2019 6:34:20 AM GMT -05:00 US/Canada Eastern
Subject: Re: sling starter maven plugin - placing files to WEB-INF/lib
is?

I took a quick look at the slingstart-maven-plugin source code and it
does not look like this is possible right now.

It may be possible to update the plugin to do that, so feel free to
file a Jira issue. I suspect that with all the attention that the
feature model is getting this maybe not be at the top of anyone's list,
so a pull request would go a long way towards making it happen.

I would also suggest that you try and stop relying in jar files in WEB-
INF/lib, but I guess you already tried that and it's not trivial.

Robert