]> juplo.de Git - website/blob
4170ee8de419e9522ecd9a8e136aca2ebde3880a
[website] /
1 ---
2 _edit_last: "2"
3 author: kai
4 categories:
5   - explained
6 date: "2016-03-08T00:29:46+00:00"
7 guid: http://juplo.de/?p=711
8 parent_post_id: null
9 post_id: "711"
10 tags:
11   - createmedia.nrw
12   - java
13   - maven
14 title: 'Release Of A Maven-Plugin to Maven Central Fails With "error: unknown tag: goal"'
15 url: /release-of-a-maven-plugin-to-maven-central-fails-with-error-unknown-tag-goal/
16
17 ---
18 ## error: unknown tag: goal
19
20 Releasing a maven-plugin via Maven Central does not work, if you have switched to Java 8.
21 This happens, because hidden in the `oss-parent`, that you have to configure as `parent` of your project to be able to release it via Sonatype, the `maven-javadoc-plugin` is configured for you.
22 And the version of `javadoc`, that is shipped with Java 8, by default checks the syntax of the comments and fails, if anything unexpected is seen.
23
24 **Unfortunatly, the special javadoc-tag's, like `@goal` or `@phase`, that are needed to configure the maven-plugin, are unexpected for javadoc.**
25
26 ## Solution 1: Turn Of The Linting Again
27
28 As described elswehere, you can easily [turn of the linting](http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html "Read, how to turn of the automatic linting of javadoc in Java 8") in the plugins-section of your `pom.xml`:
29
30 ```xml
31 <plugin>
32   <groupId>org.apache.maven.plugins</groupId>
33   <artifactId>maven-javadoc-plugin</artifactId>
34   <version>2.7</version>
35   <configuration>
36     <additionalparam>-Xdoclint:none</additionalparam>
37   </configuration>
38 </plugin>
39
40 ```
41
42 ## Solution 2: Tell javadoc About The Unknown Tags
43
44 Another not so well known approach, that I found in a [fix](https://github.com/julianhyde/hydromatic-resource/commit/da5b2f203402324c68dd2eb2e5ce628f722fefbb "Read the fix with the additional configuration for the unknown tags") for [an issue of some project](https://github.com/julianhyde/hydromatic-resource/issues/1 "See the issue, that lead me to the fix"), is, to add the unknown tag's in the configuration of the `maven-javadoc-plugin`:
45
46 ```xml
47 <plugin>
48   <groupId>org.apache.maven.plugins</groupId>
49   <artifactId>maven-javadoc-plugin</artifactId>
50   <version>2.7</version>
51   <configuration>
52     <tags>
53       <tag>
54         <name>goal</name>
55         <placement>a</placement>
56         <head>Goal:</head>
57       </tag>
58       <tag>
59         <name>phase</name>
60         <placement>a</placement>
61         <head>Phase:</head>
62       </tag>
63       <tag>
64         <name>threadSafe</name>
65         <placement>a</placement>
66         <head>Thread Safe:</head>
67       </tag>
68       <tag>
69         <name>requiresDependencyResolution</name>
70         <placement>a</placement>
71         <head>Requires Dependency Resolution:</head>
72       </tag>
73       <tag>
74         <name>requiresProject</name>
75         <placement>a</placement>
76         <head>Requires Project:</head>
77       </tag>
78     </tags>
79   </configuration>
80 </plugin>
81
82 ```
83
84 ## Funded by the Europian Union
85
86 This article was published in the course of a
87 [resarch-project](http://yourshouter.com/projekte/crowdgest%C3%BCtzte-veranstaltungs-suchmaschine.html "Show details about the funded resarch-project"),
88 that is funded by the European Union and the federal state Northrhine-Wetphalia.
89
90 [![Europäische Union: Investitionen in unsere Zukunft - Europäischer Fonds für regionale Entwicklung](/img/EFRE_Foerderhinweis_deutsch_farbig.svg)![EFRE.NRW 2014-2020: Invesitionen in Wachstum und Beschäftigung](/img/Ziel2NRW_4c_1809_eps.svg)](http://yourshouter.com/projekte/crowdgest%C3%BCtzte-veranstaltungs-suchmaschine.html "Show details about the funded resarch-project")