-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maven shade intergration #52
Comments
I'm using Retrolambda and Shade plugins together in https://github.com/orfjackal/jumi without any problems. First the Retrolambda plugin backports the bytecode and then the Shade plugin does its thing. Why would you want to integrate them? The Shade plugin's transformer API is probably too limited for Retrolambda. |
I use shade plugin to make a jar with all-reasonably-required-dependencies. Some of them are java8. Maybe I configured it in a wrong way - i tried to do in the same way as you did in https://github.com/orfjackal/jumi/blob/master/parent/pom.xml - could you please provide more concrete example ? <plugin>
<groupId>net.orfjackal.retrolambda</groupId>
<artifactId>retrolambda-maven-plugin</artifactId>
<version>2.0.2</version>
<executions>
<execution>
<goals>
<goal>process-main</goal>
<goal>process-test</goal>
</goals>
</execution>
</executions>
<configuration>
<target>1.7</target>
<java8home>${env.JAVA_HOME8}</java8home>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>...</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
|
OK. The Retrolambda plugin doesn't backport the dependencies. As a workaround you should backport each Java 8 dependency individually and publish it as a Java 7 compatible jar file. |
The actual workaround is run custom shell script that runs java -jar retrolambda.jar - I suppose it would be better to backport dependencies in plugin too. |
This might be solvable by implementing issue #44, after which Retrolambda could be used to process the JAR file which the Shade plugin generates. However, it would be best to do the backporting inside the dependency project, so that all of the project's tests would be run against the backported classes. Otherwise there is some possibility that the project uses features which Retrolambda doesn't backport. |
Is it possible to integrate with shade maven plugin ?
like transformer class?
The text was updated successfully, but these errors were encountered: