@@ -73,10 +73,10 @@ public class SCoveragePreCompileMojo
73
73
/**
74
74
* Scala version used for compiler plugin artifact resolution.
75
75
* <ul>
76
- * <li>if specified, and starts with {@code 2.10.} - <b>{@code scalac-scoverage-plugin_2.10}</b> will be used</li>
77
- * <li>if specified, and starts with {@code 2.11.} - <b>{@code scalac-scoverage-plugin_2.11}</b> will be used</li>
78
- * <li>if specified, and starts with {@code 2.12.} - <b>{@code scalac-scoverage-plugin_2.12}</b> will be used</li>
79
- * <li>if specified, but does not start with {@code 2.10.}, {@code 2.11.} or {@code 2.12.} or is not specified - plugin execution will be skipped</li>
76
+ * <li>if specified, and equals {@code 2.10} or starts with {@code 2.10.} - <b>{@code scalac-scoverage-plugin_2.10}</b> will be used</li>
77
+ * <li>if specified, and equals {@code 2.11} or starts with {@code 2.11.} - <b>{@code scalac-scoverage-plugin_2.11}</b> will be used</li>
78
+ * <li>if specified, and equals {@code 2.12} or starts with {@code 2.12.} - <b>{@code scalac-scoverage-plugin_2.12}</b> will be used</li>
79
+ * <li>if specified, but does not meet any of the above conditions or if not specified - plugin execution will be skipped</li>
80
80
* </ul>
81
81
*
82
82
* @since 1.0.0
@@ -211,21 +211,21 @@ public void execute() throws MojoExecutionException
211
211
212
212
long ts = System .currentTimeMillis ();
213
213
214
- String scalaMainVersion = null ;
214
+ String scalaBinaryVersion = null ;
215
215
String resolvedScalaVersion = resolveScalaVersion ();
216
216
if ( resolvedScalaVersion != null )
217
217
{
218
- if ( resolvedScalaVersion .startsWith ( "2.10." ) )
218
+ if ( "2.10" . equals ( resolvedScalaVersion ) || resolvedScalaVersion .startsWith ( "2.10." ) )
219
219
{
220
- scalaMainVersion = "2.10" ;
220
+ scalaBinaryVersion = "2.10" ;
221
221
}
222
- else if ( resolvedScalaVersion .startsWith ( "2.11." ) )
222
+ else if ( "2.11" . equals ( resolvedScalaVersion ) || resolvedScalaVersion .startsWith ( "2.11." ) )
223
223
{
224
- scalaMainVersion = "2.11" ;
224
+ scalaBinaryVersion = "2.11" ;
225
225
}
226
- else if ( resolvedScalaVersion .startsWith ( "2.12." ) )
226
+ else if ( "2.12" . equals ( resolvedScalaVersion ) || resolvedScalaVersion .startsWith ( "2.12." ) )
227
227
{
228
- scalaMainVersion = "2.12" ;
228
+ scalaBinaryVersion = "2.12" ;
229
229
}
230
230
else
231
231
{
@@ -244,8 +244,8 @@ else if ( resolvedScalaVersion.startsWith( "2.12." ) )
244
244
245
245
try
246
246
{
247
- Artifact pluginArtifact = getScalaScoveragePluginArtifact ( scalaMainVersion );
248
- Artifact runtimeArtifact = getScalaScoverageRuntimeArtifact ( scalaMainVersion );
247
+ Artifact pluginArtifact = getScalaScoveragePluginArtifact ( scalaBinaryVersion );
248
+ Artifact runtimeArtifact = getScalaScoverageRuntimeArtifact ( scalaBinaryVersion );
249
249
250
250
if ( pluginArtifact == null )
251
251
{
0 commit comments