Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala library doesn't get picked if it's in test scope #22

Open
slandelle opened this issue Jul 25, 2018 · 3 comments
Open

Scala library doesn't get picked if it's in test scope #22

slandelle opened this issue Jul 25, 2018 · 3 comments

Comments

@slandelle
Copy link

slandelle commented Jul 25, 2018

Hello,

I have a project (Gatling based) that only contains test sources, hence only test dependencies (that pull scala-library transitively).

I then get the following crash:

java.lang.RuntimeException: Missing library, see: defineAuto, regexScalaLibrary.
at com.carrotgarden.maven.scalor.util.Error$Throw$.apply (Error.scala:34)
at com.carrotgarden.maven.scalor.base.ParamsCompiler.$anonfun$defineFindLibrary$1 (Params.scala:253)
at scala.Option.getOrElse (Option.scala:121)
at com.carrotgarden.maven.scalor.base.ParamsCompiler.defineFindLibrary (Params.scala:253)
at com.carrotgarden.maven.scalor.base.ParamsCompiler.defineFindLibrary$ (Params.scala:251)
at com.carrotgarden.maven.scalor.CompileMainMojo.defineFindLibrary (CompileMojo.scala:113)

Things work if I change the scope of the library to compile, but it's not right.
I'd like to advertise this plugin to Gatling users, but this one is a blocker for me.

@slandelle
Copy link
Author

@Andrei-Pozolotin gentle ping

@slandelle
Copy link
Author

The problem is that resolveCustomInstall triggers at compile phase, but MavenProject#getArtifacts is lazily populated and only contains test artifacts at test phase.

Maybe compile phase should be bypassed upstream if there's nothing to compile (src/main doesn't contain any *.scala files).

WDYT?

@Andrei-Pozolotin
Copy link
Contributor

ok, thinking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants