Skip to content

Commit 5ea6a19

Browse files
author
Christian Bauer
committed
New exchange rate downloader, some cleanup
1 parent 8dccca5 commit 5ea6a19

File tree

15 files changed

+133
-344
lines changed

15 files changed

+133
-344
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.idea
33
.local
44
.docker
5+
target/
File renamed without changes.

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
# Konto - AGPLv3 double-entry ledger accounting webapp
22

3-
![Konto Screenshot](konto_screenshot01.png)
3+
![Konto Screenshot](konto-screenshot01.png)
44

55
## Installation
66

7-
[Download the latest web application release](https://github.com/4thline/konto/releases). Get a Servlet 2.5 compatible container and deploy the WAR. An in-memory temporary H2 DBMS instance will be used.
7+
[Download the latest web application release](https://github.com/4thline/konto/releases).
88

9-
If you want to use a permanent external H2 DBMS instance, unpack the WAR and edit the `WEB-INF/classes/hibernate.cfg.xml` file. Then repack the WAR and deploy. Also edit and deploy the `/sql/database-init-schema.sql` as needed, import it on your DBMS.
9+
Get a Servlet 2.5 compatible container and deploy the WAR. An in-memory temporary H2 DBMS instance will be used.
10+
11+
If you want to use a permanent external H2 DBMS instance:
12+
13+
* Make directory for installation: `mkdir .local/`
14+
* Download dependencies JAR files: `mvn dependency:copy-dependencies -DoutputDirectory=.local/lib`
15+
* Run database: `java -jar .local/lib/h2-1.3.158.jar -tcp -tcpPort 9093 -baseDir $PWD/.local/`
16+
* Unpack WAR and edit `WEB-INF/classes/hibernate.cfg.xml`
17+
* Repack the WAR and deploy
18+
19+
You also might want to edit and deploy the `/sql/database-init-schema.sql` as needed, import it on your DBMS.
1020

1121
If you want to use a different database, recreate the SQL file(s) with `mvn package` after you edit the `src/main/resources/hibernate.cfg.xml` file.
1222

1323
## Development IDE setup
1424

1525
* Import in IntelliJ IDEA
1626
* Create Run Configuration, build and deploy `konto:war exploded` artifact to Wildfly 10.x
17-
* Run GWT SDM code server in background: `mvn gwt:run-codeserver`
27+
* Run GWT SDM code server in background: `mvn gwt:codeserver`
1828
* Open http://localhost:8080/
19-
20-
## Deployment
21-
22-
* Make directory for installation: `mkdir .local/`
23-
* Download dependencies JAR files: `mvn dependency:copy-dependencies -DoutputDirectory=.local/lib`
24-
* Run database: `java -jar .local/lib/h2-1.3.158.jar -tcp -tcpPort 9093 -baseDir $PWD/.local/`
25-
* Edit `src/main/resources/hibernate.cfg.xml`
26-
* Either run in IDE or build and deploy WAR manually: `mvn clean package`
29+
* Build release distribution with `mvn clean package`
2730

File renamed without changes.

pom.xml

Lines changed: 21 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<groupId>org.fourthline.konto</groupId>
1010
<artifactId>konto</artifactId>
11-
<version>1.0.2</version>
11+
<version>1.0.3</version>
1212
<packaging>war</packaging>
1313

1414
<!-- ##################################################################################################### -->
@@ -43,13 +43,6 @@
4343
</developer>
4444
</developers>
4545

46-
<distributionManagement>
47-
<repository>
48-
<id>4thline.org</id>
49-
<url>scpexe://4thline.org/webroot/vhosts/8080/4thline.org/m2/</url>
50-
</repository>
51-
</distributionManagement>
52-
5346
<!-- ##################################################################################################### -->
5447

5548
<properties>
@@ -60,7 +53,7 @@
6053
<seamless.version>1.0.0</seamless.version>
6154
<testng.version>6.14.2</testng.version>
6255
<javax.inject.version>1</javax.inject.version>
63-
<gwt.maven.plugin.version>2.8.2</gwt.maven.plugin.version>
56+
<gwt.maven.plugin.version>1.0-rc-10</gwt.maven.plugin.version>
6457
<gwt.version>2.8.2</gwt.version>
6558
<gin.version>2.1.2</gin.version>
6659
<hibernate.core.version>3.6.0.Final</hibernate.core.version>
@@ -118,20 +111,27 @@
118111
<pluginManagement>
119112
<plugins>
120113

121-
<!-- Ant fallback -->
114+
<!-- Ant fallback for hbm2ddl -->
122115
<plugin>
123116
<artifactId>maven-antrun-plugin</artifactId>
124117
<version>1.3</version>
125118
</plugin>
126119

127120
<!-- GWT -->
128121
<plugin>
129-
<groupId>org.codehaus.mojo</groupId>
122+
<groupId>net.ltgt.gwt.maven</groupId>
130123
<artifactId>gwt-maven-plugin</artifactId>
131124
<version>${gwt.maven.plugin.version}</version>
132125
<configuration>
126+
<!-- Why is this not the default? Why would GWT be in the runtime classpath? -->
127+
<classpathScope>compile</classpathScope>
128+
129+
<moduleName>org.fourthline.konto.Konto</moduleName>
130+
131+
<skipModule>true</skipModule>
132+
133133
<logLevel>INFO</logLevel>
134-
<style>PRETTY</style>
134+
<style>OBFUSCATED</style>
135135

136136
<!--
137137
Can't disable these unneeded artifacts, so compile
@@ -140,33 +140,16 @@
140140
<deploy>${project.build.directory}/gwt-deploy</deploy>
141141
<outputDirectory>${project.build.directory}/${project.artifactId}.war</outputDirectory>
142142

143-
<!-- SDM configuration -->
144-
<launcherDir>${project.build.directory}/konto.war/</launcherDir>
145-
<incremental>false</incremental>
146-
<precompile>false</precompile>
143+
<!-- Codeserver output when developing -->
144+
<launcherDir>${project.build.directory}/konto-${project.version}/</launcherDir>
147145

148146
</configuration>
149-
<executions>
150-
<execution>
151-
<id>gwt-compile</id>
152-
<goals>
153-
<goal>compile</goal>
154-
</goals>
155-
</execution>
156-
<execution>
157-
<id>gwt-clean</id>
158-
<phase>clean</phase>
159-
<goals>
160-
<goal>clean</goal>
161-
</goals>
162-
</execution>
163-
</executions>
164147
</plugin>
165148

166149
<!-- Unit tests -->
167150
<plugin>
168151
<artifactId>maven-surefire-plugin</artifactId>
169-
<version>2.5</version>
152+
<version>2.22.1</version>
170153
<configuration>
171154
<redirectTestOutputToFile>true</redirectTestOutputToFile>
172155
<systemProperties>
@@ -208,26 +191,7 @@
208191
<!-- Assembly -->
209192
<plugin>
210193
<artifactId>maven-assembly-plugin</artifactId>
211-
<version>2.2.1</version>
212-
</plugin>
213-
214-
<!-- Deploy phase -->
215-
<plugin>
216-
<artifactId>maven-deploy-plugin</artifactId>
217-
<version>2.5</version>
218-
</plugin>
219-
220-
<!-- Website lifecycle -->
221-
<plugin>
222-
<artifactId>maven-site-plugin</artifactId>
223-
<version>3.3</version>
224-
<dependencies>
225-
<dependency>
226-
<groupId>org.apache.maven.doxia</groupId>
227-
<artifactId>doxia-module-xhtml</artifactId>
228-
<version>1.1.2</version>
229-
</dependency>
230-
</dependencies>
194+
<version>3.1.1</version>
231195
</plugin>
232196

233197
</plugins>
@@ -239,15 +203,12 @@
239203
<!-- Waaargh -->
240204
<plugin>
241205
<artifactId>maven-war-plugin</artifactId>
242-
<version>2.4</version>
243-
<configuration>
244-
<webappDirectory>${project.build.directory}/${project.artifactId}.war</webappDirectory>
245-
</configuration>
206+
<version>3.2.2</version>
246207
</plugin>
247208

248209
<!-- Compile GWT client for packaging -->
249210
<plugin>
250-
<groupId>org.codehaus.mojo</groupId>
211+
<groupId>net.ltgt.gwt.maven</groupId>
251212
<artifactId>gwt-maven-plugin</artifactId>
252213
<executions>
253214
<execution>
@@ -296,7 +257,7 @@
296257
</executions>
297258
<configuration>
298259
<descriptors>
299-
<descriptor>src/dist/assembly.xml</descriptor>
260+
<descriptor>src/assembly.xml</descriptor>
300261
</descriptors>
301262
<workDirectory>target/assembly/work</workDirectory>
302263
<appendAssemblyId>false</appendAssemblyId>
@@ -305,62 +266,21 @@
305266
</configuration>
306267
</plugin>
307268

308-
309-
<!-- Cleanup the crap produced by the site plugin... -->
310-
<plugin>
311-
<artifactId>maven-antrun-plugin</artifactId>
312-
<executions>
313-
<execution>
314-
<id>finalize-site</id>
315-
<phase>post-site</phase>
316-
<configuration>
317-
<tasks>
318-
<delete dir="${project.reporting.outputDirectory}/css"/>
319-
<move todir="${project.reporting.outputDirectory}">
320-
<fileset dir="${project.reporting.outputDirectory}">
321-
<include name="**/*.html"/>
322-
</fileset>
323-
<mapper type="glob" from="*.html" to="*.xhtml"/>
324-
</move>
325-
</tasks>
326-
</configuration>
327-
<goals>
328-
<goal>run</goal>
329-
</goals>
330-
</execution>
331-
</executions>
332-
</plugin>
333269
<plugin>
334270
<groupId>org.apache.maven.plugins</groupId>
335271
<artifactId>maven-compiler-plugin</artifactId>
336-
<version>3.7.0</version>
272+
<version>3.8.0</version>
337273
<configuration>
338274
<source>1.8</source>
339275
<target>1.8</target>
340276
</configuration>
341277
</plugin>
342278

343279
</plugins>
344-
345-
<!-- Required for we-don't-care-about-compatibility-Maven3 'deploy' goal -->
346-
<extensions>
347-
<extension>
348-
<groupId>org.apache.maven.wagon</groupId>
349-
<artifactId>wagon-ssh-external</artifactId>
350-
<version>1.0-beta-7</version>
351-
</extension>
352-
</extensions>
353-
354280
</build>
355281

356282
<!-- ##################################################################################################### -->
357283

358-
<reporting>
359-
<excludeDefaults>true</excludeDefaults>
360-
</reporting>
361-
362-
<!-- ##################################################################################################### -->
363-
364284
<dependencies>
365285

366286
<dependency>
@@ -441,7 +361,7 @@
441361

442362
<dependency>
443363
<groupId>com.google.gwt</groupId>
444-
<artifactId>gwt-codeserver</artifactId>
364+
<artifactId>gwt-dev</artifactId>
445365
<version>${gwt.version}</version>
446366
<scope>provided</scope>
447367
</dependency>

src/assembly.xml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
3+
4+
<id>distribution</id>
5+
6+
<formats>
7+
<format>zip</format>
8+
</formats>
9+
10+
<includeBaseDirectory>true</includeBaseDirectory>
11+
12+
<fileSets>
13+
<fileSet>
14+
<outputDirectory>./</outputDirectory>
15+
<includes>
16+
<include>README.md</include>
17+
<include>LICENSE.txt</include>
18+
<include>pom.xml</include>
19+
<include>*screenshot*.png</include>
20+
</includes>
21+
</fileSet>
22+
<fileSet>
23+
<directory>src</directory>
24+
<outputDirectory>./src</outputDirectory>
25+
</fileSet>
26+
<fileSet>
27+
<directory>target</directory>
28+
<outputDirectory>./</outputDirectory>
29+
<includes>
30+
<include>*.war</include>
31+
</includes>
32+
</fileSet>
33+
<fileSet>
34+
<directory>target/hibernate3/sql/</directory>
35+
<outputDirectory>./sql</outputDirectory>
36+
<includes>
37+
<include>*.sql</include>
38+
</includes>
39+
</fileSet>
40+
</fileSets>
41+
42+
</assembly>

src/dist/README.txt

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)