|
24 | 24 | import java.util.Map;
|
25 | 25 | import java.util.Set;
|
26 | 26 |
|
27 |
| -import org.apache.maven.artifact.Artifact; |
28 |
| -import org.apache.maven.artifact.versioning.ArtifactVersion; |
29 |
| -import org.apache.maven.artifact.versioning.VersionRange; |
30 | 27 | import org.apache.maven.doxia.sink.Sink;
|
31 | 28 | import org.apache.maven.doxia.siterenderer.Renderer;
|
32 | 29 | import org.apache.maven.execution.MavenSession;
|
|
38 | 35 | import org.apache.maven.reporting.MavenReportException;
|
39 | 36 | import org.apache.maven.repository.RepositorySystem;
|
40 | 37 | import org.apache.maven.wagon.Wagon;
|
41 |
| -import org.codehaus.mojo.versions.api.ArtifactVersions; |
42 | 38 | import org.codehaus.mojo.versions.api.DefaultVersionsHelper;
|
43 |
| -import org.codehaus.mojo.versions.api.VersionRetrievalException; |
44 | 39 | import org.codehaus.mojo.versions.api.VersionsHelper;
|
45 | 40 | import org.codehaus.mojo.versions.model.RuleSet;
|
46 | 41 | import org.codehaus.mojo.versions.reporting.ReportRendererFactory;
|
@@ -243,35 +238,6 @@ protected void executeReport( Locale locale )
|
243 | 238 | protected abstract void doGenerateReport( Locale locale, Sink sink )
|
244 | 239 | throws MavenReportException, MojoExecutionException;
|
245 | 240 |
|
246 |
| - /** |
247 |
| - * Finds the latest version of the specified artifact that matches the version range. |
248 |
| - * |
249 |
| - * @param artifact The artifact. |
250 |
| - * @param versionRange The version range. |
251 |
| - * @param allowingSnapshots <code>null</code> for no override, otherwise the local override to apply. |
252 |
| - * @param usePluginRepositories Use plugin repositories |
253 |
| - * @return The latest version of the specified artifact that matches the specified version range or |
254 |
| - * <code>null</code> if no matching version could be found. |
255 |
| - * @throws MavenReportException If the artifact metadata could not be found. |
256 |
| - * @since 1.0-alpha-1 |
257 |
| - */ |
258 |
| - protected ArtifactVersion findLatestVersion( Artifact artifact, VersionRange versionRange, |
259 |
| - Boolean allowingSnapshots, boolean usePluginRepositories ) |
260 |
| - throws MavenReportException |
261 |
| - { |
262 |
| - boolean includeSnapshots = allowingSnapshots != null ? allowingSnapshots : this.allowSnapshots; |
263 |
| - try |
264 |
| - { |
265 |
| - final ArtifactVersions artifactVersions = |
266 |
| - getHelper().lookupArtifactVersions( artifact, usePluginRepositories ); |
267 |
| - return artifactVersions.getNewestVersion( versionRange, includeSnapshots ); |
268 |
| - } |
269 |
| - catch ( VersionRetrievalException e ) |
270 |
| - { |
271 |
| - throw new MavenReportException( e.getMessage(), e ); |
272 |
| - } |
273 |
| - } |
274 |
| - |
275 | 241 | @Override
|
276 | 242 | protected MavenProject getProject()
|
277 | 243 | {
|
|
0 commit comments