Hi Joe San,
Unfortunately the project graphchi does not support scala-12, the scala
supported are scala-11 and scala-10 [1].
In the case of wayang to support different version of scala we create the
structure of folder:
module
| - code <- shared code between different versions of scala implementation.
\ | - main
\ \ | scala
| - module_{version-scala} <- module with specific code related to the
platform
\ | - scala_{version-scala} <- empty file that activate the profile in the
pom.xml to compile the code with the right version
\ | - src
\ \ | - main
\ \ \ | scala
You can see this structure on the module wayang-spark [2], the idea is to
use the profile scala-11 [3] and scala-12 [4] depending on the activation
file the profile will generate the module using one or another scala
version.
Nevertheless, in the case of graphchi, we just use the normal structure
because Graphchi has just one version at least until the last time that we
check it.
Apache Wayang has some tests in scala at api module [5], the api module
follows the structure commented upper.
The structure is a little bit complex at the first moment but then get easy
to follow, if you need help with it just let me know :D
Best regards,
Bertty
[1] https://mvnrepository.com/artifact/org.graphchi/graphchi-java
[2]
https://github.com/apache/incubator-wayang/tree/main/wayang-platforms/wayang-spark
[3] https://github.com/apache/incubator-wayang/blob/main/pom.xml#L493-L599
[4] https://github.com/apache/incubator-wayang/blob/main/pom.xml#L601-L707
[5]
https://github.com/apache/incubator-wayang/blob/main/wayang-api/wayang-api-scala-java/code/test/scala/org/apache/wayang/api/ApiTest.scala
On Mon, Jan 17, 2022 at 5:43 PM Joe San <[email protected]> wrote:
> Anyone had any success writing Scalatest and making the test run when using
> the scala profile? I just added Scalatest as a dependency to one of the sub
> project (wayang-graphchi) and added some quick tests. I then configured the
> parent pom against the scala-12 profile, the scalatest-maven-plugin, but
> somehow my scalatests are not detected. I just wanted to ask you guys if
> this was tried before?
>
> I raised a question in Stackoverfow (without referring to Wayang) as it
> seems like an issue:
>
>
> https://stackoverflow.com/questions/70729253/scalatest-maven-plugin-does-not-detect-scala-test-suite
>
> If anyone has any idea, please let me know.
>