Skip to content

Commit 6f31d79

Browse files
committed
init java env
Signed-off-by: Zhaowei Fang <[email protected]>
1 parent ded538a commit 6f31d79

File tree

5 files changed

+166
-19
lines changed

5 files changed

+166
-19
lines changed

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,48 @@
1616

1717
# vs code
1818
.vscode/
19+
.classpath
20+
.project
21+
.settings
1922

2023
# mac
2124
.DS_Store
25+
26+
27+
##################### maven
28+
target/
29+
pom.xml.tag
30+
pom.xml.releaseBackup
31+
pom.xml.versionsBackup
32+
pom.xml.next
33+
release.properties
34+
dependency-reduced-pom.xml
35+
buildNumber.properties
36+
.mvn/timing.properties
37+
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
38+
.mvn/wrapper/maven-wrapper.jar
39+
40+
###################### java
41+
# Compiled class file
42+
*.class
43+
44+
# Log file
45+
*.log
46+
47+
# BlueJ files
48+
*.ctxt
49+
50+
# Mobile Tools for Java (J2ME)
51+
.mtj.tmp/
52+
53+
# Package Files #
54+
*.jar
55+
*.war
56+
*.nar
57+
*.ear
58+
*.zip
59+
*.tar.gz
60+
*.rar
61+
62+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
63+
hs_err_pid*

.travis.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
language: go
2-
3-
go:
4-
- "1.12.x"
5-
6-
go_import_path: leetcode
7-
8-
install:
9-
- go get -t -v ./...
10-
11-
script:
12-
- go test ./... -race -coverprofile=coverage.txt -covermode=atomic
13-
14-
after_success:
15-
- bash <(curl -s https://codecov.io/bash)
16-
17-
branches:
18-
only:
19-
- master
1+
jobs:
2+
include:
3+
- language: go
4+
go:
5+
- "1.12.x"
6+
- "1.13.x"
7+
go_import_path: leetcode
8+
install:
9+
- go get -t -v ./...
10+
script:
11+
- go test ./... -race -coverprofile=coverage.txt -covermode=atomic
12+
after_success:
13+
- bash <(curl -s https://codecov.io/bash)
14+
branches:
15+
only:
16+
- master

pom.xml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.leetcode</groupId>
8+
<artifactId>leetcode</artifactId>
9+
<version>0.1.1</version>
10+
11+
<name>leetcode</name>
12+
<!-- FIXME change it to the project's website -->
13+
<url>http://www.example.com</url>
14+
15+
<properties>
16+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17+
<maven.compiler.source>1.7</maven.compiler.source>
18+
<maven.compiler.target>1.7</maven.compiler.target>
19+
</properties>
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>junit</groupId>
24+
<artifactId>junit</artifactId>
25+
<version>4.11</version>
26+
<scope>test</scope>
27+
</dependency>
28+
</dependencies>
29+
30+
<build>
31+
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
32+
<plugins>
33+
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
34+
<plugin>
35+
<artifactId>maven-clean-plugin</artifactId>
36+
<version>3.1.0</version>
37+
</plugin>
38+
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
39+
<plugin>
40+
<artifactId>maven-resources-plugin</artifactId>
41+
<version>3.0.2</version>
42+
</plugin>
43+
<plugin>
44+
<artifactId>maven-compiler-plugin</artifactId>
45+
<version>3.8.0</version>
46+
</plugin>
47+
<plugin>
48+
<artifactId>maven-surefire-plugin</artifactId>
49+
<version>2.22.1</version>
50+
</plugin>
51+
<plugin>
52+
<artifactId>maven-jar-plugin</artifactId>
53+
<version>3.0.2</version>
54+
</plugin>
55+
<plugin>
56+
<artifactId>maven-install-plugin</artifactId>
57+
<version>2.5.2</version>
58+
</plugin>
59+
<plugin>
60+
<artifactId>maven-deploy-plugin</artifactId>
61+
<version>2.8.2</version>
62+
</plugin>
63+
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
64+
<plugin>
65+
<artifactId>maven-site-plugin</artifactId>
66+
<version>3.7.1</version>
67+
</plugin>
68+
<plugin>
69+
<artifactId>maven-project-info-reports-plugin</artifactId>
70+
<version>3.0.0</version>
71+
</plugin>
72+
</plugins>
73+
</pluginManagement>
74+
</build>
75+
</project>

src/main/java/com/leetcode/App.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.leetcode;
2+
3+
/**
4+
* Hello world!
5+
*
6+
*/
7+
public class App
8+
{
9+
public static void main( String[] args )
10+
{
11+
System.out.println( "Hello World!" );
12+
}
13+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.leetcode;
2+
3+
import static org.junit.Assert.assertTrue;
4+
5+
import org.junit.Test;
6+
7+
/**
8+
* Unit test for simple App.
9+
*/
10+
public class AppTest
11+
{
12+
/**
13+
* Rigorous Test :-)
14+
*/
15+
@Test
16+
public void shouldAnswerWithTrue()
17+
{
18+
assertTrue( true );
19+
}
20+
}

0 commit comments

Comments
 (0)