Skip to content

Commit fd46b4d

Browse files
committed
mavenize
1 parent 1b91fa3 commit fd46b4d

Some content is hidden

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

56 files changed

+99
-121
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
/WebContent/WEB-INF/classes/Index4J.properties
99
/WebContent/META-INF/context.xml
1010
*.war
11+
target

build.xml

-75
This file was deleted.

dist/aws/empty

Whitespace-only changes.

dist/heliohost/empty

Whitespace-only changes.

dist/localhost/empty

Whitespace-only changes.

libs/bcel-5.2.jar

-521 KB
Binary file not shown.

libs/commons-fileupload-1.2.2.jar

-58.2 KB
Binary file not shown.

libs/commons-io-2.1.jar

-159 KB
Binary file not shown.

libs/commons-lang3-3.1.jar

-308 KB
Binary file not shown.

libs/jericho-html-3.2.jar

-192 KB
Binary file not shown.

libs/lucene-core-3.4.0.jar

-1.33 MB
Binary file not shown.

libs/lucene-highlighter-3.4.0.jar

-81.7 KB
Binary file not shown.

libs/mysql-connector-java-5.0.8.jar

-528 KB
Binary file not shown.

libs/nekohtml.jar

-146 KB
Binary file not shown.

libs/xercesImpl.jar

-1.17 MB
Binary file not shown.

pom.xml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>ca.xsimo</groupId>
6+
<artifactId>index4j</artifactId>
7+
<packaging>war</packaging>
8+
<version>1.0</version>
9+
10+
<dependencies>
11+
<dependency>
12+
<groupId>commons-fileupload</groupId>
13+
<artifactId>commons-fileupload</artifactId>
14+
<version>1.2.2</version>
15+
</dependency>
16+
<dependency>
17+
<groupId>commons-io</groupId>
18+
<artifactId>commons-io</artifactId>
19+
<version>2.1</version>
20+
</dependency>
21+
<dependency>
22+
<groupId>org.apache.commons</groupId>
23+
<artifactId>commons-lang3</artifactId>
24+
<version>3.1</version>
25+
</dependency>
26+
<dependency>
27+
<groupId>net.htmlparser.jericho</groupId>
28+
<artifactId>jericho-html</artifactId>
29+
<version>3.2</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.apache.lucene</groupId>
33+
<artifactId>lucene-core</artifactId>
34+
<version>3.4.0</version>
35+
</dependency>
36+
<dependency>
37+
<groupId>org.apache.lucene</groupId>
38+
<artifactId>lucene-highlighter</artifactId>
39+
<version>3.4.0</version>
40+
</dependency>
41+
<dependency>
42+
<groupId>mysql</groupId>
43+
<artifactId>mysql-connector-java</artifactId>
44+
<version>5.0.8</version>
45+
</dependency>
46+
<dependency>
47+
<groupId>net.sourceforge.nekohtml</groupId>
48+
<artifactId>nekohtml</artifactId>
49+
<version>1.9.15</version>
50+
</dependency>
51+
<dependency>
52+
<groupId>xerces</groupId>
53+
<artifactId>xercesImpl</artifactId>
54+
<version>2.9.1</version>
55+
</dependency>
56+
<dependency>
57+
<groupId>org.apache.tomcat</groupId>
58+
<artifactId>tomcat-servlet-api</artifactId>
59+
<version>9.0.65</version>
60+
<scope>provided</scope>
61+
</dependency>
62+
<dependency>
63+
<groupId>org.apache.tomcat</groupId>
64+
<artifactId>tomcat-util</artifactId>
65+
<version>9.0.65</version>
66+
<scope>provided</scope>
67+
</dependency>
68+
<dependency>
69+
<groupId>org.apache.bcel</groupId>
70+
<artifactId>bcel</artifactId>
71+
<version>5.2</version>
72+
</dependency>
73+
</dependencies>
74+
</project>

provided/servlet-api.jar

-193 KB
Binary file not shown.

provided/tomcat-util.jar

-32.1 KB
Binary file not shown.

redeploy.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
#mvn package
3+
chcon --reference=/usr/share/tomcat/clufBase/ROOT.war target/index4j-1.0.war
4+
chown tomcat target/index4j-1.0.war
5+
chgrp tomcat target/index4j-1.0.war
6+
chmod g+w target/index4j-1.0.war
7+
cp target/index4j-1.0.war /usr/share/tomcat/index4jBase/ROOT.war
8+

resources/aws/Index4J.properties

-4
This file was deleted.

resources/aws/context.xml

-8
This file was deleted.

resources/heliohost/Index4J.properties

-4
This file was deleted.

resources/heliohost/context.xml

-9
This file was deleted.

resources/localhost/Index4J.properties

-4
This file was deleted.

resources/localhost/context.xml

-9
This file was deleted.

src/ca/diro/javadocindexer/Settings.java src/main/java/ca/diro/javadocindexer/Settings.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public Settings(String realPath) throws ExceptionInInitializerError{
3131
Properties properties = new Properties();
3232

3333
try {
34-
properties.load(org.apache.tomcat.util.file.ConfigFileLoader
35-
.getInputStream("webapps/JavadocIndex/WEB-INF/classes/Index4J.properties"));
34+
properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("Index4J.properties"));
35+
//org.apache.tomcat.util.file.ConfigFileLoader.getInputStream("index4jBase/JavadocIndex/WEB-INF/classes/Index4J.properties"));
3636
} catch (FileNotFoundException e) {
3737
e.printStackTrace();
3838
throw new ExceptionInInitializerError();

src/ca/diro/javadocindexer/Unzip.java src/main/java/ca/diro/javadocindexer/Unzip.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public static final void main(String arg, String basePath) {
4545
}
4646

4747
System.err.println("Extracting file: " + entry.getName());
48+
new File(new File(basePath+Settings.sep+entry.getName()).getParent()).mkdirs();
4849
copyInputStream(zipFile.getInputStream(entry),
4950
new BufferedOutputStream(new FileOutputStream(basePath+Settings.sep+entry.getName())));
5051
}
@@ -57,4 +58,4 @@ public static final void main(String arg, String basePath) {
5758
}
5859
}
5960

60-
}
61+
}

src/main/resources/Index4J.properties

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
realIndexPath=/opt/JavadocIndex/javadocIndexerLib
2+
staticHostURI=https://simonarame.com/
3+
realLibraryPath=/opt/JavadocIndex/library
4+
dynamicHostURI=https://index4j.xsimo.ca
File renamed without changes.
File renamed without changes.

src/main/webapp/META-INF/context.xml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Context swallowOutput="true">
2+
<Realm className="org.apache.catalina.realm.MemoryRealm"/>
3+
<!--<Valve className="org.apache.catalina.valves.AccessLogValve"
4+
directory="/var/log/tomcat/access_logs"
5+
prefix="javadoc-index_access."
6+
rotatable="false"
7+
suffix="log" pattern="combined" />-->
8+
</Context>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

WebContent/WEB-INF/web.xml src/main/webapp/WEB-INF/web.xml

-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@
3131
<web-resource-name>MyFirst</web-resource-name>
3232
<description> accessible by authenticated users of the role1 role</description>
3333
<url-pattern>/upload/*</url-pattern>
34-
<http-method>GET</http-method>
35-
<http-method>HEAD</http-method>
36-
<http-method>POST</http-method>
37-
<http-method>PUT</http-method>
38-
<http-method>DELETE</http-method>
3934
</web-resource-collection>
4035
<auth-constraint>
4136
<description>These roles are allowed access</description>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)