@@ -182,17 +182,20 @@ public ModuleIteration prepareVersion(ModuleIteration module, Phase phase) {
182182 if (BOM .equals (module .getProject ())) {
183183
184184 mvn .execute (project , goals .and (arg ("newVersion" ).withValue (information .getReleaseTrainVersion ())) //
185- .and (arg ("generateBackupPoms" ).withValue ("false" )));
185+ .and (arg ("generateBackupPoms" ).withValue ("false" )) //
186+ .andIf (module .isCommercial (), profile ("spring-enterprise" )));
186187
187188 mvn .execute (project , goals .and (arg ("newVersion" ).withValue (information .getReleaseTrainVersion ())) //
188189 .and (arg ("generateBackupPoms" ).withValue ("false" )) //
189190 .and (arg ("processAllModules" ).withValue ("true" )) //
190- .and (Argument .of ("-pl" ).withValue ("bom" )));
191+ .and (Argument .of ("-pl" ).withValue ("bom" )) //
192+ .andIf (module .isCommercial (), profile ("spring-enterprise" )));
191193
192194 } else {
193195 mvn .execute (project ,
194196 goals .and (arg ("newVersion" ).withValue (information .getProjectVersionToSet (project .getProject ())))
195- .and (arg ("generateBackupPoms" ).withValue ("false" )));
197+ .and (arg ("generateBackupPoms" ).withValue ("false" )) //
198+ .andIf (module .isCommercial (), profile ("spring-enterprise" )));
196199 }
197200
198201 if (BUILD .equals (module .getProject ())) {
@@ -201,10 +204,11 @@ public ModuleIteration prepareVersion(ModuleIteration module, Phase phase) {
201204 mvn .execute (project , goals .and (arg ("newVersion" ).withValue (information .getReleaseTrainVersion ())) //
202205 .and (arg ("generateBackupPoms" ).withValue ("false" )) //
203206 .and (arg ("groupId" ).withValue ("org.springframework.data" )) //
204- .and (arg ("artifactId" ).withValue ("spring-data-releasetrain" )));
207+ .and (arg ("artifactId" ).withValue ("spring-data-releasetrain" )) //
208+ .andIf (module .isCommercial (), profile ("spring-enterprise" )));
205209 }
206210
207- mvn .execute (project , CommandLine .of (Goal .INSTALL ));
211+ mvn .execute (project , CommandLine .of (Goal .INSTALL ). andIf ( module . isCommercial (), profile ( "spring-enterprise" )) );
208212 }
209213
210214 return module ;
@@ -277,8 +281,9 @@ public void close(Train train, StagingRepository stagingRepository) {
277281 @ Override
278282 public <M extends ProjectAware > M triggerBuild (M module ) {
279283
284+ Argument profile = module .isCommercial () ? profile ("ci,release,spring-enterprise" ) : profile ("ci,release" );
280285 CommandLine arguments = CommandLine .of (Goal .CLEAN , Goal .INSTALL , //
281- profile ( "ci,release" ) , //
286+ profile , //
282287 arg ("gpg.executable" ).withValue (gpg .getExecutable ()), //
283288 arg ("gpg.keyname" ).withValue (gpg .getKeyname ()), //
284289 arg ("gpg.passphrase" ).withValue (gpg .getPassphrase ()))//
0 commit comments