Skip to content

Commit

Permalink
Merge pull request #2 from evolvedbinary/fix/dep_issue
Browse files Browse the repository at this point in the history
[fix] fixing dependency issues and outdated libs
  • Loading branch information
adamretter authored Jan 2, 2024
2 parents b99c1ba + e961fbc commit 2b134e4
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 58 deletions.
138 changes: 104 additions & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<organization>
<name>Belgrade Center for Digital Humanities</name>
<url>http://www.humanistika.org</url>
<url>https://www.humanistika.org</url>
</organization>

<developers>
Expand All @@ -31,7 +31,7 @@
<licenses>
<license>
<name>GNU General Public License, version 2</name>
<url>http://opensource.org/licenses/gpl-2.0</url>
<url>https://opensource.org/licenses/gpl-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
Expand All @@ -44,21 +44,22 @@
</scm>

<properties>
<oxygen.sdk.version>17.1.0.2</oxygen.sdk.version>
<jersey.version>2.22.2</jersey.version>
<slf4j.version>1.7.16</slf4j.version>
<jaxb2-basics.version>0.11.0</jaxb2-basics.version>
<eclipse.persistence.version>2.6.3-M1</eclipse.persistence.version>
<project.build.source>1.7</project.build.source>
<project.build.target>1.7</project.build.target>
<oxygen.sdk.version>25.1.0.2</oxygen.sdk.version>
<jersey.version>2.40</jersey.version>
<slf4j.version>2.0.7</slf4j.version>
<jaxb2-basics.version>0.13.1</jaxb2-basics.version>
<eclipse.persistence.version>2.7.10</eclipse.persistence.version>
<junit.jupiter.version>5.9.3</junit.jupiter.version>
<project.build.source>1.8</project.build.source>
<project.build.target>1.8</project.build.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.humanistika.oxygen</groupId>
<artifactId>tei-completer</artifactId>
<version>1.0.2</version>
<version>1.2.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.oxygenxml</groupId>
Expand All @@ -74,6 +75,18 @@
</exclusion>
</exclusions -->
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
<scope>provided</scope> <!-- provided by Oxygen -->
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.3</version>
<scope>provided</scope> <!-- provided by Oxygen -->
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations-java5</artifactId>
Expand Down Expand Up @@ -103,9 +116,9 @@
<!-- needed for both `runtime` scope for `jersey-common` and
`test` scope for our code. If we don't have this the `test` scope alone
causes it to be excluded from the shaded Jar -->
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.2</version>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>1.3.5</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand All @@ -120,9 +133,15 @@
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${jersey.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -136,6 +155,13 @@
<version>${jaxb2-basics.version}</version>
</dependency>

<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
<scope>provided</scope> <!-- provided by Oxygen -->
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
Expand All @@ -144,9 +170,15 @@
</dependency> <!-- log4j is provided by Oxygen -->

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -182,12 +214,30 @@
<version>1.2</version>
<scope>test</scope>
</dependency -->
<dependency>
<groupId>com.evolvedbinary.xpath</groupId>
<artifactId>xpath2-parser</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
<version>1.14</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>1.7.14</version>
<scope>test</scope> <!-- needed for tests, but is provided by Oxygen for 'runtime' scope -->
</dependency>

</dependencies>

<build>
Expand Down Expand Up @@ -227,9 +277,9 @@
</executions>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb22-plugin</artifactId>
<version>0.13.1</version>
<groupId>com.evolvedbinary.maven.jvnet</groupId>
<artifactId>jaxb23-maven-plugin</artifactId>
<version>0.15.0</version>
<configuration>
<extension>true</extension>
<args>
Expand All @@ -254,7 +304,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<version>3.5.0</version>
<executions>
<execution>
<id>analyze</id>
Expand All @@ -270,8 +320,16 @@
<ignoredUnusedDeclaredDependency>org.slf4j:slf4j-log4j12</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.glassfish.jersey.media:jersey-media-jaxb</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.glassfish.jersey.media:jersey-media-moxy</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.glassfish.jersey.inject:jersey-hk2</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.glassfish.jersey.core:jersey-client</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>com.sun.xml.bind:jaxb-impl</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.junit.jupiter:junit-jupiter-engine</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.mozilla:rhino</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
<ignoredNonTestScopedDependencies>
<ignoredNonTestScopedDependency>jakarta.annotation:jakarta.annotation-api</ignoredNonTestScopedDependency>
<ignoredNonTestScopedDependency>org.glassfish.jersey.core:jersey-common</ignoredNonTestScopedDependency>
</ignoredNonTestScopedDependencies>
</configuration>
</execution>
</executions>
Expand All @@ -292,7 +350,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>3.11.0</version>
<configuration>
<source>${project.build.source}</source>
<target>${project.build.target}</target>
Expand All @@ -303,10 +361,22 @@
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
Expand All @@ -330,7 +400,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -393,7 +463,7 @@
<!-- Attach source jars -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.0</version>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
Expand Down Expand Up @@ -426,14 +496,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>3.0.1</version>
<configuration>
<mavenExecutorId>forked-path</mavenExecutorId> <!-- avoid a bug with GPG plugin hanging http://jira.codehaus.org/browse/MGPG-9 -->
<mavenExecutorId>forked-path</mavenExecutorId> <!-- avoid a bug with GPG plugin hanging https://jira.codehaus.org/browse/MGPG-9 -->
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
Expand All @@ -445,18 +515,18 @@
<repository>
<id>oxygen</id>
<name>oXygen public artifacts</name>
<url>http://www.oxygenxml.com/maven</url>
<url>https://www.oxygenxml.com/maven</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>sonatype-releases</id>
<url>http://oss.sonatype.org/content/repositories/releases</url>
<url>https://oss.sonatype.org/content/repositories/releases</url>
</pluginRepository>
<pluginRepository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
<url>https://clojars.org/repo</url>
</pluginRepository>
</pluginRepositories>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ public SuggestionResponse uploadSuggestion(final UploadInfo uploadInfo, final St
}
} catch (final ProcessingException e) {
LOGGER.error(e.getMessage(), e);
if(e.getCause() instanceof HttpExceptionWithDetails) {
final HttpExceptionWithDetails httpEx = ((HttpExceptionWithDetails)e.getCause());
return new SuggestionResponse(false, "HTTP " + httpEx.getReasonCode() + " " + httpEx.getReason());
} else {
// if(e.getCause() instanceof HttpExceptionWithDetails) {
// final HttpExceptionWithDetails httpEx = ((HttpExceptionWithDetails)e.getCause());
// return new SuggestionResponse(false, "HTTP " + httpEx.getReasonCode() + " " + httpEx.getReason());
// } else {
return new SuggestionResponse(false, e.getMessage());
}
// }
} catch (final URISyntaxException | IOException | TransformationException e) {
LOGGER.error(e.getMessage(), e);
return new SuggestionResponse(false, e.getMessage());
Expand Down
Loading

0 comments on commit 2b134e4

Please sign in to comment.