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

Cleanups #22

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void flushExecutionMap()
}

@Override
public Map getExecutionsAsMap()
public Map<String, PluginExecution> getExecutionsAsMap()
{
throw new UnsupportedOperationException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void flushReportSetMap()
}

@Override
public Map getReportSetsAsMap()
public Map<String, ReportSet> getReportSetsAsMap()
{
throw new UnsupportedOperationException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void flushReportPluginMap()
}

@Override
public Map getReportPluginsAsMap()
public Map<String, ReportPlugin> getReportPluginsAsMap()
{
throw new UnsupportedOperationException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ public void testReleasePerformWithIncompletePrepare()
}

// MRELEASE-758: release:perform no longer removes release.properties
@SuppressWarnings( "unchecked" )
public void testPerformWithDefaultClean()
throws Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.anyString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import java.util.Iterator;
import java.util.List;

import org.apache.maven.Maven;
import org.apache.maven.project.MavenProject;
import org.apache.maven.scm.ScmFile;
import org.apache.maven.scm.ScmFileSet;
Expand Down Expand Up @@ -198,7 +197,7 @@ protected List<MavenProject> prepareReactorProjects( String path )

when( scmProviderMock.add( isA( ScmRepository.class ),
argThat( new IsScmFileSetEquals( fileSet ) ) ) ).thenReturn( new AddScmResult( "...",
Collections.singletonList( new ScmFile( Maven.POMv4, ScmFileStatus.ADDED ) ) ) );
Collections.singletonList( new ScmFile( "pom.xml", ScmFileStatus.ADDED ) ) ) );

ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.class );
stub.setScmProvider( scmProviderMock );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import java.util.Iterator;
import java.util.List;

import org.apache.maven.Maven;
import org.apache.maven.project.MavenProject;
import org.apache.maven.scm.ScmFile;
import org.apache.maven.scm.ScmFileSet;
Expand Down Expand Up @@ -86,7 +85,7 @@ public void testExecuteBasicPom()
ScmProvider scmProviderMock = mock( ScmProvider.class );
when( scmProviderMock.remove( isA( ScmRepository.class ), argThat( new IsScmFileSetEquals( fileSet ) ),
isA( String.class ) ) ).thenReturn( new RemoveScmResult( "...",
Collections.singletonList( new ScmFile( Maven.POMv4,
Collections.singletonList( new ScmFile( "pom.xml",
ScmFileStatus.DELETED ) ) ) );

ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.class );
Expand Down Expand Up @@ -123,7 +122,7 @@ public void testExecutePomWithModules()
ScmProvider scmProviderMock = mock( ScmProvider.class );
when( scmProviderMock.remove( isA( ScmRepository.class ), argThat( new IsScmFileSetEquals( fileSet ) ),
isA( String.class ) ) ).thenReturn( new RemoveScmResult( "...",
Collections.singletonList( new ScmFile( Maven.POMv4,
Collections.singletonList( new ScmFile( "pom.xml",
ScmFileStatus.DELETED ) ) ) );

ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.class );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;

import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;

import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.Os;
import org.junit.Test;

Expand Down Expand Up @@ -224,27 +222,4 @@ public void testGetWindowsRootBaseWorkingDirectoryParentCountDifferentCase()

}

private static MavenProject createProject( String basedir )
{
return createProject( basedir, basedir );
}

private static MavenProject createProject( final String basedirPath, final String basedirCanonicalPath )
{
return new MavenProject()
{
@Override
public File getBasedir()
{
return new File( basedirPath )
{
@Override
public String getCanonicalPath()
{
return basedirCanonicalPath;
}
};
}
};
}
}