Skip to content

Commit 21c0f42

Browse files
add common request
1 parent f4a07d1 commit 21c0f42

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

WebCollector/pom.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,22 @@
8181
</plugin>
8282

8383

84+
<plugin>
85+
<groupId>org.apache.maven.plugins</groupId>
86+
<artifactId>maven-javadoc-plugin</artifactId>
87+
<version>3.0.1</version>
88+
<configuration>
89+
</configuration>
90+
<executions>
91+
<execution>
92+
<id>attach-javadoc</id>
93+
<phase>verify</phase>
94+
<goals>
95+
<goal>jar</goal>
96+
</goals>
97+
</execution>
98+
</executions>
99+
</plugin>
84100

85101
<!--
86102
<plugin>
@@ -94,22 +110,6 @@
94110
<autoReleaseAfterClose>true</autoReleaseAfterClose>
95111
</configuration>
96112
</plugin>
97-
<plugin>
98-
<groupId>org.apache.maven.plugins</groupId>
99-
<artifactId>maven-javadoc-plugin</artifactId>
100-
<version>3.0.1</version>
101-
<configuration>
102-
</configuration>
103-
<executions>
104-
<execution>
105-
<id>attach-javadoc</id>
106-
<phase>verify</phase>
107-
<goals>
108-
<goal>jar</goal>
109-
</goals>
110-
</execution>
111-
</executions>
112-
</plugin>
113113
114114
<plugin>
115115
<groupId>org.apache.maven.plugins</groupId>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package cn.edu.hfut.dmic.webcollector.net;
2+
3+
import cn.edu.hfut.dmic.webcollector.conf.DefaultConfigured;
4+
import cn.edu.hfut.dmic.webcollector.model.CrawlDatum;
5+
import cn.edu.hfut.dmic.webcollector.model.Page;
6+
7+
public abstract class CommonRequester extends DefaultConfigured implements Requester{
8+
@Override
9+
public Page getResponse(String url) throws Exception {
10+
return getResponse(new CrawlDatum(url));
11+
}
12+
}

WebCollector/src/test/java/cn/edu/hfut/dmic/webcollector/util/DBManagerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void testInject(DBManager dbManager) throws Exception {
4949

5050
String tempCrawlPath = "temp_test_crawl";
5151

52-
// @Test
52+
@Test
5353
public void testBerkeleyDBInjector() throws Exception {
5454
BerkeleyDBManager dbManager = new BerkeleyDBManager(tempCrawlPath);
5555
testInject(dbManager);

webcollector-2.72-beta-bin.zip

486 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)