Skip to content

Commit d28e81d

Browse files
committed
fixed docker build and gradle build
1 parent 5881b53 commit d28e81d

8 files changed

Lines changed: 55 additions & 1069 deletions

File tree

build.gradle

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ dependencies {
5858
implementation 'org.apache.solr:solr-solrj:8.11.3'
5959

6060
// HTTP server
61-
implementation 'org.eclipse.jetty.http2:http2-server:10.0.22'
62-
implementation 'org.eclipse.jetty:jetty-servlet:10.0.22'
61+
// implementation 'org.eclipse.jetty:jetty-http:9.4.53.v20231009'
62+
// implementation 'org.eclipse.jetty:jetty-http:9.4.53.v20231009'
6363

6464
// logging
6565
implementation 'org.slf4j:slf4j-api:2.0.13'
@@ -74,6 +74,7 @@ dependencies {
7474
implementation 'net.harawata:appdirs:1.2.2'
7575

7676
// testing
77+
testImplementation 'org.apache.solr:solr-solrj:8.11.3'
7778
testImplementation platform('org.junit:junit-bom:5.9.1')
7879
testImplementation 'org.junit.jupiter:junit-jupiter'
7980
testImplementation 'org.mockito:mockito-core:5.14.2'
@@ -91,15 +92,16 @@ dependencies {
9192
// integration testing
9293
//
9394
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
95+
testIntegrationImplementation 'org.apache.solr:solr-solrj:8.11.3'
9496
testIntegrationImplementation platform('org.junit:junit-bom:5.9.1')
9597
testIntegrationImplementation 'org.junit.jupiter:junit-jupiter'
9698
testIntegrationImplementation 'org.mockito:mockito-core:5.12.0'
9799
testIntegrationImplementation 'com.fasterxml.jackson.core:jackson-databind:2.17.1'
98100
testIntegrationImplementation 'commons-io:commons-io:2.16.1'
99101
testIntegrationImplementation 'org.json:json:20240303'
100102
// HTTP server
101-
testIntegrationImplementation 'org.eclipse.jetty.http2:http2-server:10.0.20'
102-
testIntegrationImplementation 'org.eclipse.jetty:jetty-servlet:10.0.20'
103+
// testIntegrationImplementation 'org.eclipse.jetty:jetty.http:9.4.53.v20231009'
104+
// testIntegrationImplementation 'org.eclipse.jetty:jetty-client:9.4.53.v20231009'
103105

104106
// logging
105107
testIntegrationImplementation 'org.slf4j:slf4j-api:2.0.13'
@@ -117,6 +119,7 @@ dependencies {
117119
// Site Spidering
118120
//
119121
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
122+
testIntegrationSpiderImplementation 'org.apache.solr:solr-solrj:8.11.3'
120123
testIntegrationSpiderImplementation platform('org.junit:junit-bom:5.9.1')
121124
testIntegrationSpiderImplementation 'org.junit.jupiter:junit-jupiter'
122125
testIntegrationSpiderImplementation 'org.mockito:mockito-core:5.12.0'
@@ -125,8 +128,8 @@ dependencies {
125128
testIntegrationSpiderImplementation 'org.json:json:20240303'
126129

127130
// HTTP server
128-
testIntegrationSpiderImplementation 'org.eclipse.jetty.http2:http2-server:10.0.22'
129-
testIntegrationSpiderImplementation 'org.eclipse.jetty:jetty-servlet:10.0.22'
131+
// testIntegrationSpiderImplementation 'org.eclipse.jetty.http:9.4.53.v20231009'
132+
// testIntegrationSpiderImplementation 'org.eclipse.jetty:jetty-servlet:9.4.53.v20231009'
130133

131134
// logging
132135
testIntegrationSpiderImplementation 'org.slf4j:slf4j-api:2.0.13'
@@ -164,12 +167,16 @@ distributions {
164167
"net.bytebuddy:byte-buddy-agent:1.15.4",
165168
"org.objenesis:objenesis:3.3",
166169
"commons-codec:commons-codec:1.17.1",
167-
"org.eclipse.jetty.http2:http2-common:10.0.22",
168-
"org.eclipse.jetty.http2:http2-hpack:10.0.22",
169-
"org.eclipse.jetty:jetty-http:10.0.22",
170-
"org.eclipse.jetty:jetty-io:10.0.22",
171-
"org.eclipse.jetty:jetty-util:10.0.22"
172-
170+
'org.eclipse.jetty:jetty-alpn-client:9.4.53.v20231009',
171+
'org.eclipse.jetty:jetty-alpn-java-client:9.4.53.v20231009',
172+
'org.eclipse.jetty:jetty-client:9.4.53.v20231009',
173+
'org.eclipse.jetty:jetty-http:9.4.53.v20231009',
174+
'org.eclipse.jetty:jetty-io:9.4.53.v20231009',
175+
'org.eclipse.jetty:jetty-util:9.4.53.v20231009',
176+
'org.eclipse.jetty.http2:http2-client:9.4.53.v20231009',
177+
'org.eclipse.jetty.http2:http2-common:9.4.53.v20231009',
178+
'org.eclipse.jetty.http2:http2-hpack:9.4.53.v20231009',
179+
'org.eclipse.jetty.http2:http2-http-client-transport:9.4.53.v20231009'
173180
}
174181
}
175182
}

src/dist/sample/solr/mechanical-pencils/managed-schema

Lines changed: 0 additions & 585 deletions
Large diffs are not rendered by default.

src/dist/sample/solr/mechanical-pencils/managed-schema.xml

Lines changed: 0 additions & 432 deletions
This file was deleted.

src/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ EXPOSE 8983/tcp
8989
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
9090
# Run the startup script on container run.
9191
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
92-
CMD [ "/startup.sh" ]
92+
CMD [ "/bin/bash" ]

src/docker/startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

3-
cd /java-servers/solr/ && bin/solr start --force --user-managed
3+
cd /java-servers/solr/ && bin/solr start -force
44
cd /java-servers/panl/ && bin/panl server -properties /java-servers/panl/sample/panl/mechanical-pencils/panl.properties

src/test/java/book/Main.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package book;
22

33
import org.apache.commons.io.FileUtils;
4-
import org.apache.solr.client.solrj.impl.CloudHttp2SolrClient;
54
import org.apache.solr.client.solrj.impl.CloudSolrClient;
5+
import org.apache.solr.client.solrj.impl.Http2SolrClient;
66
import org.apache.solr.common.SolrInputDocument;
77

88
import java.io.File;
@@ -14,8 +14,7 @@
1414
public class Main {
1515
public static void main(String[] args) {
1616

17-
CloudSolrClient client = new CloudHttp2SolrClient.Builder(
18-
List.of("http://localhost:8983/solr/")).build();
17+
Http2SolrClient client = new Http2SolrClient.Builder("http://localhost:8983/solr/").build();
1918

2019
try {
2120
String txtContents = FileUtils.readFileToString(
@@ -43,10 +42,7 @@ public static void main(String[] args) {
4342
client.commit("book");
4443
} catch(Exception ignored) {
4544
} finally {
46-
try {
47-
client.close();
48-
} catch (IOException ignored) {
49-
}
45+
client.close();
5046
}
5147
}
5248
}

src/test/resources/sample/mechanical-pencils/mechanical-pencils.panl.properties

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -641,15 +641,15 @@ solr.highlight=false
641641
#
642642
# ~ ~ ~ * ~ ~ ~
643643

644-
panl.lpse.fields=
645-
# <field "stored"="true" "name"="id" "type"="string" "multiValued"="false" "required"="true" />
644+
645+
# <field "name"="id" "type"="string" "stored"="true" "required"="true" "multiValued"="false" />
646646
# This configuration can __ONLY__ ever be a field as it is not indexed in Solr
647647
panl.field.i=id
648648
panl.name.i=Id
649649
panl.type.i=solr.StrField
650650
panl.uniquekey.i=true
651651

652-
# <field "indexed"="true" "stored"="true" "name"="brand" "type"="string" "multiValued"="false" />
652+
# <field "name"="brand" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
653653
# This configuration can be either a field or a facet as it is indexed in Solr
654654
panl.facet.b=brand
655655
panl.name.b=Brand
@@ -669,7 +669,7 @@ panl.type.b=solr.StrField
669669
# passed through then add the LPSE code(s) in a comma separated list below
670670
#panl.when.b=
671671

672-
# <field "indexed"="true" "stored"="true" "name"="name" "type"="string" "multiValued"="false" />
672+
# <field "name"="name" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
673673
# This configuration can be either a field or a facet as it is indexed in Solr
674674
panl.facet.N=name
675675
panl.name.N=Name
@@ -689,7 +689,7 @@ panl.type.N=solr.StrField
689689
# passed through then add the LPSE code(s) in a comma separated list below
690690
#panl.when.N=
691691

692-
# <field "indexed"="true" "stored"="true" "name"="mechanism_type" "type"="string" "multiValued"="false" />
692+
# <field "name"="mechanism_type" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
693693
# This configuration can be either a field or a facet as it is indexed in Solr
694694
panl.facet.m=mechanism_type
695695
panl.name.m=Mechanism Type
@@ -709,7 +709,7 @@ panl.type.m=solr.StrField
709709
# passed through then add the LPSE code(s) in a comma separated list below
710710
#panl.when.m=
711711

712-
# <field "indexed"="true" "stored"="true" "name"="body_shape" "type"="string" "multiValued"="false" />
712+
# <field "name"="body_shape" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
713713
# This configuration can be either a field or a facet as it is indexed in Solr
714714
panl.facet.B=body_shape
715715
panl.name.B=Body Shape
@@ -729,7 +729,7 @@ panl.type.B=solr.StrField
729729
# passed through then add the LPSE code(s) in a comma separated list below
730730
#panl.when.B=
731731

732-
# <field "indexed"="true" "stored"="true" "name"="grip_type" "type"="string" "multiValued"="false" />
732+
# <field "name"="grip_type" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
733733
# This configuration can be either a field or a facet as it is indexed in Solr
734734
panl.facet.g=grip_type
735735
panl.name.g=Grip Type
@@ -749,7 +749,7 @@ panl.type.g=solr.StrField
749749
# passed through then add the LPSE code(s) in a comma separated list below
750750
#panl.when.g=
751751

752-
# <field "indexed"="true" "stored"="true" "name"="grip_shape" "type"="string" "multiValued"="false" />
752+
# <field "name"="grip_shape" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
753753
# This configuration can be either a field or a facet as it is indexed in Solr
754754
panl.facet.G=grip_shape
755755
panl.name.G=Grip Shape
@@ -769,7 +769,7 @@ panl.type.G=solr.StrField
769769
# passed through then add the LPSE code(s) in a comma separated list below
770770
#panl.when.G=
771771

772-
# <field "indexed"="true" "stored"="true" "name"="cap_shape" "type"="string" "multiValued"="false" />
772+
# <field "name"="cap_shape" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
773773
# This configuration can be either a field or a facet as it is indexed in Solr
774774
panl.facet.c=cap_shape
775775
panl.name.c=Cap Shape
@@ -789,7 +789,7 @@ panl.type.c=solr.StrField
789789
# passed through then add the LPSE code(s) in a comma separated list below
790790
#panl.when.c=
791791

792-
# <field "indexed"="true" "stored"="true" "name"="category" "type"="string" "multiValued"="false" />
792+
# <field "name"="category" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
793793
# This configuration can be either a field or a facet as it is indexed in Solr
794794
panl.facet.C=category
795795
panl.name.C=Category
@@ -809,7 +809,7 @@ panl.type.C=solr.StrField
809809
# passed through then add the LPSE code(s) in a comma separated list below
810810
#panl.when.C=
811811

812-
# <field "indexed"="true" "stored"="true" "name"="length" "type"="pint" "multiValued"="false" />
812+
# <field "name"="length" "type"="pint" "indexed"="true" "stored"="true" "multiValued"="false" />
813813
# This configuration can be either a field or a facet as it is indexed in Solr
814814
panl.facet.l=length
815815
panl.name.l=Length
@@ -842,7 +842,7 @@ panl.type.l=solr.IntPointField
842842
# passed through then add the LPSE code(s) in a comma separated list below
843843
#panl.when.l=
844844

845-
# <field "indexed"="true" "stored"="true" "name"="relative_length" "type"="pint" "multiValued"="false" />
845+
# <field "name"="relative_length" "type"="pint" "indexed"="true" "stored"="true" "multiValued"="false" />
846846
# This configuration can be either a field or a facet as it is indexed in Solr
847847
panl.facet.r=relative_length
848848
panl.name.r=Relative Length
@@ -875,7 +875,7 @@ panl.type.r=solr.IntPointField
875875
# passed through then add the LPSE code(s) in a comma separated list below
876876
#panl.when.r=
877877

878-
# <field "indexed"="true" "stored"="true" "name"="diameter" "type"="pint" "multiValued"="false" />
878+
# <field "name"="diameter" "type"="pint" "indexed"="true" "stored"="true" "multiValued"="false" />
879879
# This configuration can be either a field or a facet as it is indexed in Solr
880880
panl.facet.d=diameter
881881
panl.name.d=Diameter
@@ -908,7 +908,7 @@ panl.type.d=solr.IntPointField
908908
# passed through then add the LPSE code(s) in a comma separated list below
909909
#panl.when.d=
910910

911-
# <field "indexed"="true" "stored"="true" "name"="weight" "type"="pint" "multiValued"="false" />
911+
# <field "name"="weight" "type"="pint" "indexed"="true" "stored"="true" "multiValued"="false" />
912912
# This configuration can be either a field or a facet as it is indexed in Solr
913913
panl.facet.w=weight
914914
panl.name.w=Weight
@@ -941,7 +941,7 @@ panl.type.w=solr.IntPointField
941941
# passed through then add the LPSE code(s) in a comma separated list below
942942
#panl.when.w=
943943

944-
# <field "indexed"="true" "stored"="true" "name"="relative_weight" "type"="pint" "multiValued"="false" />
944+
# <field "name"="relative_weight" "type"="pint" "indexed"="true" "stored"="true" "multiValued"="false" />
945945
# This configuration can be either a field or a facet as it is indexed in Solr
946946
panl.facet.R=relative_weight
947947
panl.name.R=Relative Weight
@@ -974,7 +974,7 @@ panl.type.R=solr.IntPointField
974974
# passed through then add the LPSE code(s) in a comma separated list below
975975
#panl.when.R=
976976

977-
# <field "indexed"="true" "stored"="true" "name"="lead_length" "type"="pint" "multiValued"="false" />
977+
# <field "name"="lead_length" "type"="pint" "indexed"="true" "stored"="true" "multiValued"="false" />
978978
# This configuration can be either a field or a facet as it is indexed in Solr
979979
panl.facet.L=lead_length
980980
panl.name.L=Lead Length
@@ -1007,7 +1007,7 @@ panl.type.L=solr.IntPointField
10071007
# passed through then add the LPSE code(s) in a comma separated list below
10081008
#panl.when.L=
10091009

1010-
# <field "indexed"="true" "stored"="true" "name"="disassemble" "type"="boolean" "multiValued"="false" />
1010+
# <field "name"="disassemble" "type"="boolean" "indexed"="true" "stored"="true" "multiValued"="false" />
10111011
# This configuration can be either a field or a facet as it is indexed in Solr
10121012
panl.facet.D=disassemble
10131013
panl.name.D=Disassemble
@@ -1027,7 +1027,7 @@ panl.type.D=solr.BoolField
10271027
# passed through then add the LPSE code(s) in a comma separated list below
10281028
#panl.when.D=
10291029

1030-
# <field "indexed"="true" "stored"="true" "name"="hardness_indicator" "type"="string" "multiValued"="false" />
1030+
# <field "name"="hardness_indicator" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
10311031
# This configuration can be either a field or a facet as it is indexed in Solr
10321032
panl.facet.h=hardness_indicator
10331033
panl.name.h=Hardness Indicator
@@ -1047,7 +1047,7 @@ panl.type.h=solr.StrField
10471047
# passed through then add the LPSE code(s) in a comma separated list below
10481048
#panl.when.h=
10491049

1050-
# <field "indexed"="true" "stored"="false" "name"="in_built_eraser" "type"="boolean" "multiValued"="false" />
1050+
# <field "name"="in_built_eraser" "type"="boolean" "indexed"="true" "stored"="false" "multiValued"="false" />
10511051
# This configuration can be either a field or a facet as it is indexed in Solr
10521052
panl.facet.I=in_built_eraser
10531053
panl.name.I=In Built Eraser
@@ -1067,13 +1067,13 @@ panl.type.I=solr.BoolField
10671067
# passed through then add the LPSE code(s) in a comma separated list below
10681068
#panl.when.I=
10691069

1070-
# <field "stored"="true" "name"="variants" "type"="string" "multiValued"="true" />
1070+
# <field "name"="variants" "type"="string" "stored"="true" "multiValued"="true" />
10711071
# This configuration can __ONLY__ ever be a field as it is not indexed in Solr
10721072
panl.field.v=variants
10731073
panl.name.v=Variants
10741074
panl.type.v=solr.StrField
10751075

1076-
# <field "indexed"="true" "stored"="true" "name"="text" "type"="text_general" "multiValued"="true" />
1076+
# <field "name"="text" "type"="text_general" "indexed"="true" "stored"="true" "multiValued"="true" />
10771077
# This configuration can be either a field or a facet as it is indexed in Solr
10781078
panl.facet.t=text
10791079
panl.name.t=Text

src/test/resources/sample/simple-date/simple-date.panl.properties

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -641,15 +641,15 @@ solr.highlight=false
641641
#
642642
# ~ ~ ~ * ~ ~ ~
643643

644-
panl.lpse.fields=
645-
# <field "stored"="true" "name"="id" "type"="string" "multiValued"="false" "required"="true" />
644+
645+
# <field "name"="id" "type"="string" "stored"="true" "required"="true" "multiValued"="false" />
646646
# This configuration can __ONLY__ ever be a field as it is not indexed in Solr
647647
panl.field.i=id
648648
panl.name.i=Id
649649
panl.type.i=solr.StrField
650650
panl.uniquekey.i=true
651651

652-
# <field "indexed"="true" "stored"="true" "name"="solr_date" "type"="pdate" "multiValued"="false" />
652+
# <field "name"="solr_date" "type"="pdate" "indexed"="true" "stored"="true" "multiValued"="false" />
653653
# This configuration can be either a field or a facet as it is indexed in Solr
654654
panl.facet.S=solr_date
655655
panl.name.S=Solr Date
@@ -667,7 +667,7 @@ panl.type.S=solr.DatePointField
667667
# passed through then add the LPSE code(s) in a comma separated list below
668668
#panl.when.S=
669669

670-
# <field "indexed"="true" "stored"="true" "name"="text_date" "type"="string" "multiValued"="false" />
670+
# <field "name"="text_date" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
671671
# This configuration can be either a field or a facet as it is indexed in Solr
672672
panl.facet.t=text_date
673673
panl.name.t=Text Date
@@ -687,7 +687,7 @@ panl.type.t=solr.StrField
687687
# passed through then add the LPSE code(s) in a comma separated list below
688688
#panl.when.t=
689689

690-
# <field "indexed"="true" "stored"="true" "name"="year" "type"="pint" "multiValued"="false" />
690+
# <field "name"="year" "type"="pint" "indexed"="true" "stored"="true" "multiValued"="false" />
691691
# This configuration can be either a field or a facet as it is indexed in Solr
692692
panl.facet.y=year
693693
panl.name.y=Year
@@ -720,7 +720,7 @@ panl.type.y=solr.IntPointField
720720
# passed through then add the LPSE code(s) in a comma separated list below
721721
#panl.when.y=
722722

723-
# <field "indexed"="true" "stored"="true" "name"="decade" "type"="pint" "multiValued"="false" />
723+
# <field "name"="decade" "type"="pint" "indexed"="true" "stored"="true" "multiValued"="false" />
724724
# This configuration can be either a field or a facet as it is indexed in Solr
725725
panl.facet.d=decade
726726
panl.name.d=Decade
@@ -753,7 +753,7 @@ panl.type.d=solr.IntPointField
753753
# passed through then add the LPSE code(s) in a comma separated list below
754754
#panl.when.d=
755755

756-
# <field "indexed"="true" "stored"="true" "name"="month" "type"="string" "multiValued"="false" />
756+
# <field "name"="month" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
757757
# This configuration can be either a field or a facet as it is indexed in Solr
758758
panl.facet.m=month
759759
panl.name.m=Month
@@ -773,7 +773,7 @@ panl.type.m=solr.StrField
773773
# passed through then add the LPSE code(s) in a comma separated list below
774774
#panl.when.m=
775775

776-
# <field "indexed"="true" "stored"="true" "name"="day" "type"="pint" "multiValued"="false" />
776+
# <field "name"="day" "type"="pint" "indexed"="true" "stored"="true" "multiValued"="false" />
777777
# This configuration can be either a field or a facet as it is indexed in Solr
778778
panl.facet.D=day
779779
panl.name.D=Day
@@ -806,7 +806,7 @@ panl.type.D=solr.IntPointField
806806
# passed through then add the LPSE code(s) in a comma separated list below
807807
#panl.when.D=
808808

809-
# <field "indexed"="true" "stored"="true" "name"="week_day" "type"="string" "multiValued"="false" />
809+
# <field "name"="week_day" "type"="string" "indexed"="true" "stored"="true" "multiValued"="false" />
810810
# This configuration can be either a field or a facet as it is indexed in Solr
811811
panl.facet.w=week_day
812812
panl.name.w=Week Day
@@ -826,7 +826,7 @@ panl.type.w=solr.StrField
826826
# passed through then add the LPSE code(s) in a comma separated list below
827827
#panl.when.w=
828828

829-
# <field "indexed"="true" "stored"="true" "name"="text" "type"="text_general" "multiValued"="true" />
829+
# <field "name"="text" "type"="text_general" "indexed"="true" "stored"="true" "multiValued"="true" />
830830
# This configuration can be either a field or a facet as it is indexed in Solr
831831
panl.facet.T=text
832832
panl.name.T=Text

0 commit comments

Comments
 (0)