Skip to content

Commit a797e08

Browse files
committed
maven instead of ant.
1 parent 78a280e commit a797e08

File tree

7 files changed

+241
-36
lines changed

7 files changed

+241
-36
lines changed

.classpath

+65-31
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,70 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="src" path="src/common"/>
4-
<classpathentry kind="src" path="src/api_client"/>
5-
<classpathentry kind="src" path="src/peer"/>
6-
<classpathentry kind="src" path="src/directory"/>
7-
<classpathentry kind="src" path="src/web_server"/>
8-
<classpathentry kind="src" path="src/simple_server"/>
9-
<classpathentry kind="src" path="src/external/mysql_lib"/>
10-
<classpathentry kind="src" path="test"/>
3+
<classpathentry kind="src" output="target/classes" path="src/api_client">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="src" output="target/classes" path="src/peer">
10+
<attributes>
11+
<attribute name="optional" value="true"/>
12+
<attribute name="maven.pomderived" value="true"/>
13+
</attributes>
14+
</classpathentry>
15+
<classpathentry kind="src" output="target/classes" path="src/directory">
16+
<attributes>
17+
<attribute name="optional" value="true"/>
18+
<attribute name="maven.pomderived" value="true"/>
19+
</attributes>
20+
</classpathentry>
21+
<classpathentry kind="src" output="target/classes" path="src/web_server">
22+
<attributes>
23+
<attribute name="optional" value="true"/>
24+
<attribute name="maven.pomderived" value="true"/>
25+
</attributes>
26+
</classpathentry>
27+
<classpathentry kind="src" output="target/classes" path="src/simple_server">
28+
<attributes>
29+
<attribute name="optional" value="true"/>
30+
<attribute name="maven.pomderived" value="true"/>
31+
</attributes>
32+
</classpathentry>
33+
<classpathentry kind="src" output="target/classes" path="src/external/mysql_lib">
34+
<attributes>
35+
<attribute name="optional" value="true"/>
36+
<attribute name="maven.pomderived" value="true"/>
37+
</attributes>
38+
</classpathentry>
1139
<classpathentry kind="src" path="integration_tests/src"/>
12-
<classpathentry kind="src" path="src/server"/>
13-
<classpathentry exported="true" kind="lib" path="libs/javax.servlet-3.0.0.v201112011016.jar"/>
14-
<classpathentry exported="true" kind="lib" path="libs/jetty/jetty-all-8.1.7.v20120910.jar" sourcepath="libs/jetty/jetty-all-8.1.7.v20120910-sources.jar"/>
15-
<classpathentry exported="true" kind="lib" path="libs/log4j-1.2.17.jar"/>
16-
<classpathentry exported="true" kind="lib" path="libs/mailapi.jar"/>
17-
<classpathentry exported="true" kind="lib" path="libs/smtp.jar"/>
18-
<classpathentry exported="true" kind="lib" path="libs/guice-3.0.jar"/>
19-
<classpathentry exported="true" kind="lib" path="libs/aopalliance.jar"/>
20-
<classpathentry exported="true" kind="lib" path="libs/mockito-all-1.9.0.jar" sourcepath="libs/mockito-all-1.9.0.jar">
21-
<attributes>
22-
<attribute name="javadoc_location" value="jar:platform:/resource/codeine/libs/mockito-all-1.9.0.jar!/"/>
23-
</attributes>
24-
</classpathentry>
25-
<classpathentry exported="true" kind="lib" path="libs/guice-servlet-3.0.jar"/>
26-
<classpathentry exported="true" kind="lib" path="libs/javax.inject.jar"/>
27-
<classpathentry exported="true" kind="lib" path="libs/gson/gson-2.2.4.jar" sourcepath="libs/gson/gson-2.2.4-sources.jar"/>
28-
<classpathentry exported="true" kind="lib" path="libs/guava/guava-16.0.1.jar" sourcepath="libs/guava/guava-16.0.1-sources.jar"/>
29-
<classpathentry kind="lib" path="libs/joda-time/joda-time-2.2.jar" sourcepath="libs/joda-time/joda-time-2.2-sources.jar"/>
30-
<classpathentry kind="lib" path="libs/mysql/mysql-connector-java-5.1.15-bin.jar"/>
31-
<classpathentry kind="lib" path="libs/jmustache-1.8.jar"/>
40+
<classpathentry kind="src" output="target/classes" path="src/server">
41+
<attributes>
42+
<attribute name="optional" value="true"/>
43+
<attribute name="maven.pomderived" value="true"/>
44+
</attributes>
45+
</classpathentry>
3246
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
33-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
34-
<classpathentry exported="true" kind="lib" path="libs/mongo/mongo-java-driver-2.11.2.jar" sourcepath="libs/mongo/mongo-java-driver-2.11.2-sources.jar"/>
35-
<classpathentry kind="output" path="compiled_classes"/>
47+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
48+
<attributes>
49+
<attribute name="maven.pomderived" value="true"/>
50+
</attributes>
51+
</classpathentry>
52+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
53+
<attributes>
54+
<attribute name="maven.pomderived" value="true"/>
55+
</attributes>
56+
</classpathentry>
57+
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/common">
58+
<attributes>
59+
<attribute name="optional" value="true"/>
60+
<attribute name="maven.pomderived" value="true"/>
61+
</attributes>
62+
</classpathentry>
63+
<classpathentry kind="src" output="target/test-classes" path="test">
64+
<attributes>
65+
<attribute name="optional" value="true"/>
66+
<attribute name="maven.pomderived" value="true"/>
67+
</attributes>
68+
</classpathentry>
69+
<classpathentry kind="output" path="target/classes"/>
3670
</classpath>

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/.idea
66
codeine.iml
77
*.iml
8+
/target/

