@@ -187,8 +187,8 @@ public abstract class BaseCycloneDxMojo extends AbstractMojo {
187
187
* @since 2.6.0
188
188
*/
189
189
@ SuppressWarnings ("CanBeFinal" )
190
- @ Parameter (property = "cyclonedx.verbose" , defaultValue = "true " , required = false )
191
- private boolean verbose = true ;
190
+ @ Parameter (property = "cyclonedx.verbose" , defaultValue = "false " , required = false )
191
+ private boolean verbose = false ;
192
192
193
193
@ org .apache .maven .plugins .annotations .Component
194
194
private MavenProjectHelper mavenProjectHelper ;
@@ -204,10 +204,10 @@ public abstract class BaseCycloneDxMojo extends AbstractMojo {
204
204
*/
205
205
protected static final String MESSAGE_RESOLVING_DEPS = "CycloneDX: Resolving Dependencies" ;
206
206
protected static final String MESSAGE_RESOLVING_AGGREGATED_DEPS = "CycloneDX: Resolving Aggregated Dependencies" ;
207
- protected static final String MESSAGE_CREATING_BOM = "CycloneDX: Creating BOM" ;
207
+ protected static final String MESSAGE_CREATING_BOM = "CycloneDX: Creating BOM version %s with %d component(s) " ;
208
208
static final String MESSAGE_CALCULATING_HASHES = "CycloneDX: Calculating Hashes" ;
209
- protected static final String MESSAGE_WRITING_BOM = "CycloneDX: Writing BOM (%s): %s" ;
210
- protected static final String MESSAGE_VALIDATING_BOM = "CycloneDX: Validating BOM (%s): %s" ;
209
+ protected static final String MESSAGE_WRITING_BOM = "CycloneDX: Writing and validating BOM (%s): %s" ;
210
+ protected static final String MESSAGE_ATTACHING_BOM = " attaching as %s-%s-cyclonedx. %s" ;
211
211
protected static final String MESSAGE_VALIDATION_FAILURE = "The BOM does not conform to the CycloneDX BOM standard as defined by the XSD" ;
212
212
213
213
/**
@@ -266,7 +266,7 @@ public void execute() throws MojoExecutionException {
266
266
267
267
private void generateBom (String analysis , Metadata metadata , Set <Component > components , Set <Dependency > dependencies ) throws MojoExecutionException {
268
268
try {
269
- getLog ().info (MESSAGE_CREATING_BOM );
269
+ getLog ().info (String . format ( MESSAGE_CREATING_BOM , schemaVersion , components . size ()) );
270
270
final Bom bom = new Bom ();
271
271
bom .setComponents (new ArrayList <>(components ));
272
272
@@ -323,12 +323,12 @@ private void saveBomToFile(String bomString, String extension, Parser bomParser)
323
323
getLog ().info (String .format (MESSAGE_WRITING_BOM , extension .toUpperCase (), bomFile .getAbsolutePath ()));
324
324
FileUtils .write (bomFile , bomString , StandardCharsets .UTF_8 , false );
325
325
326
- getLog ().info (String .format (MESSAGE_VALIDATING_BOM , extension .toUpperCase (), bomFile .getAbsolutePath ()));
327
326
if (!bomParser .isValid (bomFile , schemaVersion ())) {
328
327
throw new MojoExecutionException (MESSAGE_VALIDATION_FAILURE );
329
328
}
330
329
331
330
if (!skipAttach ) {
331
+ getLog ().info (String .format (MESSAGE_ATTACHING_BOM , project .getArtifactId (), project .getVersion (), extension ));
332
332
mavenProjectHelper .attachArtifact (project , extension , "cyclonedx" , bomFile );
333
333
}
334
334
}
0 commit comments