@@ -29,7 +29,7 @@ void addSimpleRepo() {
2929 rewriteRun (
3030 spec -> spec .recipe (new AddRepository ("myRepo" , "http://myrepo.maven.com/repo" , null , null ,
3131 null , null , null ,
32- null , null , null )),
32+ null , null , null , null )),
3333 pomXml (
3434 """
3535 <project>
@@ -55,12 +55,43 @@ void addSimpleRepo() {
5555 );
5656 }
5757
58+ @ Test
59+ void addSimplePluginRepo () {
60+ rewriteRun (
61+ spec -> spec .recipe (new AddRepository ("myRepo" , "http://myrepo.maven.com/repo" , null , null ,
62+ null , null , null ,
63+ null , null , null , AddRepository .Type .PluginRepository )),
64+ pomXml (
65+ """
66+ <project>
67+ <groupId>com.mycompany.app</groupId>
68+ <artifactId>my-app</artifactId>
69+ <version>1</version>
70+ </project>
71+ """ ,
72+ """
73+ <project>
74+ <groupId>com.mycompany.app</groupId>
75+ <artifactId>my-app</artifactId>
76+ <version>1</version>
77+ <pluginRepositories>
78+ <pluginRepository>
79+ <id>myRepo</id>
80+ <url>http://myrepo.maven.com/repo</url>
81+ </pluginRepository>
82+ </pluginRepositories>
83+ </project>
84+ """
85+ )
86+ );
87+ }
88+
5889 @ Test
5990 void updateExistingRepo () {
6091 rewriteRun (
6192 spec -> spec .recipe (new AddRepository ("myRepo" , "http://myrepo.maven.com/repo" , "bb" , null ,
6293 null , null , null ,
63- null , null , null )),
94+ null , null , null , null )),
6495 pomXml (
6596 """
6697 <project>
@@ -99,7 +130,7 @@ void doNotRemoveRepoName() {
99130 rewriteRun (
100131 spec -> spec .recipe (new AddRepository ("myRepo" , "http://myrepo.maven.com/repo" , null , null ,
101132 null , null , null ,
102- null , null , null )),
133+ null , null , null , null )),
103134 pomXml (
104135 """
105136 <project>
@@ -124,7 +155,7 @@ void removeSnapshots() {
124155 rewriteRun (
125156 spec -> spec .recipe (new AddRepository ("myRepo" , "http://myrepo.maven.com/repo" , null , null ,
126157 null , null , null ,
127- null , null , null )),
158+ null , null , null , null )),
128159 pomXml (
129160 """
130161 <project>
@@ -164,7 +195,7 @@ void updateSnapshots1() {
164195 rewriteRun (
165196 spec -> spec .recipe (new AddRepository ("myRepo" , "http://myrepo.maven.com/repo" , null , null ,
166197 false , "whatever" , null ,
167- null , null , null )),
198+ null , null , null , null )),
168199 pomXml (
169200 """
170201 <project>
@@ -208,7 +239,7 @@ void updateSnapshots2() {
208239 rewriteRun (
209240 spec -> spec .recipe (new AddRepository ("myRepo" , "http://myrepo.maven.com/repo" , null , null ,
210241 null , "whatever" , null ,
211- null , null , null )),
242+ null , null , null , null )),
212243 pomXml (
213244 """
214245 <project>
@@ -251,7 +282,7 @@ void noIdMatch1SameSnapshots() {
251282 rewriteRun (
252283 spec -> spec .recipe (new AddRepository ("myRepo" , "http://myrepo.maven.com/repo" , null , null ,
253284 true , null , null ,
254- null , null , null )),
285+ null , null , null , null )),
255286 pomXml (
256287 """
257288 <project>
@@ -280,7 +311,7 @@ void updateToSpringBoot30Snapshot() {
280311 spec -> spec .recipes (
281312 new AddRepository ("boot-snapshots" , "https://repo.spring.io/snapshot" , null , null ,
282313 true , null , null ,
283- null , null , null ),
314+ null , null , null , null ),
284315 new UpgradeParentVersion ("org.springframework.boot" , "spring-boot-starter-parent" , "3.0.0-SNAPSHOT" , null )
285316 ),
286317 pomXml (
0 commit comments