Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter unmanaged dependencies that are statically included in /lib #255

Open
poornerd opened this issue Jul 9, 2014 · 4 comments
Open

Comments

@poornerd
Copy link

poornerd commented Jul 9, 2014

I have a few IBM Websphere Jars that are needed at compile time, but I want to exclude them from the WAR. I am not including them with sbt as artifacts because I needed to copy them from the WAS installation.

I can't figure out how to exclude them, because they don't seem to be recognized as artifacts. (should they be?)

What is the best way to do this aside from removing them from the finished WAR file with an ant script?

@yanns
Copy link
Member

yanns commented Jul 9, 2014

If the libs are recognized as artifacts, you can exclude them from the war with https://github.com/play2war/play2-war-plugin/wiki/Play2War-configuration#artifacts-to-filter-out-from-war

The question is why are these libs not recognized. Are they kind of special? (I mean apart from being from IBM... ;)

Another solution would be to mark these libs as "provided".

@poornerd
Copy link
Author

poornerd commented Jul 9, 2014

I have included these jars in my projects /lib directory (unmanaged dependencies - http://www.playframework.com/documentation/2.0/Anatomy ). How would I mark them as "provided"? They are not referenced as dependencies in the build.sbt .

Also, I don't want to add it to a local Maven repository, because that makes it more complicated for others in team to compile.

@dlecan
Copy link
Member

dlecan commented Jul 9, 2014

How would I mark them as "provided"?

I think you can't. These artifacts must be filtered by their name. So we can image a new configuration key:

  • Name: Play2WarKeys.filteredUnmanagedDependencies
  • Value: Seq[String]

Each dependency whose name is found in filteredUnmanagedDependencies won't be packaged in the WAR file.

Do you need that for Play2War 1.2 or 1.3 ?

@poornerd
Copy link
Author

poornerd commented Jul 9, 2014

I need it for 1.2

@poornerd poornerd changed the title How can I filter jar files that are statically included in my /lib ? How can I filter jar files that are statically included in my /lib ? (unmanaged dependencies) Jul 9, 2014
@dlecan dlecan changed the title How can I filter jar files that are statically included in my /lib ? (unmanaged dependencies) Filter unmanaged dependencies that are statically included in /lib Jul 10, 2014
@dlecan dlecan added this to the v1.2.1 milestone Jul 10, 2014
@dlecan dlecan modified the milestones: v1.3, v1.2.1 Feb 22, 2015
@dlecan dlecan modified the milestones: v1.3, backlog Aug 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants