Skip to content

Commit f663e3c

Browse files
authored
Merge pull request #3 from codeallthethingz/java-project
Simple maven project stub
2 parents 32ad32d + e7a6de1 commit f663e3c

File tree

6 files changed

+139
-0
lines changed

6 files changed

+139
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea/
2+
.vscode/
23
DS_Store

java/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
target
2+
bin
3+
.settings
4+
.project
5+
.classpath

java/README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Java implementation
2+
3+
4+
## Development
5+
6+
### Installation
7+
8+
`mvn clean install`
9+
10+
This project is formatted with https://google.github.io/styleguide/javaguide.html, which is automatically taken care of by a maven plugin on build.
11+
12+
If you want your IDE to follow this format:
13+
14+
**VS Code setup**
15+
16+
* Change the indent size to 2.
17+
* Add to following to your settings
18+
```
19+
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml",
20+
```
21+
22+
23+
24+
**Intellij/Eclipse**
25+
26+
* [Eclipse](https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml)
27+
* [IntelliJ IDEA](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml)

java/pom.xml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
6+
<modelVersion>4.0.0</modelVersion>
7+
<groupId>org.numenta</groupId>
8+
<artifactId>2d-object-recognizer</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
<name>2d-object-recognizer</name>
11+
<properties>
12+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13+
<maven.compiler.source>1.7</maven.compiler.source>
14+
<maven.compiler.target>1.7</maven.compiler.target>
15+
</properties>
16+
<dependencies>
17+
<dependency>
18+
<groupId>junit</groupId>
19+
<artifactId>junit</artifactId>
20+
<version>4.11</version>
21+
<scope>test</scope>
22+
</dependency>
23+
</dependencies>
24+
<build>
25+
<plugins>
26+
<plugin>
27+
<groupId>com.coveo</groupId>
28+
<artifactId>fmt-maven-plugin</artifactId>
29+
<version>2.8</version>
30+
<executions>
31+
<execution>
32+
<goals>
33+
<goal>format</goal>
34+
</goals>
35+
</execution>
36+
</executions>
37+
</plugin>
38+
</plugins>
39+
<pluginManagement>
40+
<!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
41+
<plugins>
42+
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
43+
<plugin>
44+
<artifactId>maven-clean-plugin</artifactId>
45+
<version>3.1.0</version>
46+
</plugin>
47+
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
48+
<plugin>
49+
<artifactId>maven-resources-plugin</artifactId>
50+
<version>3.0.2</version>
51+
</plugin>
52+
<plugin>
53+
<artifactId>maven-compiler-plugin</artifactId>
54+
<version>3.8.0</version>
55+
</plugin>
56+
<plugin>
57+
<artifactId>maven-surefire-plugin</artifactId>
58+
<version>2.22.1</version>
59+
</plugin>
60+
<plugin>
61+
<artifactId>maven-jar-plugin</artifactId>
62+
<version>3.0.2</version>
63+
</plugin>
64+
<plugin>
65+
<artifactId>maven-install-plugin</artifactId>
66+
<version>2.5.2</version>
67+
</plugin>
68+
<plugin>
69+
<artifactId>maven-deploy-plugin</artifactId>
70+
<version>2.8.2</version>
71+
</plugin>
72+
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
73+
<plugin>
74+
<artifactId>maven-site-plugin</artifactId>
75+
<version>3.7.1</version>
76+
</plugin>
77+
<plugin>
78+
<artifactId>maven-project-info-reports-plugin</artifactId>
79+
<version>3.0.0</version>
80+
</plugin>
81+
</plugins>
82+
</pluginManagement>
83+
</build>
84+
</project>
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.numenta;
2+
3+
/** Hello world! */
4+
public class App {
5+
public static void main(String[] args) {
6+
System.out.println("Hello " + "World!");
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.numenta;
2+
3+
import static org.junit.Assert.assertTrue;
4+
5+
import org.junit.Test;
6+
7+
/** Unit test for simple App. */
8+
public class AppTest {
9+
/** Rigorous Test :-) */
10+
@Test
11+
public void shouldAnswerWithTrue() {
12+
assertTrue(true);
13+
}
14+
}

0 commit comments

Comments
 (0)