mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 09:03:31 +07:00
fixed copying resource if pattern starts with '/' and test added
This commit is contained in:
@@ -142,6 +142,9 @@ public class IdeaProjectLoader {
|
||||
if (pattern.indexOf('/') == -1) {
|
||||
return "**/" + pattern
|
||||
}
|
||||
if (pattern.startsWith("/")) {
|
||||
return pattern.substring(1)
|
||||
}
|
||||
return pattern
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="DEFAULT_COMPILER" value="Javac" />
|
||||
<resourceExtensions>
|
||||
<entry name=".+\.(properties|xml|html|dtd|tld)" />
|
||||
<entry name=".+\.(gif|png|jpeg|jpg)" />
|
||||
</resourceExtensions>
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="/copy/*" />
|
||||
<entry name="*.html" />
|
||||
<entry name="?.txt" />
|
||||
<entry name="copyTree/**/*.txt" />
|
||||
</wildcardResourcePatterns>
|
||||
<annotationProcessing enabled="false" useClasspath="true" />
|
||||
</component>
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/resourceCopying.iml" filepath="$PROJECT_DIR$/resourceCopying.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.jetbrains.jps
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
class ResourceCopyingTest extends JpsBuildTestCase {
|
||||
public void testOverwriteArtifacts() throws Exception {
|
||||
doTest("testData/resourceCopying/resourceCopying.ipr", {}, {
|
||||
dir("production") {
|
||||
dir("resourceCopying") {
|
||||
dir("copy") {
|
||||
file("file.txt")
|
||||
}
|
||||
dir("copyTree") {
|
||||
dir("subdir") {
|
||||
file("abc.txt")
|
||||
}
|
||||
file("xyz.txt")
|
||||
}
|
||||
file("a.txt")
|
||||
file("index.html")
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user