How to skip tests compilation for project?

56 views
Skip to first unread message

Nick

unread,
Nov 13, 2017, 11:19:47 PM11/13/17
to jBPM Usage
I want to include my test cases in working repository. It has some calls of JBPMHelper methods, such as startH2Server and setupDataSource. JBPMHelper is a part of org.jbpm.jbpm-test package which I am compelled to include to project's dependencies list. When I deploy a project whith tests and this package included, it causes the next error: org.hibernate.HibernateException: Unable to determine appropriate DataSource to use.
Our wildfly setup uses Oracle db whereas JBPMHelper tries to connect to h2, so I tried to add h2 connection and It compiled successfully, but execution server didn't work properly(it gave 404 error on rest queries for starting process, etc).
I also tried to add <maven.test.skip>true</maven.test.skip> property to pom file (deploying without org.jbpm.jbpm-test), but it didn't help.
It would be ideal for us to have a tests in repository, but to not load testing dependencies for production deployment. Is there any solution? (sorry, I'm newby in Jbpm and Java developing)

Maciej Swiderski

unread,
Nov 14, 2017, 2:40:09 AM11/14/17
to Nick, jBPM Usage
try making this dependency scope test which should then ignore it by kie server

Maciej
--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/c239b500-7b8d-4993-99d4-71de6f67bc59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nick

unread,
Nov 14, 2017, 4:10:41 AM11/14/17
to jBPM Usage
Thank you for response, Maciej.

I've just tried to add test scope to dependency. It worked and packages was not added, but files from /src/test/java still being compiled and jbpm-console gives an error "JBPMHelper cannot be resolved" when i try to deploy.

вторник, 14 ноября 2017 г., 15:40:09 UTC+8 пользователь Maciej Swiderski написал:

Maciej Swiderski

unread,
Nov 14, 2017, 6:01:21 AM11/14/17
to Nick, jBPM Usage
that’s currently a limitation that is being worked on - to provide full maven based build system in workbench. For now the only approach would be to move tests to another project/maven project

Maciej
Reply all
Reply to author
Forward
0 new messages