Open tkruse opened 9 years ago
Ah, also, is there a way to suppress the junit test output? I tried LEIN_SILENT, but that is not honored for junit, apparently.
Actually, unless I add the tests to the java-source path:
:java-source-paths ["src/main/java" "src/test/java"]
the tests are not run.
It also does not configure IntelliJ properly for running JUnit tests within the IDE. I have to manually mark directory test/java
as "Test Sources Root". However, refreshing the IntelliJ project resets this. I have similar problems with it finding my log4j2.xml configuration file.
Dirigiste just ran into this issue, too. We can't simultaneously run junit tests without adding them to :java-source-paths
, but doing that tries to add the test classes to the jar file (and fails in our case, because junit is a test-only dep, and so it can't compile the test classes)
Ran into this issue. Addressed it by putting :java-source-paths ["test/java"]
into the :dev
profile. It gets merged with whatever :java-source-paths
are provided for the project.
@galdre That worked, thx!
Hi,
I am new to leiningen, and I am evalutating it for pure Java projects (for fun). I am used to separate project files in a tree like this:
Then I would like to:
Now I would like to do that with leiningen, my code so far:
I miss
:java-test-paths
(not sure whether that is:junit
), and:test-resource-paths
I do not know how to get leiningen to both test and create a Jar file, nor how to prevent it from compiling again. Finally that way both the .java and the .class files end up in my jar. Do I need to use profiles more, or do you have another suggestion?
I know not all of this relates to the junit plugin, feel free to ignore any aspect that I should ask elsewhere.
In case you care to reproduce, you could use my repo with these steps (on Linux):
then check build/leiningen/target/example.jar