TransformConfigurationProvider needs more maven
December 28, 2014 at 7:51 am #26680
I have looked at source TransformConfigurationProvider
to make IntelliJ green I had to add dependencies:
<dependency> <groupId>org.ocpsoft.rewrite</groupId> <artifactId>rewrite-api-servlet</artifactId> </dependency> <dependency> <groupId>org.ocpsoft.rewrite</groupId> <artifactId>rewrite-config-servlet</artifactId> </dependency>
I can attach a patch if wanted ..December 28, 2014 at 10:42 am #26681
This should not be necessary. The project depends on
rewrite-servletwhich is a shaded JAR containing all required dependencies. Not sure what is wrong in your case…December 28, 2014 at 3:07 pm #26682
Okay I understand that rewrite-servlet has the dependencies as nested dependencies (transitive)
I think that the problem is inside rewrite-servlet where dependencies are scoped as “provided”.
When I remove <scope>provided</scope> inside rewrite-servlet it works.
I see that rewrite-servlet is designed as an “uber” jar. There is used assembly plugin etc. to generate “uber-jar” effects.
The development tool do not understand the combination… Scope provided stops transitive dependencies and in concurrent time being inside rewrite project it self.
The problem only exists inside rewrite maven project it self. Using rewrite-servlet.jar from client projects does NOT have the problem.
So there are two possible solutions
1) Ignore the situation..
2) Add transitive dependencies where ever needed and scope them provided as well.December 29, 2014 at 3:11 am #26685
Hmmm. I’m not sure why rewrite-servlet declares provided-scoped dependencies. This doesn’t make sense to me as the shade plugin creates a “dependency-reduced pom” by removing the dependencies which are shaded. So IMHO the dependency scope should be “compile”.
@lincoln: Any thoughts on this?January 23, 2015 at 1:58 pm #26787
Lincoln Baxter IIIKeymaster
Ah, yes, I understand the problem. This is an IDE tooling issue. In order to work around this, you need to close the rewrite-servlet project in the IDE. Just remove or close it. It is really a build-only project. In fact, we could probably move it to a release profile in the POM so that it does not get included in the IDE workspace by default.January 23, 2015 at 3:35 pm #26788
Lincoln Baxter IIIKeymaster
We should absolutely not change the POM files. This is just a fact of how shading works 🙂January 24, 2015 at 2:52 am #26789
I agree to keep the main idea as now.
It works. Generation of rewrite-servlet (from maven) must work all the time. This could be less clear if we started to make rewrite-servlet in other profiles etc it could easy end up not being generated. What would cause lots of forum messages.
It is only inside the rewrite project you can have problems.
When I work inside the project I add dependencies like:
<!-- added below inner artifact that is part of rewrite-servlet begins --> <dependency> <groupId>org.ocpsoft.rewrite</groupId> <artifactId>rewrite-api</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.ocpsoft.rewrite</groupId> <artifactId>rewrite-api-servlet</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.ocpsoft.rewrite</groupId> <artifactId>rewrite-config-servlet</artifactId> <scope>provided</scope> </dependency> <!-- added below inner artifact that is part of rewrite-servlet ends -->
January 24, 2015 at 2:52 am #26790
- This reply was modified 2 years, 8 months ago by anderskristian.
You must be logged in to reply to this topic.