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

ASF GitHub Bot commented on OPENNLP-1222:
-----------------------------------------

tteofili closed pull request #335: OPENNLP-1222 - build OpenNLP with java11
URL: https://github.com/apache/opennlp/pull/335
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/opennlp-tools/src/main/java/opennlp/tools/langdetect/LanguageDetectorFactory.java
 
b/opennlp-tools/src/main/java/opennlp/tools/langdetect/LanguageDetectorFactory.java
index 422a98d9c..b98988771 100644
--- 
a/opennlp-tools/src/main/java/opennlp/tools/langdetect/LanguageDetectorFactory.java
+++ 
b/opennlp-tools/src/main/java/opennlp/tools/langdetect/LanguageDetectorFactory.java
@@ -28,9 +28,9 @@
 
 
 /**
- * <p>Default factory used by Language Detector. Extend this class to change 
the Language Detector
- * behaviour, such as the {@link LanguageDetectorContextGenerator}.</p>
- * <p>The default {@link DefaultLanguageDetectorContextGenerator} will use 
char n-grams of
+ * Default factory used by Language Detector. Extend this class to change the 
Language Detector
+ * behaviour, such as the {@link LanguageDetectorContextGenerator}.
+ * The default {@link DefaultLanguageDetectorContextGenerator} will use char 
n-grams of
  * size 1 to 3 and the following normalizers:
  * <ul>
  * <li> {@link EmojiCharSequenceNormalizer}
@@ -39,7 +39,7 @@
  * <li> {@link NumberCharSequenceNormalizer}
  * <li> {@link ShrinkCharSequenceNormalizer}
  * </ul>
- * </p>
+ *
  */
 public class LanguageDetectorFactory extends BaseToolFactory {
 
diff --git 
a/opennlp-tools/src/main/java/opennlp/tools/ml/model/DataIndexer.java 
b/opennlp-tools/src/main/java/opennlp/tools/ml/model/DataIndexer.java
index 6c2955c67..e03382e54 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/ml/model/DataIndexer.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/ml/model/DataIndexer.java
@@ -85,7 +85,7 @@
   /**
    * Performs the data indexing. Make sure the init(...) method is called 
first.
    * 
-   * @param eventStream {@link ObjectStream<Event>}
+   * @param eventStream a stream of events
    */
   void index(ObjectStream<Event> eventStream) throws IOException;
 }
diff --git a/opennlp-tools/src/main/java/opennlp/tools/util/StringUtil.java 
b/opennlp-tools/src/main/java/opennlp/tools/util/StringUtil.java
index 3ed769bd4..c3bd7e603 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/StringUtil.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/StringUtil.java
@@ -101,11 +101,11 @@ public static String toUpperCase(CharSequence string) {
   }
 
   /**
-   * Returns <tt>true</tt> if {@link CharSequence#length()} is
-   * <tt>0</tt> or <tt>null</tt>.
+   * Returns {@code true} if {@link CharSequence#length()} is
+   * {@code 0} or {@code null}.
    *
-   * @return <tt>true</tt> if {@link CharSequence#length()} is <tt>0</tt>, 
otherwise
-   *         <tt>false</tt>
+   * @return {@code true} if {@link CharSequence#length()} is {@code 0}, 
otherwise
+   *         {@code false}
    *
    * @since 1.5.1
    */
diff --git 
a/opennlp-tools/src/main/java/opennlp/tools/util/TrainingParameters.java 
b/opennlp-tools/src/main/java/opennlp/tools/util/TrainingParameters.java
index 6fc351c1f..8006a4d66 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/util/TrainingParameters.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/util/TrainingParameters.java
@@ -311,23 +311,25 @@ public void serialize(OutputStream out) throws 
IOException {
   }
 
   /**
-   * get a String parameter
+   * get a String parameter.
+   *
+   * {@link java.lang.ClassCastException} can be thrown if the value is not 
{@code String}
    * @param key
    * @param defaultValue
    * @return
-   * @throws {@link java.lang.ClassCastException} can be thrown if the value 
is not {@link String}
    */
   public String getStringParameter(String key, String defaultValue) {
     return getStringParameter(null, key, defaultValue);
   }
 
   /**
-   * get a String parameter in the specified namespace
+   * get a String parameter in the specified namespace.
+   *
+   * {@link java.lang.ClassCastException} can be thrown if the value is not 
{@link String}
    * @param namespace
    * @param key
    * @param defaultValue
    * @return
-   * @throws {@link java.lang.ClassCastException} can be thrown if the value 
is not {@link String}
    */
   public String getStringParameter(String namespace, String key, String 
defaultValue) {
     Object value = parameters.get(getKey(namespace, key));
diff --git a/pom.xml b/pom.xml
index 37a37e42b..4e69fdd94 100644
--- a/pom.xml
+++ b/pom.xml
@@ -139,7 +139,7 @@
                <java.version>1.8</java.version>
                <maven.compiler.target>1.8</maven.compiler.target>
                <maven.version>3.3.9</maven.version>
-               <enforcer.plugin.version>1.4.1</enforcer.plugin.version>
+               <enforcer.plugin.version>3.0.0-M2</enforcer.plugin.version>
                <junit.version>4.12</junit.version>
                <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
                <opennlp.forkCount>1.0C</opennlp.forkCount>
@@ -162,6 +162,12 @@
                                        </configuration>
                                </plugin>
 
+                               <plugin>
+                                       
<groupId>org.apache.maven.plugins</groupId>
+                                       
<artifactId>maven-assembly-plugin</artifactId>
+                                       <version>3.1.0</version>
+                               </plugin>
+
                                <plugin>
                                        <groupId>org.apache.felix</groupId>
                                        
<artifactId>maven-bundle-plugin</artifactId>
@@ -315,6 +321,7 @@
 
                        <plugin>
                                <artifactId>maven-javadoc-plugin</artifactId>
+                               <version>3.0.1</version>
                                <configuration>
                                        
<additionalparam>-Xdoclint:none</additionalparam>
                                </configuration>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Make it possible to build OpenNLP with java 11
> ----------------------------------------------
>
>                 Key: OPENNLP-1222
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1222
>             Project: OpenNLP
>          Issue Type: Task
>          Components: Build, Packaging and Test
>            Reporter: Tommaso Teofili
>            Priority: Major
>             Fix For: 1.9.1
>
>
> Currently the build fails when using java 11.
> Failures are mostly due to outdated versions of maven plugins and errorsĀ 
> during javadoc generation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to