mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-05-19 17:15:24 +00:00
prevent NPE, which occured when the AMP finalName was not complying with ${artifactId}-${version} structure
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@426 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
parent
824f744f84
commit
cccc2201e0
@ -161,7 +161,10 @@ public class AmpUnArchiver extends AbstractZipUnArchiver {
|
|||||||
|
|
||||||
String ampName = zipFile.getName();
|
String ampName = zipFile.getName();
|
||||||
ampName = FileUtils.removeExtension(FileUtils.removePath(ampName));
|
ampName = FileUtils.removeExtension(FileUtils.removePath(ampName));
|
||||||
ampName = ampName.substring(0, ampName.lastIndexOf('-'));
|
int ampNameIndex = ampName.lastIndexOf('-');
|
||||||
|
if (ampNameIndex > 0) {
|
||||||
|
ampName = ampName.substring(0, ampNameIndex);
|
||||||
|
}
|
||||||
|
|
||||||
ampMapping.put("module.properties", "WEB-INF"+ fileSeparator +"classes" + fileSeparator +"alfresco" + fileSeparator +"module" + fileSeparator + moduleId + fileSeparator);
|
ampMapping.put("module.properties", "WEB-INF"+ fileSeparator +"classes" + fileSeparator +"alfresco" + fileSeparator +"module" + fileSeparator + moduleId + fileSeparator);
|
||||||
ampMapping.put("config", "WEB-INF"+fileSeparator+"classes"+ fileSeparator);
|
ampMapping.put("config", "WEB-INF"+fileSeparator+"classes"+ fileSeparator);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user