You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer writing an j2cl application, I want to be able to modify upstream maven module poms such that I have ability to add/remove dependencies as necessary to make it j2cl compatible.
Unlike with the <dependencyReplacements>, I don't want to replace the jar contents. Just the pom itself.
As an example, let's look at dagger2. Dagger2 contains a transitive dependency of javax.inject. As this is a dependency on the jar and not the sources, there are issues with j2cl compiling dagger2. I would like to be able to essentially rewrite the dagger2 pom to add the additional dependency to the javax.inject sources.
One possible solution to this would be to create an extra <configuration> section to swap poms. Then when the j2cl maven plugin needs to compile any module with a pom replacement, it'll use that pom for gathering dependencies instead; and possible replacing the <groupId> and <artifactId>'s as necessary.
Quick thought on this: chances are any replacement pom will end up being published as packaging=pom, we'll need to verify that this doesn't affect trying to explain to maven that the updated dependency still has the old artifacts attached to it. It should probably be fine, since it is legal to attach an artifact to a packaging=pom project.
I have 80% of a test case finished for this, just having trouble because the plugin is a bit too clever about figuring out where your sources are for a reactor project. Will link a branch soon for discussion.
As a developer writing an j2cl application, I want to be able to modify upstream maven module poms such that I have ability to add/remove dependencies as necessary to make it j2cl compatible.
Unlike with the
<dependencyReplacements>
, I don't want to replace the jar contents. Just the pom itself.As an example, let's look at dagger2. Dagger2 contains a transitive dependency of javax.inject. As this is a dependency on the jar and not the sources, there are issues with j2cl compiling dagger2. I would like to be able to essentially rewrite the dagger2 pom to add the additional dependency to the javax.inject sources.
One possible solution to this would be to create an extra
<configuration>
section to swap poms. Then when the j2cl maven plugin needs to compile any module with a pom replacement, it'll use that pom for gathering dependencies instead; and possible replacing the<groupId>
and<artifactId>
's as necessary.The text was updated successfully, but these errors were encountered: