Work
This commit is contained in:
Nicolas Héron 2025-02-21 09:20:13 +01:00
commit e4b31838f4
12 changed files with 149 additions and 136 deletions

View file

@ -12,19 +12,37 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<id>compile</id>
<goals>
<goal>jar</goal>
<goal>compile</goal> <!-- You can skip the <goals> element
if you enable extensions for the plugin -->
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/main/java</sourceDir>
</sourceDirs>
</configuration>
</execution>
<execution>
<id>test-compile</id>
<goals>
<goal>test-compile</goal> <!-- You can skip the <goals> element
if you enable extensions for the plugin -->
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/test/java</sourceDir>
</sourceDirs>
</configuration>
</execution>
</executions>
<configuration>
<detectJavaApiLink>false</detectJavaApiLink>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -34,6 +52,30 @@
<source>${pymma.java.version}</source>
<target>${pymma.java.version}</target>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
<execution>
<id>java-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>java-test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View file

@ -17,10 +17,10 @@ package org.chtijbug.drools.runtime;
import junit.framework.Assert;
import org.apache.commons.io.IOUtils;
import org.chtijbug.drools.common.date.DateHelper;
import org.chtijbug.drools.entity.DroolsFactObject;
import org.chtijbug.drools.runtime.pojotest.User;
import org.chtijbug.drools.runtime.pojotest.UserName;
import org.chtijbug.drools.common.date.DateHelper;
import org.junit.Test;
import java.io.InputStream;
@ -43,7 +43,7 @@ public class JSONdroolsObjecttest {
User user = new User();
user.setUserId("1");
user.setUserName(userName);
user.setDob(DateHelper.getDate("2013-12-31"));
user.setDob(DateHelper.Companion.getDate("2013-12-31"));
DroolsFactObject droolsFactObject = new DroolsFactObject(user, 1);
InputStream stream = JSONdroolsObjecttest.class.getResourceAsStream("/user.json");
String toto = IOUtils.toString(stream, "utf-8");