Closed GuntherRademacher closed 1 year ago
…so this explains why we didn’t use JUnit methods in the Sandbox class (I didn’t remember). Good to know. It’s just consistent to move this class to the test directory, as there’s no need for it in the productive code. The easy way looks fine to me. Thanks!
The mvn build failed, after recent changes of
Sandbox.java
:A reference to junit had been added to Sandbox.java, but junit is not in scope when
src/main/java
is compiled.The changes in this PR make the build work again by moving
Sandbox.java
tosrc/test/java
and modifiespom.xml
such that an additional test jar is created, which is then added as a dependency tobasex-api
andbasex-tests
.This solution is tagged "the easy way" in Maven documentation. The new test jar however has the same manifest as the primary jar:
Main-Class: org.basex.BaseXGUI
. This does not make sense, though it probably does not bother either. According to Maven documentation, "the preferred way" would be to put base classes for tests into a separate project.