Skip to content

Commit a0110e6

Browse files
authored
Merge pull request #1 from slloyd-src/jakarta
Jakarta updates for modern Java
2 parents adc038e + fb6a055 commit a0110e6

File tree

83 files changed

+402
-265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+402
-265
lines changed

ADQLLib/build.gradle

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ distributions {
1717
}
1818

1919
dependencies {
20-
implementation 'uk.ac.starlink:stil:4.2'
20+
implementation 'uk.ac.starlink:stil:4.3.1'
2121
implementation 'postgresql:postgresql:9.1-901.jdbc4'
2222
}
2323

@@ -98,7 +98,16 @@ publishing {
9898
url = 'http://example.com/my-library/'
9999
}
100100
}
101-
101+
}
102+
}
103+
repositories {
104+
maven {
105+
name = "nexus"
106+
url = uri("https://repo.dev.uksrc.org/repository/maven-snapshots/")
107+
credentials {
108+
username = findProperty("nexusUsername") ?: System.getenv("NEXUS_USERNAME")
109+
password = findProperty("nexusPassword") ?: System.getenv("NEXUS_PASSWORD")
110+
}
102111
}
103112
}
104113
}

TAPLib/build.gradle

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
plugins {
2+
id 'maven-publish'
3+
}
14

25
// Describe the library:
36
version = "2.4-beta"
@@ -11,7 +14,7 @@ dependencies {
1114
implementation project(':UWSLib')
1215

1316
implementation fileTree(dir: '../lib', includes: ['stil_3.3-2.jar'])
14-
implementation 'javax.servlet:javax.servlet-api:3.0.1'
17+
implementation 'jakarta.servlet:jakarta.servlet-api:5.0.0'
1518
implementation 'org.slf4j:slf4j-api:1.7.25'
1619
implementation 'org.json:json:20231013'
1720

@@ -24,6 +27,54 @@ dependencies {
2427
testRuntimeOnly 'org.xerial:sqlite-jdbc:3.44.1.0'
2528

2629
/* Needed to run Gradle with Java 9+: */
27-
// https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
28-
implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
30+
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
31+
32+
implementation ("uk.ac.starlink:stil:4.3.1")
33+
}
34+
35+
publishing {
36+
publications {
37+
maven(MavenPublication) {
38+
groupId = 'fr.unistra.cds' // Change this to the correct group
39+
artifactId = 'TAPlib' // Change this for each library
40+
version = '2.4-SNAPSHOT'
41+
42+
from components.java
43+
pom {
44+
name = 'TAPlib'
45+
description = 'Java library to deploy a TAP service. This is a cloned version of the original to allow the updating of older java functionality'
46+
url = 'http://cdsportal.u-strasbg.fr/taptuto/'
47+
48+
licenses {
49+
license {
50+
name = 'GNU Lesser General Public License version 3'
51+
url = 'https://opensource.org/license/lgpl-3-0'
52+
}
53+
}
54+
developers {
55+
developer {
56+
id = 'gmantele'
57+
name = 'Grégory Mantelet'
58+
59+
}
60+
}
61+
scm {
62+
connection = 'scm:git:git://github.com/slloyd-src/vollt.git'
63+
developerConnection = 'scm:git:ssh://github.com/slloyd-src/vollt.git'
64+
url = 'http://example.com/my-library/'
65+
}
66+
}
67+
}
68+
}
69+
70+
repositories {
71+
maven {
72+
name = "nexus"
73+
url = uri("https://repo.dev.uksrc.org/repository/maven-snapshots/")
74+
credentials {
75+
username = findProperty("nexusUsername") ?: System.getenv("NEXUS_USERNAME")
76+
password = findProperty("nexusPassword") ?: System.getenv("NEXUS_PASSWORD")
77+
}
78+
}
79+
}
2980
}

TAPLib/docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ RUN wget -O /usr/local/tomcat/webapps/tap/WEB-INF/lib/commons-fileupload.jar \
4949
'https://repo1.maven.org/maven2/commons-fileupload/commons-fileupload/1.3.3/commons-fileupload-1.3.3.jar'
5050
RUN wget -O /usr/local/tomcat/webapps/tap/WEB-INF/lib/commons-io.jar \
5151
'https://repo1.maven.org/maven2/commons-io/commons-io/2.6/commons-io-2.6.jar'
52-
RUN wget -O /usr/local/tomcat/webapps/tap/WEB-INF/lib/javax-servlet-api.jar \
53-
'https://repo1.maven.org/maven2/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar'
52+
RUN wget -O /usr/local/tomcat/webapps/tap/WEB-INF/lib/jakarta-servlet-api.jar \
53+
'https://repo1.maven.org/maven2/jakarta/servlet/jakarta.servlet-api/3.0.1/jakarta.servlet-api-3.0.1.jar'
5454
RUN wget -O /usr/local/tomcat/webapps/tap/WEB-INF/lib/json.jar \
5555
'https://repo1.maven.org/maven2/org/json/json/20180813/json-20180813.jar'
5656
RUN wget -O /usr/local/tomcat/webapps/tap/WEB-INF/lib/slf4j-api.jar \

TAPLib/docker/scripts/tap-starter.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ CONTEXT_FILE=$WEBAPPS_DIR/tap/META-INF/context.xml
4646
# Start the Context and Resource definitions:
4747
echo -e '<Context>\n\t<Resource name="jdbc/tapdb" auth="Container"' > $CONTEXT_FILE
4848
# Set the Resource type (SQL's Datasource):
49-
echo -e '\t\ttype="javax.sql.DataSource"' >> $CONTEXT_FILE
49+
echo -e '\t\ttype="jakarta.sql.DataSource"' >> $CONTEXT_FILE
5050
# Set the JDBC driver:
5151
case "$DB_TYPE" in
5252
postgres|pgsphere)