.project

+6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@
1010
<arguments>
1111
</arguments>
1212
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.m2e.core.maven2Builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
1318
</buildSpec>
1419
<natures>
20+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
1521
<nature>org.eclipse.jdt.core.javanature</nature>
1622
</natures>
1723
</projectDescription>

.settings/org.eclipse.jdt.core.prefs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
23
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
34
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
45
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
@@ -19,7 +20,7 @@ org.eclipse.jdt.core.compiler.problem.deadCode=warning
1920
org.eclipse.jdt.core.compiler.problem.deprecation=warning
2021
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
2122
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
22-
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
23+
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
2324
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
2425
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
2526
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
@@ -28,7 +29,7 @@ org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
2829
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
2930
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
3031
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
31-
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
32+
org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
3233
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
3334
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
3435
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
@@ -47,6 +48,7 @@ org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignor
4748
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
4849
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
4950
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
51+
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
5052
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
5153
org.eclipse.jdt.core.compiler.problem.nullReference=warning
5254
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
@@ -67,6 +69,7 @@ org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
6769
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
6870
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
6971
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
72+
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
7073
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
7174
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
7275
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
@@ -90,6 +93,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=
9093
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
9194
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
9295
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
96+
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
9397
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
9498
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
9599
org.eclipse.jdt.core.compiler.source=1.7

.settings/org.eclipse.m2e.core.prefs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
activeProfiles=
2+
eclipse.preferences.version=1
3+
resolveWorkspaceProjects=true
4+
version=1

build.pl

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414

1515
my $version = getVersionFull();
1616
my $versionNoDate = getVersionNoDate();
17-
print "java is $ENV{JAVA_HOME}\n";#1.7
18-
print "ant is ant\n";#1.8?
19-
es("ant", 1);
17+
#print "java is $ENV{JAVA_HOME}\n";#1.7
18+
#print "ant is ant\n";#1.8?
19+
es("mvn clean package");
20+
es("cp target/codeine-1.0.0-jar-with-dependencies.jar dist/bin/codeine.jar");
2021
es("cd deployment/http-root/ajs ; npm install");
2122
es("cd deployment/http-root/ajs ; bower install");
2223
es("cd deployment/http-root/ajs ; bower update");

pom.xml

