Dependency reduced POM

8 views
Skip to first unread message

Alessandro Falappa

unread,
Oct 28, 2021, 10:11:23 AM10/28/21
to Group: okapi-devel
Hello all,
  in commit cfca32b0d53ad351c6082e88438c7e1a10a5b8a3 (Feb 16th) the creation of the dependency reduced POM in the combined okapi-lib artifact (in okapi/deployment/okapi-framework-sdk/pom.xml) was disabled.
As a result if I create a maven project depending on net.sf.okapi:okapi-lib I get in my project classpath duplicate entries for almost every Okapi class the first in the combined okapi-lib artifact and the second in the original artifact.

What was the rationale of that modification?

Regards,


Alessandro Falappa
Integrations Team Leader

jim

unread,
Oct 28, 2021, 10:45:00 AM10/28/21
to okapi...@googlegroups.com
Mihai made that change we can ask him during the meeting this morning if he attends.

Jim
--
You received this message because you are subscribed to the Google Groups "okapi-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/okapi-devel/CAE7HRi%2B86-kqgDi%2BCuTLbijaVo7yx6U2bCjeeSMK12%3DjQ6xhkQ%40mail.gmail.com.

Alessandro Falappa

unread,
Oct 29, 2021, 10:23:49 AM10/29/21
to okapi...@googlegroups.com
The correct configuration of the shade plugin in my opinion is:
  <configuration>
    <createDependencyReducedPom>true</createDependencyReducedPom>
    <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
    ...
This creates a consolidated artifact with all the classes of the first level dependencies and declares in the POM of that artifact the second level dependencies.

When issuing maven install the dependency reduced POM is copied in the local maven repository:
...
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ okapi-lib ---
[INFO] Installing C:\Users\a.falappa\IdeaProjects\okapiframework\okapi\deployment\okapi-framework-sdk\target\okapi-lib-1.42.0-SNAPSHOT.jar to C:\Users\a.falappa\.m2\repository\net\sf\okapi\okapi-lib\1.42.0-SNAPSHOT\okapi-lib-1.42.0-SNAPSHOT.jar
[INFO] Installing C:\Users\a.falappa\IdeaProjects\okapiframework\okapi\deployment\okapi-framework-sdk\dependency-reduced-pom.xml to C:\Users\a.falappa\.m2\repository\net\sf\okapi\okapi-lib\1.42.0-SNAPSHOT\okapi-lib-1.42.0-SNAPSHOT.pom
[INFO] Installing C:\Users\a.falappa\IdeaProjects\okapiframework\okapi\deployment\okapi-framework-sdk\target\okapi-lib-1.42.0-SNAPSHOT-tests.jar to C:\Users\a.falappa\.m2\repository\net\sf\okapi\okapi-lib\1.42.0-SNAPSHOT\okapi-lib-1.42.0-SNAPSHOT-tests.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
...

I have opened a PR to fix this before the next release.

Regards


Alessandro Falappa
Integrations Team Leader

Reply all
Reply to author
Forward
0 new messages