TAPLib/docker/tomcat/tap-webapp/WEB-INF/web.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<resource-ref>
1414
<res-ref-name>jdbc/testdb</res-ref-name>
15-
<res-type>javax.sql.DataSource</res-type>
15+
<res-type>jakarta.sql.DataSource</res-type>
1616
<res-auth>Container</res-auth>
1717
</resource-ref>
1818

TAPLib/src/tap/ADQLExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.io.IOException;
2424
import java.io.OutputStream;
2525

26-
import javax.servlet.http.HttpServletResponse;
26+
import jakarta.servlet.http.HttpServletResponse;
2727

2828
import adql.parser.ADQLParser;
2929
import adql.parser.ADQLQueryFactory;

TAPLib/src/tap/AbstractTAPFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.util.List;
2727
import java.util.Map;
2828

29-
import javax.servlet.http.HttpServletRequest;
29+
import jakarta.servlet.http.HttpServletRequest;
3030

3131
import adql.db.DBChecker;
3232
import adql.parser.ADQLParser;

TAPLib/src/tap/TAPFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.util.List;
2424
import java.util.Map;
2525

26-
import javax.servlet.http.HttpServletRequest;
26+
import jakarta.servlet.http.HttpServletRequest;
2727

2828
import adql.parser.ADQLParser;
2929
import adql.parser.ADQLQueryFactory;
@@ -308,7 +308,7 @@ protected TAPFactory(final ServiceConnection service) throws NullPointerExceptio
308308
* with the given request, in order to ensure that the returned object is always a {@link TAPJob}.
309309
* </p>
310310
*
311-
* @see uws.service.AbstractUWSFactory#createJob(javax.servlet.http.HttpServletRequest, uws.job.user.JobOwner)
311+
* @see uws.service.AbstractUWSFactory#createJob(jakarta.servlet.http.HttpServletRequest, uws.job.user.JobOwner)
312312
* @see #createTAPJob(HttpServletRequest, JobOwner)
313313
*/
314314
@Override

TAPLib/src/tap/TAPRequestParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.util.HashMap;
2424
import java.util.Map;
2525

26-
import javax.servlet.http.HttpServletRequest;
26+
import jakarta.servlet.http.HttpServletRequest;
2727

2828
import uws.UWSException;
2929
import uws.UWSToolBox;

TAPLib/src/tap/TAPSyncJob.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import java.util.Date;
2525
import java.util.Iterator;
2626

27-
import javax.servlet.http.HttpServletResponse;
27+
import jakarta.servlet.http.HttpServletResponse;
2828

2929
import tap.parameters.TAPExecutionDurationController;
3030
import tap.parameters.TAPParameters;

0 commit comments

Comments
 (0)