+155
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>codeine</groupId>
5+
<artifactId>codeine</artifactId>
6+
<version>1.0.0</version>
7+
<name>codeine</name>
8+
<build>
9+
<sourceDirectory>src/external/mysql_lib</sourceDirectory>
10+
<testSourceDirectory>test</testSourceDirectory>
11+
<resources>
12+
<resource>
13+
<directory>src/common</directory>
14+
<excludes>
15+
<exclude>**/*.java</exclude>
16+
</excludes>
17+
</resource>
18+
</resources>
19+
<plugins>
20+
<plugin>
21+
<artifactId>maven-compiler-plugin</artifactId>
22+
<version>3.1</version>
23+
<configuration>
24+
<source>1.7</source>
25+
<target>1.7</target>
26+
</configuration>
27+
</plugin>
28+
<plugin>
29+
<groupId>org.codehaus.mojo</groupId>
30+
<artifactId>build-helper-maven-plugin</artifactId>
31+
<version>1.8</version>
32+
<executions>
33+
<execution>
34+
<id>add-source</id>
35+
<phase>generate-sources</phase>
36+
<goals>
37+
<goal>add-source</goal>
38+
</goals>
39+
<configuration>
40+
<sources>
41+
<source>src/common</source>
42+
<source>src/api_client</source>
43+
<source>src/directory</source>
44+
<source>src/external/mysql_lib</source>
45+
<source>src/peer</source>
46+
<source>src/server</source>
47+
<source>src/web_server</source>
48+
<source>src/simple_server</source>
49+
</sources>
50+
</configuration>
51+
</execution>
52+
</executions>
53+
</plugin>
54+
<plugin>
55+
<artifactId>maven-assembly-plugin</artifactId>
56+
<executions>
57+
<execution>
58+
<phase>package</phase>
59+
<goals>
60+
<goal>single</goal>
61+
</goals>
62+
</execution>
63+
</executions>
64+
<configuration>
65+
<descriptorRefs>
66+
<descriptorRef>jar-with-dependencies</descriptorRef>
67+
</descriptorRefs>
68+
</configuration>
69+
</plugin>
70+
</plugins>
71+
</build>
72+
<dependencies>
73+
<dependency>
74+
<groupId>log4j</groupId>
75+
<artifactId>log4j</artifactId>
76+
<version>1.2.17</version>
77+
</dependency>
78+
<dependency>
79+
<groupId>com.google.inject</groupId>
80+
<artifactId>guice</artifactId>
81+
<version>3.0</version>
82+
</dependency>
83+
<dependency>
84+
<groupId>com.google.inject.extensions</groupId>
85+
<artifactId>guice-servlet</artifactId>
86+
<version>3.0</version>
87+
</dependency>
88+
<dependency>
89+
<groupId>com.google.code.gson</groupId>
90+
<artifactId>gson</artifactId>
91+
<version>2.2.4</version>
92+
</dependency>
93+
<dependency>
94+
<groupId>com.google.guava</groupId>
95+
<artifactId>guava</artifactId>
96+
<version>18.0</version>
97+
</dependency>
98+
<dependency>
99+
<groupId>javax.servlet</groupId>
100+
<artifactId>javax.servlet-api</artifactId>
101+
<version>3.0.1</version>
102+
</dependency>
103+
<dependency>
104+
<groupId>org.eclipse.jetty</groupId>
105+
<artifactId>jetty-server</artifactId>
106+
<version>8.1.16.v20140903</version>
107+
</dependency>
108+
<dependency>
109+
<groupId>org.eclipse.jetty</groupId>
110+
<artifactId>jetty-security</artifactId>
111+
<version>8.1.16.v20140903</version>
112+
</dependency>
113+
<dependency>
114+
<groupId>org.eclipse.jetty</groupId>
115+
<artifactId>jetty-servlet</artifactId>
116+
<version>8.1.16.v20140903</version>
117+
</dependency>
118+
<dependency>
119+
<groupId>org.eclipse.jetty</groupId>
120+
<artifactId>jetty-servlets</artifactId>
121+
<version>8.1.16.v20140903</version>
122+
</dependency>
123+
<dependency>
124+
<groupId>joda-time</groupId>
125+
<artifactId>joda-time</artifactId>
126+
<version>2.4</version>
127+
</dependency>
128+
<dependency>
129+
<groupId>mysql</groupId>
130+
<artifactId>mysql-connector-java</artifactId>
131+
<version>5.1.15</version>
132+
</dependency>
133+
<dependency>
134+
<groupId>org.mongodb</groupId>
135+
<artifactId>mongo-java-driver</artifactId>
136+
<version>2.12.3</version>
137+
</dependency>
138+
<dependency>
139+
<groupId>javax.mail</groupId>
140+
<artifactId>javax.mail-api</artifactId>
141+
<version>1.5.2</version>
142+
</dependency>
143+
<dependency>
144+
<groupId>junit</groupId>
145+
<artifactId>junit</artifactId>
146+
<version>4.11</version>
147+
</dependency>
148+
<dependency>
149+
<groupId>org.mockito</groupId>
150+
<artifactId>mockito-all</artifactId>
151+
<version>1.9.5</version>
152+
<scope>test</scope>
153+
</dependency>
154+
</dependencies>
155+
</project>

0 commit comments

Comments
 (0)