1919package pl .project13 .maven .git ;
2020
2121import java .nio .file .Files ;
22-
2322import junitparams .JUnitParamsRunner ;
2423import junitparams .Parameters ;
2524import org .apache .maven .project .MavenProject ;
@@ -34,7 +33,8 @@ public class GitSubmodulesTest extends GitIntegrationTest {
3433
3534 @ Test
3635 @ Parameters (method = "useNativeGit" )
37- public void shouldResolvePropertiesOnDefaultSettingsForNonPomProject (boolean useNativeGit ) throws Exception {
36+ public void shouldResolvePropertiesOnDefaultSettingsForNonPomProject (
37+ boolean useNativeGit ) throws Exception {
3838 mavenSandbox
3939 .withParentProject ("my-jar-project" , "jar" )
4040 .withGitRepoInParent (AvailableGitTestRepo .WITH_SUBMODULES )
@@ -57,18 +57,19 @@ public void shouldResolvePropertiesOnDefaultSettingsForNonPomProject(boolean use
5757 public void shouldGeneratePropertiesWithSubmodules (boolean useNativeGit ) throws Exception {
5858 // given
5959 mavenSandbox
60- .withParentProject ("my-pom-project" , "pom" )
61- .withGitRepoInParent (AvailableGitTestRepo .WITH_REMOTE_SUBMODULES )
62- .withChildProject ("remote-module" , "jar" )
63- .create ();
60+ .withParentProject ("my-pom-project" , "pom" )
61+ .withGitRepoInParent (AvailableGitTestRepo .WITH_REMOTE_SUBMODULES )
62+ .withChildProject ("remote-module" , "jar" )
63+ .create ();
6464 MavenProject targetProject = mavenSandbox .getChildProject ();
6565 setProjectToExecuteMojoIn (targetProject );
6666
67- // create a relative pointer to trigger the relative path logic in GitDirLocator#lookupGitDirectory
67+ // create a relative pointer to trigger the relative path logic in
68+ // GitDirLocator#lookupGitDirectory
6869 // makes the dotGitDirectory look like "my-pom-project/.git/modules/remote-module"
6970 Files .write (
70- mavenSandbox .getChildProject ().getBasedir ().toPath ().resolve (".git" ),
71- "gitdir: ../.git/modules/remote-module" .getBytes ()
71+ mavenSandbox .getChildProject ().getBasedir ().toPath ().resolve (".git" ),
72+ "gitdir: ../.git/modules/remote-module" .getBytes ()
7273 );
7374
7475 mojo .useNativeGit = useNativeGit ;
@@ -77,6 +78,7 @@ public void shouldGeneratePropertiesWithSubmodules(boolean useNativeGit) throws
7778 mojo .execute ();
7879
7980 // then
80- assertPropertyPresentAndEqual (targetProject .getProperties (), "git.commit.id.abbrev" , "945bfe6" );
81+ assertPropertyPresentAndEqual (
82+ targetProject .getProperties (), "git.commit.id.abbrev" , "945bfe6" );
8183 }
8284}
0 commit comments