jira-importer commented on issue #181:
URL: 
https://github.com/apache/maven-war-plugin/issues/181#issuecomment-2967848335

   
**[elharo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=elh...@metalab.unc.edu)**
 commented
   
   This might be working as intended. "When A declares B as an optional 
dependency in its POM, this relationship remains unchanged. Its just like a 
normal build where Project-B will be added in its classpath....But when another 
project(Project-X) declares Project-A as a dependency in its POM, the optional 
dependency takes effect. You'll notice that Project-B is not included in the 
classpath of Project-X; you will need to declare it directly in your POM in 
order for B to be included in X's classpath." That is, it's all about the 
classpaths.
   
   So what's the classpath and what's the app in this scenario? In particular, 
is there a classpath for the web module that is unique to the web module? Or is 
there a separate, larger process that includes the files from the web module 
but also includes other things in the classpath?
   
   Another way of thinking about it: is there an app that depends on the web 
module that is running? (in which case the optional dependency should not be 
inlcuded) or is the web module the app? (in which case it should be included).
   
   Now if multiple class loaders are being used then it gets still more 
complex. I'm personally not sure what the right answer is here.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to