jira-importer commented on issue #53:
URL: 
https://github.com/apache/maven-jdeps-plugin/issues/53#issuecomment-2955089504

   **[b. 
ohnsorg](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=b.ohnsorg)**
 commented
   
   From time to time I run into this issue and it is annoying enough so I had a 
look at the code. Basically I know what to do to push the classpath-resources 
into a new command option. I'm only uncertain how to derive it from runtime 
environment.
   
    
   
   I can think of at least two options: double -cp and put all the elements 
from classpath into module-path, too. Another option would be a 
\<dependency>-structure, explictely configuring which modules to take into 
consideration. This could also be some sort of include/ exclude-thing to filter 
classpath-elements. Then the filtered list is put into module-path-option.
   
    
   
   I often stumble across this with modularized projects, looking like this:
   
    
   
   ```java
   /-pom.xml: root with all modules/ packaging=pom
      |- assets: not containing anything relevant for the Maven-portion of this 
project
      |- <name>-app/pom.xml: binding all the tiny bits into a deliverable
      |- <name>-config/pom.xml: configuration module, constants, loading 
preferences
      |- <name>-api/pom.xml: pure contracting, only interfaces
      |- <name>-model/pom.xml: model elements/ transfer objects
      |- <name>-ui/pom.xml: ui-components
   
   ```
   
   Such projects often build the dependency chain like:
   
   ```java
   api <- model
   
   config <- ui
   model <- ui
   
   ui <- app
   ```
   
   Thus I'd be comfortable with for example ui's pom.xml to have a jdeps-config 
like the following (where \<name> is replaced with something like foobar, e.g. 
foobar-ui, foobar-model etc.):
   
   ```java
   <plugin>
     <configuration>
      <modulePathInclude>foobar*</modulePathInclude>
     </configuration>
   </plugin> 
   ```
   
   Which in turn would copy all classpath-elements matching this filter to the 
module-path-argument.
   
    
   
   (?) Is it necessary to remove those elements from the -cp argument then?
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to