Skip to content

Commit c9683a3

Browse files
Merge branch 'master' into WDT-267-Server-Migratable-Target-Attribute-fixes
2 parents 6f85c12 + 006d854 commit c9683a3

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

core/src/main/java/oracle/weblogic/deploy/util/WLSDeployZipFile.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -775,14 +775,6 @@ private void saveChangesToZip(Map<String, ZipEntry> updatedZipEntries, Map<Strin
775775
private File getNewOutputFile() throws WLSDeployArchiveIOException {
776776
final String METHOD = "getNewOutputFile";
777777

778-
String fileName = getFileName();
779-
if (fileName.contains(File.separator)) {
780-
int lastSeparator = fileName.lastIndexOf(File.separator);
781-
if (lastSeparator > 0)
782-
fileName = fileName.substring(lastSeparator+1);
783-
}
784-
785-
String[] nameComponents = FileUtils.parseFileName(fileName);
786778

787779
File directory = getFile().getParentFile();
788780
File newOutputFile;
@@ -791,7 +783,18 @@ private File getNewOutputFile() throws WLSDeployArchiveIOException {
791783
newOutputFile = getFile();
792784
LOGGER.finest("WLSDPLY-01523", newOutputFile.getAbsolutePath());
793785
} else {
794-
newOutputFile = File.createTempFile(nameComponents[0], DOT + nameComponents[1], directory);
786+
// Is there a real case the the archive file with no extension ?
787+
String fileName = getFileName();
788+
if (fileName.contains(File.separator)) {
789+
int lastSeparator = fileName.lastIndexOf(File.separator);
790+
if (lastSeparator > 0)
791+
fileName = fileName.substring(lastSeparator+1);
792+
}
793+
String[] nameComponents = FileUtils.parseFileName(fileName);
794+
795+
// prefix shouldn't matter what we put here, but it has to be at least 3 characters
796+
797+
newOutputFile = File.createTempFile("wdt_temparchive", DOT + nameComponents[1], directory);
795798
LOGGER.finest("WLSDPLY-01524", newOutputFile.getAbsolutePath());
796799
}
797800
LOGGER.finer("WLSDPLY-01525", getFileName(), newOutputFile.getAbsolutePath());

core/src/main/python/wlsdeploy/tool/discover/deployments_discoverer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def add_application_plan_to_archive(self, application_name, application_dict):
270270
app_source_name = application_dict[model_constants.SOURCE_PATH]
271271
plan_path = application_dict[model_constants.PLAN_PATH]
272272
if plan_path:
273-
_logger.info('WLSDPLY-06389', application_name, plan_path, class_name=_class_name,
273+
_logger.info('WLSDPLY-06402', application_name, plan_path, class_name=_class_name,
274274
method_name=_method_name)
275275
plan_dir = None
276276
if model_constants.PLAN_DIR in application_dict:

core/src/main/resources/oracle/weblogic/deploy/messages/wlsdeploy_rb.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,7 @@ WLSDPLY-06399=Application {0} plan deployment has new source path location {1} w
552552
archive file deployment location
553553
WLSDPLY-06400=Skipping {0} application {1}
554554
WLSDPLY-06401=Skipping {0} shared library {1}
555+
WLSDPLY-06402=Add application {0} deployment plan {1} to archive file
555556

556557
# domain_info_discoverer.py
557558
WLSDPLY-06420=Add the java archive files from the domain library {0} to the archive file

0 commit comments

Comments
 (0)