Skip to content

Commit acf916e

Browse files
Add test case to cover the logic of computing runtime classpath (#602)
Signed-off-by: Jinbo Wang <[email protected]>
1 parent 896243c commit acf916e

File tree

16 files changed

+1019
-0
lines changed

16 files changed

+1019
-0
lines changed

TestPlan.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,3 +539,8 @@ Exception in thread "main" java.lang.IllegalStateException
539539
6. Open VS Code menu `Help -> Open Process Explorer`, find the Java Debuggger process in the `Process Explorer`. And its command line string should contain `--enable-preview` flag.
540540
541541
![image](https://user-images.githubusercontent.com/14052197/56105328-40d12380-5f6e-11e9-94bc-8f3f3d298750.png)
542+
543+
## Auto resolve classpath for maven projects
544+
1. Open `resolveClasspath` project in VS Code and wait for Java extensions are activated.
545+
2. Open `kie-client/src/main/java/client/EmbedMain.java` file, and click `Run` or `Debug` CodeLens to launch the application. Check DEBUG CONSOLE view to verify it is launched successfully.
546+
3. Open `insurance-decision/src/test/java/testscenario/Launch.java` file, and click `Run` or `Debug` CodeLens to launch the application. Check whether the message `Main Class in Test Folder!` is printed in DEBUG CONSOLE view.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/target
2+
/local
3+
**/project.repositories
4+
5+
# Eclipse, Netbeans and IntelliJ files
6+
**/.*
7+
!.gitignore
8+
!.gitattributes
9+
**/nbproject
10+
**/*.ipr
11+
**/*.iws
12+
**/*.iml
13+
14+
# Repository wide ignore mac DS_Store files
15+
.DS_Store
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.demo</groupId>
5+
<artifactId>InsuranceDecision</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
<packaging>kjar</packaging>
8+
<name>InsuranceDecision</name>
9+
<description></description>
10+
<properties>
11+
<ba.version>7.3.1.GA-redhat-00002</ba.version>
12+
</properties>
13+
<dependencyManagement>
14+
<dependencies>
15+
<dependency>
16+
<groupId>com.redhat.ba</groupId>
17+
<artifactId>ba-platform-bom</artifactId>
18+
<version>${ba.version}</version>
19+
<scope>import</scope>
20+
<type>pom</type>
21+
</dependency>
22+
</dependencies>
23+
</dependencyManagement>
24+
<dependencies>
25+
<dependency>
26+
<groupId>org.kie</groupId>
27+
<artifactId>kie-internal</artifactId>
28+
<scope>provided</scope>
29+
</dependency>
30+
<dependency>
31+
<groupId>org.kie</groupId>
32+
<artifactId>kie-api</artifactId>
33+
<scope>provided</scope>
34+
</dependency>
35+
<!-- test -->
36+
<dependency>
37+
<groupId>com.thoughtworks.xstream</groupId>
38+
<artifactId>xstream</artifactId>
39+
<scope>test</scope>
40+
</dependency>
41+
<dependency>
42+
<groupId>junit</groupId>
43+
<artifactId>junit</artifactId>
44+
<scope>test</scope>
45+
</dependency>
46+
<dependency>
47+
<groupId>org.drools</groupId>
48+
<artifactId>drools-wb-scenario-simulation-editor-api</artifactId>
49+
<scope>test</scope>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.drools</groupId>
53+
<artifactId>drools-wb-scenario-simulation-editor-backend</artifactId>
54+
<scope>test</scope>
55+
</dependency>
56+
<dependency>
57+
<groupId>org.drools</groupId>
58+
<artifactId>drools-compiler</artifactId>
59+
<scope>test</scope>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.kie</groupId>
63+
<artifactId>kie-dmn-feel</artifactId>
64+
<scope>test</scope>
65+
</dependency>
66+
<dependency>
67+
<groupId>org.kie</groupId>
68+
<artifactId>kie-dmn-api</artifactId>
69+
<scope>test</scope>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.kie</groupId>
73+
<artifactId>kie-dmn-core</artifactId>
74+
<scope>test</scope>
75+
</dependency>
76+
</dependencies>
77+
<build>
78+
<plugins>
79+
<plugin>
80+
<groupId>org.kie</groupId>
81+
<artifactId>kie-maven-plugin</artifactId>
82+
<version>7.18.0.Final-redhat-00004</version>
83+
<extensions>true</extensions>
84+
</plugin>
85+
</plugins>
86+
</build>
87+
<repositories>
88+
<repository>
89+
<id>jboss-ga-repository</id>
90+
<url>https://maven.repository.redhat.com/ga/</url>
91+
<releases>
92+
<enabled>true</enabled>
93+
</releases>
94+
<snapshots>
95+
<enabled>false</enabled>
96+
</snapshots>
97+
</repository>
98+
</repositories>
99+
<pluginRepositories>
100+
<pluginRepository>
101+
<id>jboss-ga-plugin-repository</id>
102+
<url>https://maven.repository.redhat.com/ga/</url>
103+
<releases>
104+
<enabled>true</enabled>
105+
</releases>
106+
<snapshots>
107+
<enabled>false</enabled>
108+
</snapshots>
109+
</pluginRepository>
110+
</pluginRepositories>
111+
</project>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<deployment-descriptor xsi:schemaLocation="http://www.jboss.org/jbpm deployment-descriptor.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
<persistence-unit>org.jbpm.domain</persistence-unit>
4+
<audit-persistence-unit>org.jbpm.domain</audit-persistence-unit>
5+
<audit-mode>JPA</audit-mode>
6+
<persistence-mode>JPA</persistence-mode>
7+
<runtime-strategy>SINGLETON</runtime-strategy>
8+
<marshalling-strategies/>
9+
<event-listeners/>
10+
<task-event-listeners/>
11+
<globals/>
12+
<work-item-handlers/>
13+
<environment-entries/>
14+
<configurations/>
15+
<required-roles/>
16+
<remoteable-classes/>
17+
<limit-serialization-classes>true</limit-serialization-classes>
18+
</deployment-descriptor>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<kmodule xmlns="http://www.drools.org/xsd/kmodule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
3+
<persistence-unit name="com.demo:InsuranceDecision:1.0.0" transaction-type="JTA">
4+
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
5+
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
6+
<exclude-unlisted-classes>true</exclude-unlisted-classes>
7+
<properties>
8+
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
9+
<property name="hibernate.max_fetch_depth" value="3"/>
10+
<property name="hibernate.hbm2ddl.auto" value="update"/>
11+
<property name="hibernate.show_sql" value="false"/>
12+
<property name="hibernate.id.new_generator_mappings" value="false"/>
13+
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform"/>
14+
</properties>
15+
</persistence-unit>
16+
</persistence>

0 commit comments

Comments
 (0)