Fix POMs, build vanilla .wars instead of Spring Boot ones

This commit is contained in:
2020-11-17 21:47:14 +01:00
parent 3ef7613e33
commit 13de307d94
5 changed files with 71 additions and 8 deletions

View File

@@ -7,7 +7,7 @@
<parent> <parent>
<artifactId>financer-parent</artifactId> <artifactId>financer-parent</artifactId>
<groupId>de.77zzcx7.financer</groupId> <groupId>de.77zzcx7.financer</groupId>
<version>38-SNAPSHOT<</version> <version>38-SNAPSHOT</version>
</parent> </parent>
<artifactId>financer-common</artifactId> <artifactId>financer-common</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>de.77zzcx7.financer</groupId> <groupId>de.77zzcx7.financer</groupId>
<artifactId>financer-parent</artifactId> <artifactId>financer-parent</artifactId>
<version>38-SNAPSHOT<</version> <version>38-SNAPSHOT</version>
</parent> </parent>
<artifactId>financer-server</artifactId> <artifactId>financer-server</artifactId>
@@ -141,7 +141,35 @@
<activeProfiles>postgres,${deploymentProfile}</activeProfiles> <activeProfiles>postgres,${deploymentProfile}</activeProfiles>
</properties> </properties>
<build> <build>
<finalName>${project.artifactId}-${deploymentProfile}##${parallelDeploymentVersion}</finalName> <plugins>
<!--
Skip this as we do not need an executable .war file as we are running it in a standalone Tomcat
-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!--
Instead, package it as regular .war file but with a classifier so we can have multiple artifacts
of the same version matching the deployment profiles (77zzcx7 Nexus does not allow redeploy of
releases for example)
-->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<classifier>${deploymentProfile}</classifier>
<archive>
<manifest>
<mainClass>${start-class}</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@@ -39,8 +39,8 @@ public class AccountStatisticService {
final List<AccountStatistic> resultList = new ArrayList<>(); final List<AccountStatistic> resultList = new ArrayList<>();
long amount = transaction.getAmount(); long amount = transaction.getAmount();
// Special case: START bookings should not increase 'spendings current period' // Special case: expense neutral bookings should not increase 'spendings current period'
if (AccountType.START.equals(fromAccount.getType())) { if (transaction.isExpenseNeutral()) {
amount = 0; amount = 0;
} }
@@ -56,8 +56,13 @@ public class AccountStatisticService {
public void revertStatistics(Transaction transaction) { public void revertStatistics(Transaction transaction) {
final Account fromAccount = transaction.getFromAccount(); final Account fromAccount = transaction.getFromAccount();
final Account toAccount = transaction.getToAccount(); final Account toAccount = transaction.getToAccount();
final long amount = transaction.getAmount();
final List<AccountStatistic> resultList = new ArrayList<>(); final List<AccountStatistic> resultList = new ArrayList<>();
long amount = transaction.getAmount();
// Special case: expense neutral bookings should not decrease 'spendings current period'
if (transaction.isExpenseNeutral()) {
amount = 0;
}
for (final Period period : transaction.getPeriods()) { for (final Period period : transaction.getPeriods()) {
resultList.add(calculateInternal(fromAccount, period, amount, true, -1)); resultList.add(calculateInternal(fromAccount, period, amount, true, -1));

View File

@@ -7,7 +7,7 @@
<parent> <parent>
<groupId>de.77zzcx7.financer</groupId> <groupId>de.77zzcx7.financer</groupId>
<artifactId>financer-parent</artifactId> <artifactId>financer-parent</artifactId>
<version>38-SNAPSHOT<</version> <version>38-SNAPSHOT</version>
</parent> </parent>
<artifactId>financer-web-client</artifactId> <artifactId>financer-web-client</artifactId>
@@ -99,7 +99,34 @@
<finalName>financer</finalName> <finalName>financer</finalName>
</properties> </properties>
<build> <build>
<finalName>${finalName}-${deploymentProfile}##${parallelDeploymentVersion}</finalName> <plugins>
<!--
Skip this as we do not need an executable .war file as we are running it in a standalone Tomcat
-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!--
Instead, package it as regular .war file but with a classifier so we can have multiple artifacts
of the same version matching the deployment profiles (77zzcx7 Nexus does not allow redeploy of
releases for example)
-->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<classifier>${deploymentProfile}</classifier>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build> </build>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@@ -1,3 +1,6 @@
v37 -> v38:
- Non-functional build changes
v36 -> v37: v36 -> v37:
- START bookings are now expense neutral, so they do not increase the 'Expenses current period' counter - START bookings are now expense neutral, so they do not increase the 'Expenses current period' counter
- START bookings now do not increase 'Spendings current period' as this distorts this counter - START bookings now do not increase 'Spendings current period' as this distorts this counter