IDEADEV-41034: Artifact: manifest.mf name recognition is case-sensitive

This commit is contained in:
nik
2009-11-03 16:06:31 +03:00
parent 509ef6fc50
commit a9570ce0e7
4 changed files with 18 additions and 4 deletions
@@ -142,7 +142,17 @@ public class PackagingElementFactoryImpl extends PackagingElementFactory {
@Override
public void addFileCopy(@NotNull CompositePackagingElement<?> root, @NotNull String outputDirectoryPath, @NotNull String sourceFilePath) {
getOrCreateDirectory(root, outputDirectoryPath).addOrFindChild(new FileCopyPackagingElement(sourceFilePath));
addFileCopy(root, outputDirectoryPath, sourceFilePath, null);
}
@Override
public void addFileCopy(@NotNull CompositePackagingElement<?> root, @NotNull String outputDirectoryPath, @NotNull String sourceFilePath,
@Nullable String outputFileName) {
final String fileName = PathUtil.getFileName(sourceFilePath);
if (outputFileName != null && outputFileName.equals(fileName)) {
outputFileName = null;
}
getOrCreateDirectory(root, outputDirectoryPath).addOrFindChild(new FileCopyPackagingElement(sourceFilePath, outputFileName));
}
@NotNull
@@ -147,7 +147,7 @@
<grid row="0" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Manifest.mf file not found"/>
<text value="META-INF/MANIFEST.MF file not found"/>
</properties>
</component>
</children>
@@ -170,7 +170,7 @@ public abstract class ElementWithManifestPropertiesPanel<E extends CompositeElem
private void addManifestFile(final String path) {
myContext.editLayout(myContext.getArtifact(), new Runnable() {
public void run() {
PackagingElementFactory.getInstance().addFileCopy(myElement, ManifestFileUtil.MANIFEST_DIR_NAME, path);
PackagingElementFactory.getInstance().addFileCopy(myElement, ManifestFileUtil.MANIFEST_DIR_NAME, path, ManifestFileUtil.MANIFEST_FILE_NAME);
}
});
}
@@ -77,16 +77,20 @@ public abstract class PackagingElementFactory {
@NotNull
public abstract CompositePackagingElement<?> getOrCreateArchive(@NotNull CompositePackagingElement<?> parent, @NotNull String relativePath);
public abstract void addFileCopy(@NotNull CompositePackagingElement<?> root, @NotNull String outputDirectoryPath, @NotNull String sourceFilePath,
final String outputFileName);
public abstract void addFileCopy(@NotNull CompositePackagingElement<?> root, @NotNull String outputDirectoryPath, @NotNull String sourceFilePath);
@NotNull
public abstract PackagingElement<?> createParentDirectories(@NotNull String relativeOutputPath, @NotNull PackagingElement<?> element);
@NotNull
public abstract List<? extends PackagingElement<?>> createParentDirectories(@NotNull String relativeOutputPath, @NotNull List<? extends PackagingElement<?>> elements);
@NotNull
public abstract CompositePackagingElementType<?>[] getCompositeElementTypes();
@Nullable