From 4c6ffe1f7593c892eb04e67891c0845f1642e5e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Sat, 25 Mar 2023 20:23:32 +0100 Subject: [PATCH] Document IntelliJ known issues --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index abb6c249..c318c26b 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,32 @@ cli-java is a collection of commandline messaging clients suitable for interacti ## Getting started -When using IntelliJ IDEA Ultimate Edition, select "Open" (not "Import Project") option to open project and delete OSGi facets in File >> Project Structure >> Project Settings >> Facets. - mvn clean package # compile without executing external tests (tests that require broker) java -jar cli-qpid-jms/target/cli-qpid-jms-*.jar sender -b amqp://127.0.0.1:5672 -a myQ --log-msgs dict +### IntelliJ notes + +[Open an existing Maven project](https://www.jetbrains.com/help/idea/maven-support.html#maven_import_project_start). + +#### Common issues + +* OSGi problems (don't remember what those actually were) + +When using IntelliJ IDEA Ultimate Edition, select "Open" (not "Import Project") option to open project and delete OSGi facets in File >> Project Structure >> Project Settings >> Facets. + +* `Unresolved reference: DaggerFakeClient`, or anything else with `Dagger` in it + +The class is generated by the [Dagger](https://github.com/google/dagger) annotation processor. +Run `mvn compile` on the command line so that Maven generates what is needed. + +The IDE action on the Maven tab to generate sources does not actually generate what is needed for Kotlin tests, because of a [missing feature](https://youtrack.jetbrains.com/issue/KT-15040). + +* `Error: Unable to access jarfile [...]/target/cli-qpid-jms-1.2.2-SNAPSHOT-2.2.0.jar` + +IntelliJ is happy to run [failsafe](https://maven.apache.org/surefire/maven-failsafe-plugin/) tests without doing the (equivalent of) `mvn package` first. +This means that the jars used in the `*ITCase` tests may be nonexistent (or out of date). +Run `mvn package -DskipTests` yourself to fix this. + ### Run tests mvn test -Ptests