@@ -339,6 +339,7 @@ private void addFileWithDependency(ContentPackage contentPackage, String path,
339339
340340 // open original content package
341341 try (ZipFile zipFileIn = new ZipFile (pkg .getFile ())) {
342+ String dependenciesString = null ;
342343
343344 // iterate through entries and write them to the temp. zip file
344345 try (FileOutputStream fos = new FileOutputStream (tempFile );
@@ -356,7 +357,7 @@ private void addFileWithDependency(ContentPackage contentPackage, String path,
356357 props .loadFromXML (is );
357358 addSuffixToPackageName (props , pkg , environmentRunMode );
358359 if (autoDependenciesMode != AutoDependenciesMode .OFF ) {
359- updateDependencies (props , previousPkg , environmentRunMode , allPackagesFromFileSets );
360+ dependenciesString = updateDependencies (props , previousPkg , environmentRunMode , allPackagesFromFileSets );
360361 }
361362 props .storeToXML (zipOut , null );
362363 }
@@ -370,6 +371,11 @@ private void addFileWithDependency(ContentPackage contentPackage, String path,
370371 zipOut .closeEntry ();
371372 }
372373 }
374+
375+ if (log .isDebugEnabled ()) {
376+ log .debug ("Adding package " + getCanonicalPath (pkg .getFile ())
377+ + (dependenciesString != null ? " with dependencies: " + dependenciesString : "" ));
378+ }
373379 }
374380
375381 // add temp zip file to "all" content package
@@ -387,7 +393,7 @@ private void addFileWithDependency(ContentPackage contentPackage, String path,
387393 * @param allPackagesFromFileSets Set with all packages from all file sets as dependency instances
388394 * @throws IOException I/O exception
389395 */
390- private static void updateDependencies (Properties props , ContentPackageFile dependencyFile , String environmentRunMode ,
396+ private static String updateDependencies (Properties props , ContentPackageFile dependencyFile , String environmentRunMode ,
391397 Set <Dependency > allPackagesFromFileSets ) throws IOException {
392398 String [] existingDepsStrings = StringUtils .split (props .getProperty (NAME_DEPENDENCIES ), "," );
393399 Dependency [] existingDeps = null ;
@@ -429,7 +435,12 @@ private static void updateDependencies(Properties props, ContentPackageFile depe
429435 }
430436
431437 if (deps != null ) {
432- props .put (NAME_DEPENDENCIES , Dependency .toString (deps ));
438+ String dependenciesString = Dependency .toString (deps );
439+ props .put (NAME_DEPENDENCIES , dependenciesString );
440+ return dependenciesString ;
441+ }
442+ else {
443+ return null ;
433444 }
434445 }
435446
0 commit comments