diff --git a/maven-plugin/src/main/java/hudson/maven/AbstractMavenProject.java b/maven-plugin/src/main/java/hudson/maven/AbstractMavenProject.java
index 46cdd32403e97bccca560866a52d21ba62142696..362d9562401fcfd17a1cbdc2b01dea5522243cf3 100644
--- a/maven-plugin/src/main/java/hudson/maven/AbstractMavenProject.java
+++ b/maven-plugin/src/main/java/hudson/maven/AbstractMavenProject.java
@@ -142,7 +142,8 @@ public abstract class AbstractMavenProject
,R exte
* @return
* True if any upstream projects are building or in queue, false otherwise.
*/
- private boolean areUpstreamsBuilding(AbstractProject,?> downstreamProject,
+ @SuppressWarnings("rawtypes")
+ private boolean areUpstreamsBuilding(AbstractProject,?> downstreamProject,
AbstractProject,?> excludeProject) {
DependencyGraph graph = Jenkins.getInstance().getDependencyGraph();
Set tups = graph.getTransitiveUpstream(downstreamProject);
diff --git a/maven-plugin/src/main/java/hudson/maven/Maven2Builder.java b/maven-plugin/src/main/java/hudson/maven/Maven2Builder.java
index 700d873bcdada4be666973000d4941889d7ed015..5c20a79f18acf309e46e0542f15502d2171ded24 100644
--- a/maven-plugin/src/main/java/hudson/maven/Maven2Builder.java
+++ b/maven-plugin/src/main/java/hudson/maven/Maven2Builder.java
@@ -51,6 +51,7 @@ import org.apache.maven.project.MavenProject;
* This is only used for
* {@link MavenModuleSet#isAggregatorStyleBuild() the aggregator style build}.
*/
+@SuppressWarnings("deprecation") // as we're restricted to Maven 2.x API here, but compile against Maven 3.x, we cannot avoid deprecations
final class Maven2Builder extends MavenBuilder {
private final Map proxies;
private final Map> reporters = new HashMap>();
diff --git a/maven-plugin/src/main/java/hudson/maven/MavenBuilder.java b/maven-plugin/src/main/java/hudson/maven/MavenBuilder.java
index 561b229a4a80999cbcf3522565a79d921d3ca6de..7cef424c746e2e0deb7aabfdf5b91cd08b64e6c8 100644
--- a/maven-plugin/src/main/java/hudson/maven/MavenBuilder.java
+++ b/maven-plugin/src/main/java/hudson/maven/MavenBuilder.java
@@ -69,6 +69,7 @@ import org.codehaus.plexus.configuration.PlexusConfiguration;
* @author Kohsuke Kawaguchi
* @since 1.133
*/
+@SuppressWarnings("deprecation") // as we're restricted to Maven 2.x API here, but compile against Maven 3.x we cannot avoid deprecations
public abstract class MavenBuilder extends AbstractMavenBuilder implements DelegatingCallable {
diff --git a/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java b/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
index 3114d7725548e9d01fb204c4e14927c9d63a0586..1d4134d183a76c589685d1f90dd3239e6c81ba8f 100644
--- a/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
+++ b/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
@@ -472,7 +472,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild builds : getModuleBuilds().values())
for (MavenBuild b : builds)
@@ -619,7 +619,6 @@ public class MavenModuleSetBuild extends AbstractMavenBuild build, Launcher launcher,
BuildListener listener) throws InterruptedException, IOException {
SurefireReport report = build.getAction(SurefireReport.class);
diff --git a/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java b/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java
index d76b89fde8dec4e2c6bb81ab433762739e8459a1..312cbb058f706115dcb0f80df9a20b656deedb2a 100644
--- a/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java
+++ b/maven-plugin/src/main/java/hudson/maven/RedeployPublisher.java
@@ -223,7 +223,6 @@ public class RedeployPublisher extends Recorder {
+ " but cannot find the config" );
} else {
listener.getLogger().println( "redeploy publisher using settings config with name " + config.name );
- String settingsContent = config.content;
if (config.content != null ) {
remoteSettingsFromConfig = SettingsProviderUtils.copyConfigContentToFilePath( config, build.getWorkspace() );
altSettingsPath = remoteSettingsFromConfig.getRemote();
@@ -386,7 +385,7 @@ public class RedeployPublisher extends Recorder {
//---------------------------------------------
-
+ @SuppressWarnings("deprecation") // as we're restricted to Maven 2.x API here, but compile against Maven 3.x we cannot avoid deprecations
public static class WrappedArtifactRepository implements ArtifactRepository {
private ArtifactRepository artifactRepository;
private boolean uniqueVersion;
diff --git a/maven-plugin/src/main/java/hudson/maven/reporters/MavenAbstractArtifactRecord.java b/maven-plugin/src/main/java/hudson/maven/reporters/MavenAbstractArtifactRecord.java
index 6c76041534f5c8cae120d50fc1c45024e35f0b33..482fc70c483d04692f73d66daed8395e0306d196 100644
--- a/maven-plugin/src/main/java/hudson/maven/reporters/MavenAbstractArtifactRecord.java
+++ b/maven-plugin/src/main/java/hudson/maven/reporters/MavenAbstractArtifactRecord.java
@@ -105,7 +105,7 @@ public abstract class MavenAbstractArtifactRecord>
/**
* Returns the log of this deployment record.
*/
- public AnnotatedLargeText getLog() {
+ public AnnotatedLargeText getLog() {
return new AnnotatedLargeText(new File(getBuild().getRootDir(),fileName), Charset.defaultCharset(), true, this);
}
@@ -218,12 +218,12 @@ public abstract class MavenAbstractArtifactRecord>
final Record record = new Record(repositoryUrl, logFile.getName());
records.add(record);
- new TaskThread(this,ListenerAndText.forFile(logFile)) {
+ new TaskThread(this,ListenerAndText.forFile(logFile,this)) {
protected void perform(TaskListener listener) throws Exception {
try {
MavenEmbedder embedder = MavenUtil.createEmbedder(listener,getBuild());
ArtifactRepositoryLayout layout =
- (ArtifactRepositoryLayout) embedder.lookup( ArtifactRepositoryLayout.class,"default");
+ embedder.lookup( ArtifactRepositoryLayout.class,"default");
ArtifactRepositoryFactory factory =
(ArtifactRepositoryFactory) embedder.lookup(ArtifactRepositoryFactory.ROLE);
diff --git a/maven-plugin/src/test/java/hudson/maven/MavenModuleTest.java b/maven-plugin/src/test/java/hudson/maven/MavenModuleTest.java
index d26bc3122686f5740f6d5a8fca2a7fe04d1bf9db..e9fcaf0976614392e6a0ac587f2b8dd072b7e3f2 100644
--- a/maven-plugin/src/test/java/hudson/maven/MavenModuleTest.java
+++ b/maven-plugin/src/test/java/hudson/maven/MavenModuleTest.java
@@ -32,8 +32,6 @@ import com.google.common.collect.Lists;
@PrepareForTest( { MavenModuleSet.class, DescriptorImpl.class, AbstractProject.class})
public class MavenModuleTest {
- private MavenModuleSet parent;
-
private MavenModule module;
private MavenProject project;
@@ -73,6 +71,7 @@ public class MavenModuleTest {
Lists.>newArrayList(this.module, pluginModule));
graph.build();
+ @SuppressWarnings("rawtypes")
List downstream = graph.getDownstream(pluginModule);
Assert.assertEquals(1, downstream.size());
Assert.assertSame(this.module, downstream.get(0));