yauhenip 6 anos atrás
pai
commit
b9f06367ef

+ 0
- 15
.idea/ZCW-Fido-URLFetch.iml Ver arquivo

@@ -1,15 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
4
-    <output url="file://$MODULE_DIR$/target/classes" />
5
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
-    <content url="file://$MODULE_DIR$">
7
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10
-      <excludeFolder url="file://$MODULE_DIR$/target" />
11
-    </content>
12
-    <orderEntry type="inheritedJdk" />
13
-    <orderEntry type="sourceFolder" forTests="false" />
14
-  </component>
15
-</module>

+ 18
- 0
.idea/artifacts/ZCW_Fido_URLFetch_jar.xml Ver arquivo

@@ -0,0 +1,18 @@
1
+<component name="ArtifactManager">
2
+  <artifact name="ZCW-Fido-URLFetch:jar">
3
+    <output-path>$PROJECT_DIR$/out/artifacts/ZCW_Fido_URLFetch_jar</output-path>
4
+    <root id="root">
5
+      <element id="archive" name="ZCW-Fido-URLFetch.jar">
6
+        <element id="module-output" name="ZCW-Fido-URLFetch" />
7
+      </element>
8
+      <element id="library" level="project" name="Maven: org.jsoup:jsoup:1.10.2" />
9
+      <element id="library" level="project" name="Maven: org.junit.jupiter:junit-jupiter-api:5.2.0" />
10
+      <element id="library" level="project" name="Maven: org.apiguardian:apiguardian-api:1.0.0" />
11
+      <element id="library" level="project" name="Maven: org.opentest4j:opentest4j:1.1.0" />
12
+      <element id="library" level="project" name="Maven: org.junit.platform:junit-platform-commons:1.2.0" />
13
+      <element id="directory" name="META-INF">
14
+        <element id="file-copy" path="$PROJECT_DIR$/src/main/java/META-INF/MANIFEST.MF" />
15
+      </element>
16
+    </root>
17
+  </artifact>
18
+</component>

+ 0
- 3
.idea/compiler.xml Ver arquivo

@@ -9,8 +9,5 @@
9 9
         <module name="ZCW-Fido-URLFetch" />
10 10
       </profile>
11 11
     </annotationProcessing>
12
-    <bytecodeTargetLevel>
13
-      <module name="ZCW-Fido-URLFetch" target="1.5" />
14
-    </bytecodeTargetLevel>
15 12
   </component>
16 13
 </project>

+ 4
- 0
.idea/misc.xml Ver arquivo

@@ -1,5 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
3 4
   <component name="MavenProjectsManager">
4 5
     <option name="originalFiles">
5 6
       <list>
@@ -7,4 +8,7 @@
7 8
       </list>
8 9
     </option>
9 10
   </component>
11
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
12
+    <output url="file://$PROJECT_DIR$/out" />
13
+  </component>
10 14
 </project>

+ 0
- 8
.idea/modules.xml Ver arquivo

@@ -1,8 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="ProjectModuleManager">
4
-    <modules>
5
-      <module fileurl="file://$PROJECT_DIR$/.idea/ZCW-Fido-URLFetch.iml" filepath="$PROJECT_DIR$/.idea/ZCW-Fido-URLFetch.iml" />
6
-    </modules>
7
-  </component>
8
-</project>

+ 1
- 1
.idea/vcs.xml Ver arquivo

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3 3
   <component name="VcsDirectoryMappings">
4
-    <mapping directory="" vcs="Git" />
4
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
5 5
   </component>
6 6
 </project>

+ 12
- 0
pom.xml Ver arquivo

@@ -7,6 +7,18 @@
7 7
     <groupId>zipcode.rocks.fido</groupId>
8 8
     <artifactId>ZCW-Fido-URLFetch</artifactId>
9 9
     <version>1.0-SNAPSHOT</version>
10
+    <dependencies>
11
+        <dependency>
12
+            <groupId>org.jsoup</groupId>
13
+            <artifactId>jsoup</artifactId>
14
+            <version>1.10.2</version>
15
+        </dependency>
16
+        <dependency>
17
+            <groupId>org.junit.jupiter</groupId>
18
+            <artifactId>junit-jupiter-api</artifactId>
19
+            <version>5.2.0</version>
20
+        </dependency>
21
+    </dependencies>
10 22
 
11 23
     
12 24
 </project>

+ 5
- 0
src/main/java/META-INF/MANIFEST.MF Ver arquivo

@@ -0,0 +1,5 @@
1
+Manifest-Version: 1.0
2
+Class-Path: jsoup-1.10.2.jar junit-jupiter-api-5.2.0.jar apiguardian-a
3
+ pi-1.0.0.jar opentest4j-1.1.0.jar junit-platform-commons-1.2.0.jar
4
+Main-Class: fetcher.URLFetcher
5
+

+ 15
- 0
src/main/java/fetcher/URLFetcher.java Ver arquivo

@@ -0,0 +1,15 @@
1
+package fetcher;
2
+
3
+import org.jsoup.Jsoup;
4
+import org.jsoup.nodes.Document;
5
+import java.io.IOException;
6
+import java.util.Scanner;
7
+
8
+public class URLFetcher {
9
+    public static void main(String[] args) throws IOException {
10
+        System.out.println("Enter URL to fetch:");
11
+        String url = new Scanner(System.in).nextLine();
12
+        Document doc = Jsoup.connect(url).get();
13
+        System.out.println(doc);
14
+    }
15
+}

+ 7
- 0
src/test/java/fetcher/URLFetcherTest.java Ver arquivo

@@ -0,0 +1,7 @@
1
+package fetcher;
2
+
3
+import static org.junit.jupiter.api.Assertions.*;
4
+
5
+class URLFetcherTest {
6
+
7
+}

BIN
target/classes/fetcher/URLFetcher.class Ver arquivo


BIN
target/test-classes/fetcher/URLFetcherTest.class Ver arquivo