You are viewing a plain text version of this content. The canonical link for it is here.
Posted to odf-dev@incubator.apache.org by "Svante Schubert (JIRA)" <ji...@apache.org> on 2017/09/19 10:05:01 UTC

[jira] [Resolved] (ODFTOOLKIT-464) Pom does not follow best practices: missing optional keyword

     [ https://issues.apache.org/jira/browse/ODFTOOLKIT-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Svante Schubert resolved ODFTOOLKIT-464.
----------------------------------------
    Resolution: Fixed
      Assignee: Svante Schubert

Thanks for the clarification, Olivier.

I have applied your suggested fix.
The ODFDOM build is still fine after removing the explicit tools.jar dependency as you had suggested. The implicit one within the JavaDoc description is sufficient.
And as on the latest branch (trunc) the latest Jena version is already used, the none API reference to LOG4J has vanished.

After the fix the simple API dependency tree looks after calling in the Simple Project on command line:
   mvn dependency:tree

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Simple Java API for ODF (Simple ODF) 0.9.0-incubating-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ simple-odf ---
[INFO] org.apache.odftoolkit:simple-odf:jar:0.9.0-incubating-SNAPSHOT
[INFO] +- org.apache.odftoolkit:odfdom-java:jar:0.9.0-incubating-SNAPSHOT:compile
[INFO] |  +- org.apache.jena:jena-core:jar:3.2.0:compile
[INFO] |  |  +- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] |  |  +- org.apache.jena:jena-iri:jar:3.2.0:compile
[INFO] |  |  +- commons-cli:commons-cli:jar:1.3:compile
[INFO] |  |  \- org.apache.jena:jena-base:jar:3.2.0:compile
[INFO] |  |     +- org.apache.jena:jena-shaded-guava:jar:3.2.0:compile
[INFO] |  |     +- org.apache.commons:commons-csv:jar:1.3:compile
[INFO] |  |     +- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] |  |     \- com.github.andrewoma.dexx:collection:jar:0.6:compile
[INFO] |  +- net.rootdev:java-rdfa:jar:0.4.2:compile
[INFO] |  \- commons-validator:commons-validator:jar:1.6:compile
[INFO] |     +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] |     +- commons-digester:commons-digester:jar:1.8.1:compile
[INFO] |     +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |     \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- xerces:xercesImpl:jar:2.11.0:compile
[INFO] +- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] \- junit:junit:jar:4.12:test
[INFO]    \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] ------------------------------------------------------------------------


> Pom does not follow best practices: missing optional keyword
> ------------------------------------------------------------
>
>                 Key: ODFTOOLKIT-464
>                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-464
>             Project: ODF Toolkit
>          Issue Type: Bug
>          Components: simple api
>            Reporter: Olivier Cailloux
>            Assignee: Svante Schubert
>            Priority: Minor
>
> When depending on Apache ODFToolkit simple-odf in my application (org.apache.odftoolkit:simple-odf:0.8.2-incubating), I observe that com.sun:tools is transitively imposed on my project as a dependency (coming from taglets, see its [POM|https://repo1.maven.org/maven2/org/apache/odftoolkit/taglets/0.8.11-incubating/taglets-0.8.11-incubating.pom], coming from [org.apache.odftoolkit:odfdom-java:0.8.11-incubating|http://search.maven.org/#search%7cgav%7c1%7cg%3A%22org.apache.odftoolkit%22%20AND%20a%3A%22odfdom-java%22]). Similarly, org.slf4j:slf4j-log4j12 is passed to my project as a dependency.
> I suspect these dependencies are actually not required for projects depending on simple-odf.
> It is possible and simple to ease the life of users of simple-odf by adding <optional> in the relevant pom files. This would respect Maven best practices. (See for example [SO|https://stackoverflow.com/questions/32231814/how-can-i-remove-logback-from-a-librarys-dependency-while-keeping-slf4j].)
> Workaround: add exclusion rules for these artifacts (see this example [POM|https://github.com/oliviercailloux/Test-ODFToolkit-ODS/blob/master/pom.xml]).
> (I tried to discuss it [here|https://lists.apache.org/thread.html/6fa4257e67ede90bac58f5518e1be41e7561a451149cbc9eecdbbf1e@%3Codf-users.incubator.apache.org%3E] but received no answer.)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)