ffang commented on PR #3821:
URL: https://github.com/apache/cxf/pull/3821#issuecomment-7384950045

   Thanks for the PR @marcosemiao , the approach (passing the dependency jars 
to XJC, which reads `META-INF/sun-jaxb.episode` itself) works well, and the IT 
passes locally. A few things I found by extending the IT project:
   
   1. **Reactor builds before `package`**: with `mvn compile` (or IDE workspace 
resolution) the sibling module's artifact is `target/classes`, not a jar, so 
`hasEpisode` returns false and the episode is silently ignored: 
`acme/lib/Foo.java` is generated again in `app`. With `mvn package` it works. 
Could a directory artifact be handled too, e.g. by passing `-b 
<dir>/META-INF/sun-jaxb.episode` when that file exists?
   2. **Transitive dependencies**: the javadoc says "direct compile and runtime 
dependencies", but `project.getArtifacts()` includes transitive ones (app -> 
mid -> lib uses lib's episode). Including them seems right to me; then the 
javadoc just needs updating.
   3. **`provided` scope**: a `provided` dependency with an episode is ignored. 
Shared model jars are often `provided`; could it be added to `EPISODE_SCOPES`?
   
   Minor: `Option.copyOptions` doesn't copy the new field, and since the jar is 
passed as `-xjc<path>`, a path containing a comma would be split by the XJC 
argument tokenizing.


-- 
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