Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down