[ 
https://issues.apache.org/jira/browse/ODFTOOLKIT-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16171364#comment-16171364
 ] 

Olivier Cailloux edited comment on ODFTOOLKIT-464 at 9/19/17 9:08 AM:
----------------------------------------------------------------------

About tools.jar, I believe that the dependency from odfdom-java to taglets, as 
indicated in the 
[pom|https://repo1.maven.org/maven2/org/apache/odftoolkit/odfdom-java/0.8.11-incubating/odfdom-java-0.8.11-incubating.pom],
 should be simply removed.

That is because the dependency to taglets is there twice, the second time being 
correctly restricted to the maven-javadoc-plugin, using the tagletArtifact 
configuration as documented 
[here|https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html].

In concrete terms, I suggest to modify the 
[pom|https://repo1.maven.org/maven2/org/apache/odftoolkit/odfdom-java/0.8.11-incubating/odfdom-java-0.8.11-incubating.pom]
 and remove the following lines.
{quote}
<dependency>
<groupId>$\{project.groupId}</groupId>
<artifactId>taglets</artifactId>
<version>$\{project.version}</version>
</dependency>
{quote}


was (Author: oliviercailloux):
About tools.jar, I believe that the dependency from odfdom-java to taglets, as 
indicated in the 
[pom|https://repo1.maven.org/maven2/org/apache/odftoolkit/odfdom-java/0.8.11-incubating/odfdom-java-0.8.11-incubating.pom],
 should be simply removed.

That is because the dependency to taglets is there twice, the second time being 
correctly restricted to the maven-javadoc-plugin, using the tagletArtifact 
configuration as documented 
[here|https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html].

In concrete terms, I suggest to modify the 
[pom|https://repo1.maven.org/maven2/org/apache/odftoolkit/odfdom-java/0.8.11-incubating/odfdom-java-0.8.11-incubating.pom]
 and remove the following lines.
{quote}
<dependency>
<groupId>\$\{project.groupId}</groupId>
<artifactId>taglets</artifactId>
<version>${project.version}</version>
</dependency>
{quote}

> 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
>            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)

Reply via email to