Skip to content

Commit

Permalink
Merge ed99954 into 81d6336
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcin committed Aug 31, 2020
2 parents 81d6336 + ed99954 commit 3229d13
Show file tree
Hide file tree
Showing 8 changed files with 444 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,11 @@ static String getResourceId(final String rawUrl) {
return lastIdPart;
}

private static final List<String> EXTENSIONS = Arrays.asList(".config", ".properties", ".cfg", ".cfg.json");
private static final List<String> EXTENSIONS = Arrays.asList(".config", ".properties");
// the actual JCR Install supports the cfg and cfg.json formats
//private static final List<String> EXTENSIONS = Arrays.asList(".config", ".properties", ".cfg", ".cfg.json");

private static String removeConfigExtension(final String id) {
static String removeConfigExtension(final String id) {
for (final String ext : EXTENSIONS) {
if (id.endsWith(ext)) {
return id.substring(0, id.length() - ext.length());
Expand All @@ -267,7 +269,7 @@ private static String removeConfigExtension(final String id) {
return id;
}

private static boolean isConfigExtension(String url) {
static boolean isConfigExtension(String url) {
for (final String ext : EXTENSIONS) {
if (url.endsWith(ext)) {
return true;
Expand Down

Large diffs are not rendered by default.

Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<workspaceFilter version="1.0">
<filter root="/apps/with-embedded/install"/>
</workspaceFilter>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<'sling'='http://sling.apache.org/jcr/sling/1.0'>

[sling:Folder] > nt:folder
- * (undefined)
- * (undefined) multiple
+ * (nt:base) = sling:Folder version

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>FileVault Package Properties</comment>
<entry key="createdBy">admin</entry>
<entry key="name">simple-content</entry>
<entry key="lastModified">2012-04-24T10:17:21.641+05:30</entry>
<entry key="lastModifiedBy">admin</entry>
<entry key="created">2012-04-24T10:17:21.969+05:30</entry>
<entry key="buildCount">1</entry>
<entry key="version">1.0</entry>
<entry key="dependencies"/>
<entry key="packageFormatVersion">2</entry>
<entry key="group">my_packages</entry>
<entry key="lastWrapped">2012-04-24T10:17:21.641+05:30</entry>
<entry key="description"/>
<entry key="lastWrappedBy">admin</entry>
</properties>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.zip
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,19 @@ public static File getCaliperPackage() {

public static File prepareTestPackageFromFolder(final @NotNull String filename,
final @NotNull File srcFolder) throws IOException {
return prepareTestPackageFromFolder(filename, srcFolder, Collections.emptyMap());
}

public static File prepareTestPackageFromFolder(final @NotNull String filename,
final @NotNull File srcFolder,
final @NotNull Map<String, File> additionalEntries) throws IOException {
final File absFile = srcFolder.getAbsoluteFile();
if (!absFile.isDirectory()) {
throw new IOException("expected directory in srcFolder parameter for test package filename "
+ filename + ", srcFolder exists " + srcFolder);
}
File file = new File(testPackagesRoot.toFile(), filename);
buildJarFromDir(absFile, file.getAbsoluteFile(), Collections.emptyMap());
buildJarFromDir(absFile, file.getAbsoluteFile(), additionalEntries);

return file;
}
Expand Down

0 comments on commit 3229d13

Please sign in to comment.