You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2017/04/18 12:15:07 UTC
[01/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - - Renamed the classifier of the adt
artifact from "-windows" to "-win"
Repository: flex-utilities
Updated Branches:
refs/heads/feature/flash-downloader 0b6dfdd69 -> d0cef4237
- Renamed the classifier of the adt artifact from "-windows" to "-win"
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/fa9a4fe9
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/fa9a4fe9
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/fa9a4fe9
Branch: refs/heads/feature/flash-downloader
Commit: fa9a4fe9341cbeee772e24789dc1ff1235b1b3c3
Parents: 522eafb
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Oct 6 15:51:32 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Oct 6 15:51:44 2016 +0200
----------------------------------------------------------------------
.../java/org/apache/flex/utilities/converter/air/AirConverter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fa9a4fe9/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java b/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
index f1cb6a0..d00986f 100644
--- a/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
+++ b/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
@@ -126,7 +126,7 @@ public class AirConverter extends BaseConverter implements Converter {
if (windowsDir.exists() && windowsDir.isDirectory()) {
final File windowsZip = new File(rootTargetDirectory,
"com.adobe.air.compiler.adt.".replace(".", File.separator) + airSdkVersion +
- File.separator + "adt-" + airSdkVersion + "-windows.zip");
+ File.separator + "adt-" + airSdkVersion + "-win.zip");
generateCompilerPlatformArtifact(windowsDir, windowsZip);
}
[12/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - - Switched from System.out.println to
logback - Fixed a problem in the AirConverter,
not packaging all the required parts
Posted by cd...@apache.org.
- Switched from System.out.println to logback
- Fixed a problem in the AirConverter, not packaging all the required parts
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/9b38938c
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/9b38938c
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/9b38938c
Branch: refs/heads/feature/flash-downloader
Commit: 9b38938c03d454415258226ae10e7d3aa464493e
Parents: 30ef5fb
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Fri Feb 3 15:31:03 2017 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Fri Feb 3 15:31:26 2017 +0100
----------------------------------------------------------------------
.../utilities/converter/air/AirConverter.java | 40 ++++++++++++++++----
.../flex-sdk-converter/converters/base/pom.xml | 16 ++++++++
.../flex/utilities/converter/BaseConverter.java | 10 +++--
.../base/src/main/resources/logback.xml | 16 ++++++++
.../deployer/aether/AetherDeployer.java | 26 +++++++------
5 files changed, 86 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/9b38938c/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java b/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
index 46373c4..205daaa 100644
--- a/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
+++ b/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
@@ -20,6 +20,8 @@ import org.apache.flex.utilities.converter.BaseConverter;
import org.apache.flex.utilities.converter.Converter;
import org.apache.flex.utilities.converter.exceptions.ConverterException;
import org.apache.flex.utilities.converter.model.MavenArtifact;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.*;
import java.util.*;
@@ -31,6 +33,8 @@ import java.util.zip.ZipOutputStream;
*/
public class AirConverter extends BaseConverter implements Converter {
+ private static final Logger LOG = LoggerFactory.getLogger(AirConverter.class);
+
private String airSdkVersion;
/**
@@ -53,7 +57,7 @@ public class AirConverter extends BaseConverter implements Converter {
@Override
protected void processDirectory() throws ConverterException {
if ((airSdkVersion == null) || !rootSourceDirectory.exists() || !rootSourceDirectory.isDirectory()) {
- System.out.println("Skipping AIR SDK generation.");
+ LOG.info("Skipping AIR SDK generation.");
return;
}
@@ -94,13 +98,28 @@ public class AirConverter extends BaseConverter implements Converter {
compiler.addDependency(artifact);
}
+ // Generate the common package (files from the bin directory)
+ File binDir = new File(rootSourceDirectory, "bin");
+ if (binDir.exists() && binDir.isDirectory()) {
+ final File commonZip = new File(rootTargetDirectory,
+ "com.adobe.air.compiler.adt.".replace(".", File.separator) + airSdkVersion +
+ File.separator + "adt-" + airSdkVersion + "-common.zip");
+ generateZip(binDir, commonZip, new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ return "adt".equals(name) || "adt.bat".equals(name) ||
+ "adl".equals(name) || "adl.exe".equals(name);
+ }
+ });
+ }
+
// Generate the android package (android directory)
File androidDir = new File(directory, "android");
if (androidDir.exists() && androidDir.isDirectory()) {
final File androidZip = new File(rootTargetDirectory,
"com.adobe.air.compiler.adt.".replace(".", File.separator) + airSdkVersion +
File.separator + "adt-" + airSdkVersion + "-android.zip");
- generateCompilerPlatformArtifact(androidDir, androidZip);
+ generateZip(androidDir, androidZip);
}
// Generate the ios package (aot directory)
@@ -109,7 +128,7 @@ public class AirConverter extends BaseConverter implements Converter {
final File iosZip = new File(rootTargetDirectory,
"com.adobe.air.compiler.adt.".replace(".", File.separator) + airSdkVersion +
File.separator + "adt-" + airSdkVersion + "-ios.zip");
- generateCompilerPlatformArtifact(iosDir, iosZip);
+ generateZip(iosDir, iosZip);
}
// Generate the exe, dmg, deb, rpm packages (nai directory)
@@ -118,7 +137,7 @@ public class AirConverter extends BaseConverter implements Converter {
final File desktopZip = new File(rootTargetDirectory,
"com.adobe.air.compiler.adt.".replace(".", File.separator) + airSdkVersion +
File.separator + "adt-" + airSdkVersion + "-desktop.zip");
- generateCompilerPlatformArtifact(desktopDir, desktopZip);
+ generateZip(desktopDir, desktopZip);
}
// Generate the windows packages (win directory)
@@ -127,7 +146,7 @@ public class AirConverter extends BaseConverter implements Converter {
final File windowsZip = new File(rootTargetDirectory,
"com.adobe.air.compiler.adt.".replace(".", File.separator) + airSdkVersion +
File.separator + "adt-" + airSdkVersion + "-win.zip");
- generateCompilerPlatformArtifact(windowsDir, windowsZip);
+ generateZip(windowsDir, windowsZip);
}
// Write this artifact to file.
@@ -279,12 +298,17 @@ public class AirConverter extends BaseConverter implements Converter {
//
///////////////////////////////////////////////////////////////////////////////////////////////////
- private void generateCompilerPlatformArtifact(File inputDir, File outputFile) throws ConverterException {
+ private void generateZip(File inputDir, File outputFile) throws ConverterException {
+ generateZip(inputDir, outputFile, null);
+ }
+
+ private void generateZip(File inputDir, File outputFile, FilenameFilter filter)
+ throws ConverterException {
try {
// Add all the content to a zip-file.
final ZipOutputStream zipOutputStream = new ZipOutputStream(new FileOutputStream(outputFile));
// Package all the compiler parts.
- File[] zipfiles = inputDir.listFiles();
+ File[] zipfiles = (filter != null) ? inputDir.listFiles(filter) : inputDir.listFiles();
if(zipfiles != null) {
for (final File file : zipfiles) {
addFileToZip(zipOutputStream, file, rootSourceDirectory);
@@ -436,7 +460,7 @@ public class AirConverter extends BaseConverter implements Converter {
result = !(pathname.getName().endsWith(".swc") || pathname.getName().endsWith(".swf"));
}
- System.out.println(relativePath + " = " + result);
+ LOG.debug(relativePath + " = " + result);
return result;
}
}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/9b38938c/flex-maven-tools/flex-sdk-converter/converters/base/pom.xml
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/converters/base/pom.xml b/flex-maven-tools/flex-sdk-converter/converters/base/pom.xml
index 71d9a92..fcc4881 100644
--- a/flex-maven-tools/flex-sdk-converter/converters/base/pom.xml
+++ b/flex-maven-tools/flex-sdk-converter/converters/base/pom.xml
@@ -47,6 +47,22 @@
<artifactId>freemarker</artifactId>
<version>2.3.22</version>
</dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.21</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.1.7</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <version>1.1.7</version>
+ </dependency>
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/9b38938c/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java b/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
index d80cf8f..f74257e 100644
--- a/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
+++ b/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
@@ -26,6 +26,8 @@ import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import org.codehaus.jettison.json.JSONTokener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
@@ -50,6 +52,8 @@ import java.util.zip.ZipOutputStream;
*/
public abstract class BaseConverter {
+ private static final Logger LOG = LoggerFactory.getLogger(BaseConverter.class);
+
protected final Map<String, MavenArtifact> checksums = new HashMap<String, MavenArtifact>();
protected static final String MAVEN_CENTRAL_SHA_1_QUERY_URL = "http://search.maven.org/solrsearch/select?rows=20&wt=json&q=1:";
@@ -210,7 +214,7 @@ public abstract class BaseConverter {
return artifactMetadata;
} else {
- System.out.println("For jar-file with checksum: " + checksum +
+ LOG.warn("For jar-file with checksum: " + checksum +
" more than one result was returned by query: " +
MAVEN_CENTRAL_SHA_1_QUERY_URL + checksum);
}
@@ -319,7 +323,7 @@ public abstract class BaseConverter {
// Reusing artifact from other sdk version.
if(artifact != null) {
- System.out.println("Reusing artifact (" + checksum + ") : " + artifact.getGroupId() + ":" +
+ LOG.info("Reusing artifact (" + checksum + ") : " + artifact.getGroupId() + ":" +
artifact.getArtifactId() + ":" + artifact.getVersion());
return artifact;
}
@@ -330,7 +334,7 @@ public abstract class BaseConverter {
// The file was available on maven central, so use that version instead of the one coming with the sdk.
if(artifact != null) {
- System.out.println("Using artifact from Maven Central (" + checksum + ") : " +
+ LOG.info("Using artifact from Maven Central (" + checksum + ") : " +
artifact.getGroupId() + ":" + artifact.getArtifactId() + ":" + artifact.getVersion());
}
// The file was not available on maven central, so we have to add it manually.
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/9b38938c/flex-maven-tools/flex-sdk-converter/converters/base/src/main/resources/logback.xml
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/converters/base/src/main/resources/logback.xml b/flex-maven-tools/flex-sdk-converter/converters/base/src/main/resources/logback.xml
new file mode 100644
index 0000000..f58d967
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/converters/base/src/main/resources/logback.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <Pattern>
+ %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
+ </Pattern>
+ </layout>
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="STDOUT" />
+ </root>
+
+</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/9b38938c/flex-maven-tools/flex-sdk-converter/deployers/aether/src/main/java/org/apache/flex/utilities/converter/deployer/aether/AetherDeployer.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/deployers/aether/src/main/java/org/apache/flex/utilities/converter/deployer/aether/AetherDeployer.java b/flex-maven-tools/flex-sdk-converter/deployers/aether/src/main/java/org/apache/flex/utilities/converter/deployer/aether/AetherDeployer.java
index 89b991b..68b7cfc 100644
--- a/flex-maven-tools/flex-sdk-converter/deployers/aether/src/main/java/org/apache/flex/utilities/converter/deployer/aether/AetherDeployer.java
+++ b/flex-maven-tools/flex-sdk-converter/deployers/aether/src/main/java/org/apache/flex/utilities/converter/deployer/aether/AetherDeployer.java
@@ -45,6 +45,8 @@ import org.eclipse.aether.transport.file.FileTransporterFactory;
import org.eclipse.aether.transport.http.HttpTransporterFactory;
import org.eclipse.aether.transport.wagon.WagonTransporterFactory;
import org.eclipse.aether.util.repository.AuthenticationBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileReader;
@@ -62,6 +64,8 @@ import java.io.Reader;
*/
public class AetherDeployer {
+ private static final Logger LOG = LoggerFactory.getLogger(AetherDeployer.class);
+
private File directory;
private String url;
private String username;
@@ -94,13 +98,13 @@ public class AetherDeployer {
}
private static void printUsage() {
- System.out.println("\nUsage: java -cp flex-sdk-converter-1.0.jar SDKInVMDeployer \"directory\" \"url\" [\"username\", \"password\"]\n");
- System.out.println("The SDKDeployer needs at least 2 ordered parameters separated by spaces:");
- System.out.println("\t1- directory: The path to the directory containing the artifacts that should be deployed.");
- System.out.println("\t2- url: URL where the artifacts will be deployed.");
- System.out.println("If the targeted repository requires authentication two more parameters have to be provided:");
- System.out.println("\t3- username: The username used to authenticate on the target repository.");
- System.out.println("\t4- password: The password used to authenticate on the target repository.");
+ LOG.error("\nUsage: java -cp flex-sdk-converter-1.0.jar SDKInVMDeployer \"directory\" \"url\" [\"username\", \"password\"]\n" +
+ "The SDKDeployer needs at least 2 ordered parameters separated by spaces:\n" +
+ "\t1- directory: The path to the directory containing the artifacts that should be deployed.\b" +
+ "\t2- url: URL where the artifacts will be deployed.\n" +
+ "If the targeted repository requires authentication two more parameters have to be provided:\n" +
+ "\t3- username: The username used to authenticate on the target repository.\n" +
+ "\t4- password: The password used to authenticate on the target repository.");
}
public void deploy() {
@@ -120,7 +124,7 @@ public class AetherDeployer {
final RepositorySystem repositorySystem = locator.getService(RepositorySystem.class);
if (repositorySystem == null) {
- System.out.println("Couldn't initialize local maven repository system.");
+ LOG.error("Couldn't initialize local maven repository system.");
System.exit(0);
} else {
// Setup the repository system session based upon the current maven settings.xml.
@@ -141,7 +145,7 @@ public class AetherDeployer {
processDir(rootDir, repositorySystem, session, remoteRepository);
}
} catch (Throwable e) {
- e.printStackTrace();
+ LOG.error("Error deploying artifacts in directory: " + directory.getAbsolutePath(), e);
}
}
@@ -214,10 +218,10 @@ public class AetherDeployer {
}
// Actually install the artifact.
- System.out.println("Installing Artifact: " + pomArtifact.getGroupId() + ":" +
+ LOG.info("Installing Artifact: " + pomArtifact.getGroupId() + ":" +
pomArtifact.getArtifactId() + ":" + pomArtifact.getVersion());
for (final Artifact artifact : artifactInstallRequest.getArtifacts()) {
- System.out.println(" - File with extension " + artifact.getExtension() +
+ LOG.info(" - File with extension " + artifact.getExtension() +
((artifact.getClassifier().length() > 0) ? " and classifier " + artifact.getClassifier() : ""));
}
[08/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - Fixed SonarQube findings ...
Posted by cd...@apache.org.
Fixed SonarQube findings ...
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/2e676844
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/2e676844
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/2e676844
Branch: refs/heads/feature/flash-downloader
Commit: 2e6768445a730216aaafcfc8f46c57044dd2b3c1
Parents: 790b355
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sun Dec 18 15:28:47 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sun Dec 18 15:28:47 2016 +0100
----------------------------------------------------------------------
.../flex/utilities/converter/BaseConverter.java | 21 +++++++++-----------
.../utilities/converter/flex/FlexConverter.java | 8 ++++----
2 files changed, 13 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/2e676844/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java b/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
index d3171fb..d80cf8f 100644
--- a/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
+++ b/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
@@ -94,10 +94,9 @@ public abstract class BaseConverter {
protected String calculateChecksum(File jarFile) throws ConverterException {
// Implement the calculation of checksums for a given jar.
- final MessageDigest digest;
InputStream is = null;
try {
- digest = MessageDigest.getInstance("SHA-1");
+ MessageDigest digest = MessageDigest.getInstance("SHA-1");
is = new FileInputStream(jarFile);
final byte[] buffer = new byte[8192];
@@ -118,15 +117,13 @@ public abstract class BaseConverter {
} catch (FileNotFoundException e) {
throw new ConverterException("Error calculating checksum of file '" + jarFile.getPath() + "'", e);
} finally {
- try {
- if(is != null) {
+ if(is != null) {
+ try {
is.close();
+ } catch(IOException e) {
+ // Ignore ...
}
}
- catch(IOException e) {
- //noinspection ThrowFromFinallyBlock
- throw new ConverterException("Unable to close input stream for MD5 calculation", e);
- }
}
}
@@ -232,7 +229,7 @@ public abstract class BaseConverter {
final File outputDirectory = target.getParentFile();
if(!outputDirectory.exists()) {
if(!outputDirectory.mkdirs()) {
- throw new RuntimeException("Could not create directory: " + outputDirectory.getAbsolutePath());
+ throw new ConverterException("Could not create directory: " + outputDirectory.getAbsolutePath());
}
}
@@ -465,11 +462,11 @@ public abstract class BaseConverter {
// In general the version consists of the content of the version element with an appended build-number.
return (build.equals("0")) ? version + "-SNAPSHOT" : version;
} catch (ParserConfigurationException pce) {
- throw new RuntimeException(pce);
+ throw new ConverterException("Error parsing flex-sdk-description.xml", pce);
} catch (SAXException se) {
- throw new RuntimeException(se);
+ throw new ConverterException("Error parsing flex-sdk-description.xml", se);
} catch (IOException ioe) {
- throw new RuntimeException(ioe);
+ throw new ConverterException("Error parsing flex-sdk-description.xml", ioe);
}
}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/2e676844/flex-maven-tools/flex-sdk-converter/converters/flex/src/main/java/org/apache/flex/utilities/converter/flex/FlexConverter.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/converters/flex/src/main/java/org/apache/flex/utilities/converter/flex/FlexConverter.java b/flex-maven-tools/flex-sdk-converter/converters/flex/src/main/java/org/apache/flex/utilities/converter/flex/FlexConverter.java
index cbe7e87..35013d0 100644
--- a/flex-maven-tools/flex-sdk-converter/converters/flex/src/main/java/org/apache/flex/utilities/converter/flex/FlexConverter.java
+++ b/flex-maven-tools/flex-sdk-converter/converters/flex/src/main/java/org/apache/flex/utilities/converter/flex/FlexConverter.java
@@ -498,7 +498,7 @@ public class FlexConverter extends BaseConverter implements Converter {
final File targetDirectory = targetFile.getParentFile();
if (!targetDirectory.exists()) {
if (!targetDirectory.mkdirs()) {
- throw new RuntimeException("Could not create directory: " + targetDirectory.getCanonicalPath());
+ throw new ConverterException("Could not create directory: " + targetDirectory.getCanonicalPath());
}
}
@@ -572,11 +572,11 @@ public class FlexConverter extends BaseConverter implements Converter {
final Element root = dom.getDocumentElement();
return root.getElementsByTagName("build").item(0).getTextContent();
} catch (ParserConfigurationException pce) {
- throw new RuntimeException(pce);
+ throw new ConverterException("Error parsing flex-sdk-description.xml", pce);
} catch (SAXException se) {
- throw new RuntimeException(se);
+ throw new ConverterException("Error parsing flex-sdk-description.xml", se);
} catch (IOException ioe) {
- throw new RuntimeException(ioe);
+ throw new ConverterException("Error parsing flex-sdk-description.xml", ioe);
}
}
[07/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - Fixed SonarQube findings ...
Posted by cd...@apache.org.
Fixed SonarQube findings ...
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/790b3556
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/790b3556
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/790b3556
Branch: refs/heads/feature/flash-downloader
Commit: 790b355688dc0ada8c62cb1df91faf67f52126ea
Parents: 4463329
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sun Dec 18 15:18:01 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sun Dec 18 15:18:01 2016 +0100
----------------------------------------------------------------------
.../utilities/converter/air/AirConverter.java | 10 +-
.../flex/utilities/converter/BaseConverter.java | 39 ++--
.../converter/retrievers/BaseRetriever.java | 41 +++--
.../retrievers/download/DownloadRetriever.java | 176 ++++++++++++-------
4 files changed, 174 insertions(+), 92 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/790b3556/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java b/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
index 7e9fadf..46373c4 100644
--- a/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
+++ b/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
@@ -358,8 +358,9 @@ public class AirConverter extends BaseConverter implements Converter {
}
DataInputStream in = null;
+ FileInputStream descriptorInputStream = null;
try {
- final FileInputStream descriptorInputStream = new FileInputStream(sdkDescriptor);
+ descriptorInputStream = new FileInputStream(sdkDescriptor);
in = new DataInputStream(descriptorInputStream);
final BufferedReader br = new BufferedReader(new InputStreamReader(in));
final String strLine = br.readLine();
@@ -374,6 +375,13 @@ public class AirConverter extends BaseConverter implements Converter {
// Ignore.
}
}
+ if (descriptorInputStream != null) {
+ try {
+ descriptorInputStream.close();
+ } catch (IOException e) {
+ // Ignore.
+ }
+ }
}
}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/790b3556/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java b/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
index 1d92181..d3171fb 100644
--- a/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
+++ b/flex-maven-tools/flex-sdk-converter/converters/base/src/main/java/org/apache/flex/utilities/converter/BaseConverter.java
@@ -95,10 +95,11 @@ public abstract class BaseConverter {
protected String calculateChecksum(File jarFile) throws ConverterException {
// Implement the calculation of checksums for a given jar.
final MessageDigest digest;
+ InputStream is = null;
try {
digest = MessageDigest.getInstance("SHA-1");
- final InputStream is = new FileInputStream(jarFile);
+ is = new FileInputStream(jarFile);
final byte[] buffer = new byte[8192];
int read;
try {
@@ -110,21 +111,22 @@ public abstract class BaseConverter {
return bigInt.toString(16);
}
catch(IOException e) {
- throw new RuntimeException("Unable to process file for MD5", e);
- }
- finally {
- try {
- is.close();
- }
- catch(IOException e) {
- //noinspection ThrowFromFinallyBlock
- throw new RuntimeException("Unable to close input stream for MD5 calculation", e);
- }
+ throw new ConverterException("Unable to process file for MD5", e);
}
} catch (NoSuchAlgorithmException e) {
throw new ConverterException("Error calculating checksum of file '" + jarFile.getPath() + "'", e);
} catch (FileNotFoundException e) {
throw new ConverterException("Error calculating checksum of file '" + jarFile.getPath() + "'", e);
+ } finally {
+ try {
+ if(is != null) {
+ is.close();
+ }
+ }
+ catch(IOException e) {
+ //noinspection ThrowFromFinallyBlock
+ throw new ConverterException("Unable to close input stream for MD5 calculation", e);
+ }
}
}
@@ -142,10 +144,17 @@ public abstract class BaseConverter {
} else {
connection = queryUrl.openConnection();
}
- final ReadableByteChannel rbc = Channels.newChannel(connection.getInputStream());
- final ByteBuffer byteBuffer = ByteBuffer.allocate(1024);
- if(rbc.read(byteBuffer) > 0) {
- output = new String (byteBuffer.array(), "UTF-8");
+ ReadableByteChannel rbc = null;
+ try {
+ rbc = Channels.newChannel(connection.getInputStream());
+ final ByteBuffer byteBuffer = ByteBuffer.allocate(1024);
+ if (rbc.read(byteBuffer) > 0) {
+ output = new String(byteBuffer.array(), "UTF-8");
+ }
+ } finally {
+ if(rbc != null) {
+ rbc.close();
+ }
}
} catch (MalformedURLException e) {
throw new ConverterException("Error querying maven central.", e);
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/790b3556/flex-maven-tools/flex-sdk-converter/retrievers/base/src/main/java/org/apache/flex/utilities/converter/retrievers/BaseRetriever.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/retrievers/base/src/main/java/org/apache/flex/utilities/converter/retrievers/BaseRetriever.java b/flex-maven-tools/flex-sdk-converter/retrievers/base/src/main/java/org/apache/flex/utilities/converter/retrievers/BaseRetriever.java
index 514ed2e..b9e3bcd 100644
--- a/flex-maven-tools/flex-sdk-converter/retrievers/base/src/main/java/org/apache/flex/utilities/converter/retrievers/BaseRetriever.java
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/base/src/main/java/org/apache/flex/utilities/converter/retrievers/BaseRetriever.java
@@ -45,9 +45,11 @@ public abstract class BaseRetriever implements Retriever {
ArchiveInputStream archiveInputStream = null;
ArchiveEntry entry;
+ FileInputStream fileInputStream = null;
try {
- final CountingInputStream inputStream = new CountingInputStream(new FileInputStream(inputArchive));
+ fileInputStream = new FileInputStream(inputArchive);
+ final CountingInputStream inputStream = new CountingInputStream(fileInputStream);
final long inputFileSize = inputArchive.length();
@@ -76,20 +78,28 @@ public abstract class BaseRetriever implements Retriever {
// Entry is a file.
else {
final byte[] data = new byte[BUFFER_MAX];
- final FileOutputStream fos = new FileOutputStream(outputFile);
- BufferedOutputStream dest = null;
+ FileOutputStream fos = null;
try {
- dest = new BufferedOutputStream(fos, BUFFER_MAX);
+ fos = new FileOutputStream(outputFile);
- int count;
- while ((count = archiveInputStream.read(data, 0, BUFFER_MAX)) != -1) {
- dest.write(data, 0, count);
- progressBar.updateProgress(inputStream.getBytesRead());
+ BufferedOutputStream dest = null;
+ try {
+ dest = new BufferedOutputStream(fos, BUFFER_MAX);
+
+ int count;
+ while ((count = archiveInputStream.read(data, 0, BUFFER_MAX)) != -1) {
+ dest.write(data, 0, count);
+ progressBar.updateProgress(inputStream.getBytesRead());
+ }
+ } finally {
+ if (dest != null) {
+ dest.flush();
+ dest.close();
+ }
}
} finally {
- if(dest != null) {
- dest.flush();
- dest.close();
+ if(fos != null) {
+ fos.close();
}
}
}
@@ -106,7 +116,14 @@ public abstract class BaseRetriever implements Retriever {
if(archiveInputStream != null) {
try {
archiveInputStream.close();
- } catch(Exception e) {
+ } catch(IOException e) {
+ // Ignore...
+ }
+ }
+ if(fileInputStream != null) {
+ try {
+ fileInputStream.close();
+ } catch(IOException e) {
// Ignore...
}
}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/790b3556/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
index 6843d17..f80c7f2 100644
--- a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
@@ -27,9 +27,9 @@ import org.apache.flex.utilities.converter.retrievers.utils.ProgressBar;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.w3c.dom.Document;
@@ -189,29 +189,47 @@ public class DownloadRetriever extends BaseRetriever {
} else {
connection = sourceUrl.openConnection();
}
- final ReadableByteChannel rbc = Channels.newChannel(connection.getInputStream());
- final FileOutputStream fos = new FileOutputStream(targetFile);
+ ReadableByteChannel rbc = null;
+ FileOutputStream fos = null;
+ try {
+ rbc = Channels.newChannel(connection.getInputStream());
+ fos = new FileOutputStream(targetFile);
- ////////////////////////////////////////////////////////////////////////////////
- // Do the downloading.
- ////////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////////
+ // Do the downloading.
+ ////////////////////////////////////////////////////////////////////////////////
- final long expectedSize = connection.getContentLength();
- long transferedSize = 0L;
+ final long expectedSize = connection.getContentLength();
+ long transferedSize = 0L;
- System.out.println("===========================================================");
- System.out.println("Downloading " + sourceUrl.toString());
- if(expectedSize > 1014 * 1024) {
- System.out.println("Expected size: " + (expectedSize / 1024 / 1024) + "MB");
- } else {
- System.out.println("Expected size: " + (expectedSize / 1024 ) + "KB");
- }
- final ProgressBar progressBar = new ProgressBar(expectedSize);
- while (transferedSize < expectedSize) {
- transferedSize += fos.getChannel().transferFrom(rbc, transferedSize, 1 << 20);
- progressBar.updateProgress(transferedSize);
+ System.out.println("===========================================================");
+ System.out.println("Downloading " + sourceUrl.toString());
+ if (expectedSize > 1014 * 1024) {
+ System.out.println("Expected size: " + (expectedSize / 1024 / 1024) + "MB");
+ } else {
+ System.out.println("Expected size: " + (expectedSize / 1024) + "KB");
+ }
+ final ProgressBar progressBar = new ProgressBar(expectedSize);
+ while (transferedSize < expectedSize) {
+ transferedSize += fos.getChannel().transferFrom(rbc, transferedSize, 1 << 20);
+ progressBar.updateProgress(transferedSize);
+ }
+ } finally {
+ if(rbc != null) {
+ try {
+ rbc.close();
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
+ if(fos != null) {
+ try {
+ fos.close();
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
}
- fos.close();
System.out.println();
System.out.println("Finished downloading.");
System.out.println("===========================================================");
@@ -227,59 +245,89 @@ public class DownloadRetriever extends BaseRetriever {
config = RequestConfig.DEFAULT;
}
- HttpGet httpget = new HttpGet(sourceUri);
- httpget.setConfig(config);
- HttpClient httpclient = HttpClients.createDefault();
- HttpResponse response = httpclient.execute(httpget);
-
- String reasonPhrase = response.getStatusLine().getReasonPhrase();
- int statusCode = response.getStatusLine().getStatusCode();
- System.out.println(String.format("statusCode: %d", statusCode));
- System.out.println(String.format("reasonPhrase: %s", reasonPhrase));
-
- HttpEntity entity = response.getEntity();
- InputStream content = entity.getContent();
+ CloseableHttpClient httpclient = null;
+ try {
+ HttpGet httpget = new HttpGet(sourceUri);
+ httpget.setConfig(config);
+ httpclient = HttpClients.createDefault();
+ HttpResponse response = httpclient.execute(httpget);
- final ReadableByteChannel rbc = Channels.newChannel(content);
- final FileOutputStream fos = new FileOutputStream(targetFile);
+ String reasonPhrase = response.getStatusLine().getReasonPhrase();
+ int statusCode = response.getStatusLine().getStatusCode();
+ System.out.println(String.format("statusCode: %d", statusCode));
+ System.out.println(String.format("reasonPhrase: %s", reasonPhrase));
- ////////////////////////////////////////////////////////////////////////////////
- // Do the downloading.
- ////////////////////////////////////////////////////////////////////////////////
+ HttpEntity entity = response.getEntity();
+ InputStream content = entity.getContent();
- final long expectedSize = entity.getContentLength();
- System.out.println("===========================================================");
- System.out.println("Downloading " + sourceUri.toString());
- if(expectedSize <= 0) {
+ ReadableByteChannel rbc = null;
+ FileOutputStream fos = null;
try {
- System.out.println("Unknown size.");
- IOUtils.copy(content, fos);
+ rbc = Channels.newChannel(content);
+ fos = new FileOutputStream(targetFile);
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // Do the downloading.
+ ////////////////////////////////////////////////////////////////////////////////
+
+ final long expectedSize = entity.getContentLength();
+ System.out.println("===========================================================");
+ System.out.println("Downloading " + sourceUri.toString());
+ if (expectedSize <= 0) {
+ try {
+ System.out.println("Unknown size.");
+ IOUtils.copy(content, fos);
+ } finally {
+ // close http network connection
+ content.close();
+ }
+ } else {
+ if (expectedSize > 1014 * 1024) {
+ System.out.println("Expected size: " + (expectedSize / 1024 / 1024) + "MB");
+ } else {
+ System.out.println("Expected size: " + (expectedSize / 1024) + "KB");
+ }
+ final ProgressBar progressBar = new ProgressBar(expectedSize);
+ long transferredSize = 0L;
+ while ((expectedSize == 0) || (transferredSize < expectedSize)) {
+ // Transfer about 1MB in each iteration.
+ long currentSize = fos.getChannel().transferFrom(rbc, transferredSize, MEGABYTE);
+ if (currentSize < MEGABYTE) {
+ break;
+ }
+ transferredSize += currentSize;
+ progressBar.updateProgress(transferredSize);
+ }
+ fos.close();
+ System.out.println();
+ }
+ System.out.println("Finished downloading.");
+ System.out.println("===========================================================");
} finally {
- // close http network connection
- content.close();
- }
- } else {
- if (expectedSize > 1014 * 1024) {
- System.out.println("Expected size: " + (expectedSize / 1024 / 1024) + "MB");
- } else {
- System.out.println("Expected size: " + (expectedSize / 1024) + "KB");
+ if(rbc != null) {
+ try {
+ rbc.close();
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
+ if(fos != null) {
+ try {
+ fos.close();
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
}
- final ProgressBar progressBar = new ProgressBar(expectedSize);
- long transferredSize = 0L;
- while ((expectedSize == 0) || (transferredSize < expectedSize)) {
- // Transfer about 1MB in each iteration.
- long currentSize = fos.getChannel().transferFrom(rbc, transferredSize, MEGABYTE);
- if(currentSize < MEGABYTE) {
- break;
+ } finally {
+ if(httpclient != null) {
+ try {
+ httpclient.close();
+ } catch(IOException e) {
+ // Ignore ...
}
- transferredSize += currentSize;
- progressBar.updateProgress(transferredSize);
}
- fos.close();
- System.out.println();
}
- System.out.println("Finished downloading.");
- System.out.println("===========================================================");
}
protected String getBinaryUrl(SdkType sdkType, String version, PlatformType platformType)
[09/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - Add support for latest google closure
compiler
Posted by cd...@apache.org.
Add support for latest google closure compiler
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/5ed2c77d
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/5ed2c77d
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/5ed2c77d
Branch: refs/heads/feature/flash-downloader
Commit: 5ed2c77d64fa6c3a65a6c2a022762cff94945c4f
Parents: 2e67684
Author: OmPrakash Muppirala <bi...@gmail.com>
Authored: Sun Dec 18 22:50:30 2016 -0800
Committer: OmPrakash Muppirala <bi...@gmail.com>
Committed: Sun Dec 18 22:51:14 2016 -0800
----------------------------------------------------------------------
npm-flexjs/dependencies/ApacheFalcon.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/5ed2c77d/npm-flexjs/dependencies/ApacheFalcon.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/ApacheFalcon.js b/npm-flexjs/dependencies/ApacheFalcon.js
index 6a80291..82acb4c 100644
--- a/npm-flexjs/dependencies/ApacheFalcon.js
+++ b/npm-flexjs/dependencies/ApacheFalcon.js
@@ -125,9 +125,9 @@ var falconDependencies = [
},
{
url:'http://dl.google.com/closure-compiler/',
- remoteFileName:'compiler-20150609.zip',
+ remoteFileName:'compiler-20161201.zip',
destinationPath:constants.DOWNLOADS_FOLDER,
- destinationFileName:'compiler-20150609.zip',
+ destinationFileName:'compiler-20161201.zip',
pathOfFileToBeCopiedFrom:'compiler.jar',
pathOfFileToBeCopiedTo:googleClosureCompilerFolder + 'compiler.jar',
unzip:true
@@ -142,8 +142,8 @@ var falconDependencies = [
unzip:true
},
{
- url:'http://search.maven.org/remotecontent?filepath=com/google/guava/guava/17.0/',
- remoteFileName:'guava-17.0.jar',
+ url:'http://search.maven.org/remotecontent?filepath=com/google/guava/guava/20.0/',
+ remoteFileName:'guava-20.0.jar',
destinationPath:jsLibFolder,
destinationFileName:'guava.jar',
unzip:false
[06/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - - Added configuration for SonarQube
analysis
Posted by cd...@apache.org.
- Added configuration for SonarQube analysis
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/44633291
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/44633291
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/44633291
Branch: refs/heads/feature/flash-downloader
Commit: 4463329167236a92e0d3b44b3b7efa03b4a917e7
Parents: 903fdde
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sun Dec 18 14:30:16 2016 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sun Dec 18 14:30:25 2016 +0100
----------------------------------------------------------------------
flex-maven-tools/flex-sdk-converter/pom.xml | 177 ++++++++++++++++++++++-
1 file changed, 175 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/44633291/flex-maven-tools/flex-sdk-converter/pom.xml
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/pom.xml b/flex-maven-tools/flex-sdk-converter/pom.xml
index 81109d9..1aebab9 100644
--- a/flex-maven-tools/flex-sdk-converter/pom.xml
+++ b/flex-maven-tools/flex-sdk-converter/pom.xml
@@ -31,10 +31,21 @@
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
+ <name>Apache Flex - SDK-Converter</name>
+
<properties>
+ <java.version>1.6</java.version>
<mavenVersion>3.1.1</mavenVersion>
<aetherVersion>0.9.0.M4</aetherVersion>
<wagonVersion>2.2</wagonVersion>
+
+ <!-- URL of the ASF SonarQube server -->
+ <sonar.host.url>https://builds.apache.org/analysis</sonar.host.url>
+ <!-- Tell sonar where the coverage reports are located -->
+ <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco-ut.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
+ <!-- Exclude all generated code -->
+ <sonar.exclusions>file:**/generated-sources/**</sonar.exclusions>
</properties>
<mailingLists>
@@ -70,12 +81,174 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
+ <version>3.5.1</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ <executions>
+ <!--
+ Prepares the property pointing to the JaCoCo runtime agent which
+ is passed as VM argument when Maven the Surefire plugin is executed.
+ -->
+ <execution>
+ <id>pre-unit-test</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <!-- Sets the path to the file which contains the execution data. -->
+ <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
+ <!--
+ Sets the name of the property containing the settings
+ for JaCoCo runtime agent.
+ -->
+ <propertyName>surefireArgLine</propertyName>
+ </configuration>
+ </execution>
+ <!--
+ Ensures that the code coverage report for unit tests is created after
+ unit tests have been run.
+ -->
+ <execution>
+ <id>post-unit-test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <!-- Sets the path to the file which contains the execution data. -->
+ <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
+ <!-- Sets the output directory for the code coverage report. -->
+ <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+ </configuration>
+ </execution>
+ <!--
+ Prepares the property pointing to the JaCoCo runtime agent which
+ is passed as VM argument when Maven the Failsafe plugin is executed.
+ -->
+ <execution>
+ <id>pre-integration-test</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <!-- Sets the path to the file which contains the execution data. -->
+ <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
+ <!--
+ Sets the name of the property containing the settings
+ for JaCoCo runtime agent.
+ -->
+ <propertyName>failsafeArgLine</propertyName>
+ </configuration>
+ </execution>
+ <!--
+ Ensures that the code coverage report for integration tests after
+ integration tests have been run.
+ -->
+ <execution>
+ <id>post-integration-test</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <!-- Sets the path to the file which contains the execution data. -->
+ <dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
+ <!-- Sets the output directory for the code coverage report. -->
+ <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- Make the surefire execute all unit-tests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.19</version>
+ <configuration>
+ <argLine>${surefireArgLine}</argLine>
+ <systemPropertyVariables>
+ <buildType>Maven</buildType>
+ <flexVersion>${flex.version}</flexVersion>
+ <flashVersion>${flash.version}</flashVersion>
+ <airVersion>${air.version}</airVersion>
+ <mavenLocalRepoDir>${settings.localRepository}</mavenLocalRepoDir>
+ </systemPropertyVariables>
+ <!--
+ Currently some tests need this to be disabled,
+ but actually this is a bug. For now I'll disable
+ them to avoid problems during the maven migration.
+ After this is finished, we should defnitely fix
+ the tests so assertions can be enabled.
+ -->
+ <enableAssertions>false</enableAssertions>
+ </configuration>
+ </plugin>
+
+ <!-- Make the failsafe execute all integration-tests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.18.1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <argLine>${failsafeArgLine}</argLine>
+ <systemPropertyVariables>
+ <buildType>Maven</buildType>
+ <flexVersion>${flex.version}</flexVersion>
+ <flashVersion>${flash.version}</flashVersion>
+ <airVersion>${air.version}</airVersion>
+ <mavenLocalRepoDir>${settings.localRepository}</mavenLocalRepoDir>
+ <FLASHPLAYER_DEBUGGER>${env.FLASHPLAYER_DEBUGGER}</FLASHPLAYER_DEBUGGER>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+
+ <!-- Plugin to detect problems with JDK incompatibilities -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-maven-plugin</artifactId>
+ <version>1.15</version>
+ <executions>
+ <execution>
+ <id>check-jdk-1.6</id>
+ <phase>test</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <signature>
+ <groupId>org.codehaus.mojo.signature</groupId>
+ <artifactId>java16</artifactId>
+ <version>1.1</version>
+ </signature>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.sonarsource.scanner.maven</groupId>
+ <artifactId>sonar-maven-plugin</artifactId>
+ <version>3.0.2</version>
+ </plugin>
</plugins>
</build>
</project>
[02/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - - Changed the AirFilter to also
accept Windows type paths ("\" instead of "/")
Posted by cd...@apache.org.
- Changed the AirFilter to also accept Windows type paths ("\" instead of "/")
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/98b189d8
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/98b189d8
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/98b189d8
Branch: refs/heads/feature/flash-downloader
Commit: 98b189d8820cf51f007d5779841b7f18970c3b88
Parents: fa9a4fe
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Fri Oct 7 09:23:43 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Fri Oct 7 09:23:43 2016 +0200
----------------------------------------------------------------------
.../utilities/converter/air/AirConverter.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/98b189d8/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java b/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
index d00986f..7e9fadf 100644
--- a/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
+++ b/flex-maven-tools/flex-sdk-converter/converters/air/src/main/java/org/apache/flex/utilities/converter/air/AirConverter.java
@@ -416,15 +416,15 @@ public class AirConverter extends BaseConverter implements Converter {
String relativePath = pathname.getAbsolutePath().substring(
rootSourceDirectory.getAbsolutePath().length());
- boolean result = "/AIR SDK license.pdf".equals(relativePath) ||
- "/AIR SDK Readme.txt".equals(relativePath) ||
- "/airsdk.xml".equals(relativePath) ||
- relativePath.startsWith("/frameworks/projects/air/") ||
- relativePath.startsWith("/include/") ||
- relativePath.startsWith("/install/") ||
- relativePath.startsWith("/samples/");
-
- if(relativePath.startsWith("/frameworks/libs/air/")) {
+ boolean result = "/AIR SDK license.pdf".equals(relativePath) || "\\AIR SDK license.pdf".equals(relativePath) ||
+ "/AIR SDK Readme.txt".equals(relativePath) || "\\AIR SDK Readme.txt".equals(relativePath) ||
+ "/airsdk.xml".equals(relativePath) || "\\airsdk.xml".equals(relativePath) ||
+ relativePath.startsWith("/frameworks/projects/air/") || relativePath.startsWith("\\frameworks\\projects\\air\\") ||
+ relativePath.startsWith("/include/") || relativePath.startsWith("\\include\\") ||
+ relativePath.startsWith("/install/") || relativePath.startsWith("\\install\\") ||
+ relativePath.startsWith("/samples/") || relativePath.startsWith("\\samples\\");
+
+ if(relativePath.startsWith("/frameworks/libs/air/") || relativePath.startsWith("\\frameworks\\libs\\air\\")) {
result = !(pathname.getName().endsWith(".swc") || pathname.getName().endsWith(".swf"));
}
[05/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - ant_on_air: Exec task makes Ant fail
if failonerror is true and the NativeProcessExitEvent exitCode is not 0
Posted by cd...@apache.org.
ant_on_air: Exec task makes Ant fail if failonerror is true and the NativeProcessExitEvent exitCode is not 0
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/903fddec
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/903fddec
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/903fddec
Branch: refs/heads/feature/flash-downloader
Commit: 903fddecda2c30e6069db5763baec51dca5a82c7
Parents: 60b0452
Author: Josh Tynjala <jo...@apache.org>
Authored: Mon Nov 21 14:35:44 2016 -0800
Committer: Josh Tynjala <jo...@apache.org>
Committed: Mon Nov 21 14:35:44 2016 -0800
----------------------------------------------------------------------
.../ant_on_air/src/org/apache/flex/ant/tags/Exec.as | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/903fddec/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
----------------------------------------------------------------------
diff --git a/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Exec.as b/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
index bc503a6..e5eced7 100644
--- a/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
+++ b/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
@@ -126,11 +126,23 @@ package org.apache.flex.ant.tags
{
return getAttributeValue("@outputproperty");
}
+
+ override public function get failonerror():Boolean
+ {
+ var val:String = getNullOrAttributeValue("@failonerror");
+ //if omitted, defaults to false
+ return val == null ? false : val == "true";
+ }
private var process:NativeProcess;
private function exitHandler(event:NativeProcessExitEvent):void
{
+ if(event.exitCode !== 0 && failonerror)
+ {
+ ant.project.failureMessage = "Exec task failed: " + fileName;
+ ant.project.status = false;
+ }
dispatchEvent(new Event(Event.COMPLETE));
}
[03/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - Squiggly now only replaces
ContainerControllers if they don't implement ISpellingContainerController
Posted by cd...@apache.org.
Squiggly now only replaces ContainerControllers if they don't implement ISpellingContainerController
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/e62376ea
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/e62376ea
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/e62376ea
Branch: refs/heads/feature/flash-downloader
Commit: e62376ea9d7738ef96ea6abb93e003eda66b4619
Parents: 98b189d
Author: Harbs <ha...@in-tools.com>
Authored: Thu Oct 13 09:05:42 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Oct 13 09:05:42 2016 +0300
----------------------------------------------------------------------
.../linguistics/spelling/ISpellingContainerController.as | 7 +++++++
.../adobe/linguistics/spelling/SpellingContextMenuForTLF.as | 7 +++++--
.../linguistics/spelling/SquigglyCustomContainerController.as | 6 +++---
3 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e62376ea/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/ISpellingContainerController.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/ISpellingContainerController.as b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/ISpellingContainerController.as
new file mode 100644
index 0000000..c5b25cd
--- /dev/null
+++ b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/ISpellingContainerController.as
@@ -0,0 +1,7 @@
+package com.adobe.linguistics.spelling
+{
+ public interface ISpellingContainerController
+ {
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e62376ea/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
index 7cfc65a..45f212b 100644
--- a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
+++ b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SpellingContextMenuForTLF.as
@@ -23,12 +23,12 @@ package com.adobe.linguistics.spelling
import com.adobe.linguistics.spelling.framework.ui.IHighlighter;
import com.adobe.linguistics.spelling.framework.ui.IWordProcessor;
import com.adobe.linguistics.utils.Token;
-
+
import flash.events.ContextMenuEvent;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
import flash.utils.describeType;
-
+
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.tlf_internal;
@@ -65,6 +65,9 @@ package com.adobe.linguistics.spelling
for (var idx:int = 0; idx < numControllers; idx++)
{
var containerController:ContainerController = mTextFlow.flowComposer.getControllerAt(idx);
+ // if it's already squiggly compatible don't replace it.
+ if(containerController is ISpellingContainerController)
+ continue;
var squigglyContainerController:SquigglyCustomContainerController = new SquigglyCustomContainerController(containerController.container, mTextHighlighter, mWordProcessor,
mSpellEngine, func, containerController.compositionWidth, containerController.compositionHeight);
copyObject(containerController, squigglyContainerController);
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e62376ea/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
----------------------------------------------------------------------
diff --git a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
index 1c5b4ee..d4028c9 100644
--- a/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
+++ b/Squiggly/main/SpellingUITLF/src/com/adobe/linguistics/spelling/SquigglyCustomContainerController.as
@@ -23,19 +23,19 @@ package com.adobe.linguistics.spelling
import com.adobe.linguistics.spelling.framework.ui.IWordProcessor;
import com.adobe.linguistics.spelling.framework.ui.TLFWordProcessor;
import com.adobe.linguistics.utils.Token;
-
+
import flash.display.Sprite;
import flash.events.ContextMenuEvent;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
-
+
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.elements.FlowLeafElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.TextFlow;
/** Custom container controller for populating context menu and hanlding menu item selection */
- internal class SquigglyCustomContainerController extends ContainerController
+ internal class SquigglyCustomContainerController extends ContainerController implements ISpellingContainerController
{
private var disableMenuItem:ContextMenuItem = new ContextMenuItem("Disable spell checking",true);
private var enableMenuItem:ContextMenuItem = new ContextMenuItem("Enable spell checking");
[04/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - ant_on_air: Replace task makes Ant
fail if file does not exist (instead of throwing an uncaught error)
Posted by cd...@apache.org.
ant_on_air: Replace task makes Ant fail if file does not exist (instead of throwing an uncaught error)
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/60b04527
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/60b04527
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/60b04527
Branch: refs/heads/feature/flash-downloader
Commit: 60b0452754aef2c8759e98aeac674cddcac0127d
Parents: e62376e
Author: Josh Tynjala <jo...@apache.org>
Authored: Mon Nov 21 14:06:17 2016 -0800
Committer: Josh Tynjala <jo...@apache.org>
Committed: Mon Nov 21 14:06:17 2016 -0800
----------------------------------------------------------------------
.../ant_on_air/src/org/apache/flex/ant/tags/Replace.as | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/60b04527/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
----------------------------------------------------------------------
diff --git a/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Replace.as b/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
index 2873ee1..afb95b7 100644
--- a/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
+++ b/flex-installer/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
@@ -18,6 +18,7 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.flex.ant.tags
{
+ import flash.errors.IOError;
import flash.filesystem.File;
import flash.filesystem.FileMode;
import flash.filesystem.FileStream;
@@ -62,6 +63,10 @@ package org.apache.flex.ant.tags
try {
var f:File = File.applicationDirectory.resolvePath(file);
+ if(!f.exists)
+ {
+ throw new IOError("File not found: " + f.nativePath);
+ }
}
catch (e:Error)
{
[14/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - - Made it possible to also accept the
license agreement by setting an environment variable
Posted by cd...@apache.org.
- Made it possible to also accept the license agreement by setting an environment variable
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/ee771e65
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/ee771e65
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/ee771e65
Branch: refs/heads/feature/flash-downloader
Commit: ee771e6579486521b86f22a9fb629ff127edcfcd
Parents: 581567a
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Tue Apr 11 08:43:08 2017 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Tue Apr 11 08:43:08 2017 +0200
----------------------------------------------------------------------
.../converter/retrievers/download/DownloadRetriever.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ee771e65/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
index a29e2f4..2700464 100644
--- a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
@@ -453,7 +453,12 @@ public class DownloadRetriever extends BaseRetriever {
String property = "com.adobe.systemIdsForWhichTheTermsOfTheAdobeLicenseAgreementAreAccepted";
// Implement the accepting the license by providing a system-id as system-property.
+ // Check a java property first ...
String acceptedSystemIds = System.getProperty(property);
+ // Check an environment variable second ...
+ if(acceptedSystemIds == null) {
+ acceptedSystemIds = System.getenv("com.adobe.systemIdsForWhichTheTermsOfTheAdobeLicenseAgreementAreAccepted");
+ }
if(acceptedSystemIds != null) {
String systemId = SystemIdHelper.getSystemId();
if(systemId != null) {
[11/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - npm-flexjs: put back duplicate Guava
dependency because it's required, but updated to correct version
Posted by cd...@apache.org.
npm-flexjs: put back duplicate Guava dependency because it's required, but updated to correct version
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/30ef5fb3
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/30ef5fb3
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/30ef5fb3
Branch: refs/heads/feature/flash-downloader
Commit: 30ef5fb36374060061739c402f55b3accc7aa019
Parents: 26cd3e6
Author: Josh Tynjala <jo...@apache.org>
Authored: Wed Dec 21 11:29:43 2016 -0800
Committer: Josh Tynjala <jo...@apache.org>
Committed: Wed Dec 21 11:29:43 2016 -0800
----------------------------------------------------------------------
npm-flexjs/dependencies/ApacheFalcon.js | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/30ef5fb3/npm-flexjs/dependencies/ApacheFalcon.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/ApacheFalcon.js b/npm-flexjs/dependencies/ApacheFalcon.js
index 34b02f4..c336416 100644
--- a/npm-flexjs/dependencies/ApacheFalcon.js
+++ b/npm-flexjs/dependencies/ApacheFalcon.js
@@ -78,6 +78,13 @@ var falconDependencies = [
unzip:true
},
{
+ url:'http://search.maven.org/remotecontent?filepath=com/google/guava/guava/20.0/',
+ remoteFileName:'guava-20.0.jar',
+ destinationPath:constants.FLEXJS_FOLDER + falconLibExternalFolder,
+ destinationFileName:'guava.jar',
+ unzip:false
+ },
+ {
url:'http://search.maven.org/remotecontent?filepath=net/sourceforge/jburg/jburg/1.10.2/',
remoteFileName:'jburg-1.10.2.jar',
destinationPath:constants.FLEXJS_FOLDER + falconLibExternalFolder,
[10/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - npm-flexjs: removed duplicate Guava
dependency
Posted by cd...@apache.org.
npm-flexjs: removed duplicate Guava dependency
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/26cd3e6d
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/26cd3e6d
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/26cd3e6d
Branch: refs/heads/feature/flash-downloader
Commit: 26cd3e6d6d2713cc52d1e31ca2b35cf80ce5c83d
Parents: 5ed2c77
Author: Josh Tynjala <jo...@apache.org>
Authored: Wed Dec 21 11:27:33 2016 -0800
Committer: Josh Tynjala <jo...@apache.org>
Committed: Wed Dec 21 11:27:33 2016 -0800
----------------------------------------------------------------------
npm-flexjs/dependencies/ApacheFalcon.js | 7 -------
1 file changed, 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/26cd3e6d/npm-flexjs/dependencies/ApacheFalcon.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/ApacheFalcon.js b/npm-flexjs/dependencies/ApacheFalcon.js
index 82acb4c..34b02f4 100644
--- a/npm-flexjs/dependencies/ApacheFalcon.js
+++ b/npm-flexjs/dependencies/ApacheFalcon.js
@@ -78,13 +78,6 @@ var falconDependencies = [
unzip:true
},
{
- url:'http://search.maven.org/remotecontent?filepath=com/google/guava/guava/17.0/',
- remoteFileName:'guava-17.0.jar',
- destinationPath:constants.FLEXJS_FOLDER + falconLibExternalFolder,
- destinationFileName:'guava.jar',
- unzip:false
- },
- {
url:'http://search.maven.org/remotecontent?filepath=net/sourceforge/jburg/jburg/1.10.2/',
remoteFileName:'jburg-1.10.2.jar',
destinationPath:constants.FLEXJS_FOLDER + falconLibExternalFolder,
[13/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - - Added an expanation to ssl
handshake errors when downloading from sourceforge.
Posted by cd...@apache.org.
- Added an expanation to ssl handshake errors when downloading from sourceforge.
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/581567a9
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/581567a9
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/581567a9
Branch: refs/heads/feature/flash-downloader
Commit: 581567a911b57eb576cac297439919751cfb52c3
Parents: 9b38938
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Fri Feb 10 17:19:49 2017 +0100
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Fri Feb 10 17:19:49 2017 +0100
----------------------------------------------------------------------
.../retrievers/download/DownloadRetriever.java | 31 ++++++++++++--------
1 file changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/581567a9/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
index f80c7f2..a29e2f4 100644
--- a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
@@ -37,6 +37,7 @@ import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
+import javax.net.ssl.SSLHandshakeException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -85,34 +86,32 @@ public class DownloadRetriever extends BaseRetriever {
confirmLicenseAcceptance(type);
}
- if(type.equals(SdkType.FONTKIT)) {
+ if (type.equals(SdkType.FONTKIT)) {
File tmpTargetFile = File.createTempFile(UUID.randomUUID().toString(), "");
String tempSuffix = tmpTargetFile.getName().substring(tmpTargetFile.getName().lastIndexOf("-"));
- if(!(tmpTargetFile.delete()))
- {
+ if (!(tmpTargetFile.delete())) {
throw new IOException("Could not delete temp file: " + tmpTargetFile.getAbsolutePath());
}
File targetRootDir = new File(tmpTargetFile.getParentFile(), type.toString() + tempSuffix);
File targetDir = new File(targetRootDir, "/lib/external/optional");
- if(!(targetDir.mkdirs()))
- {
+ if (!(targetDir.mkdirs())) {
throw new IOException("Could not create temp directory: " + targetDir.getAbsolutePath());
}
- final URI afeUri = new URI("http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/afe.jar?format=raw");
+ final URI afeUri = new URI("https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/afe.jar?format=raw");
final File afeFile = new File(targetDir, "afe.jar");
performSafeDownload(afeUri, afeFile);
- final URI aglj40Uri = new URI("http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/aglj40.jar?format=raw");
+ final URI aglj40Uri = new URI("https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/aglj40.jar?format=raw");
final File aglj40File = new File(targetDir, "aglj40.jar");
performSafeDownload(aglj40Uri, aglj40File);
- final URI rideauUri = new URI("http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/rideau.jar?format=raw");
+ final URI rideauUri = new URI("https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/rideau.jar?format=raw");
final File rideauFile = new File(targetDir, "rideau.jar");
performSafeDownload(rideauUri, rideauFile);
- final URI flexFontkitUri = new URI("http://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/flex-fontkit.jar?format=raw");
+ final URI flexFontkitUri = new URI("https://sourceforge.net/adobe/flexsdk/code/HEAD/tree/trunk/lib/flex-fontkit.jar?format=raw");
final File flexFontkitFile = new File(targetDir, "flex-fontkit.jar");
performSafeDownload(flexFontkitUri, flexFontkitFile);
@@ -134,7 +133,7 @@ public class DownloadRetriever extends BaseRetriever {
final File libDestFile = new File(targetDirectory, "frameworks/libs/player/" + version +
"/playerglobal.swc");
if (!libDestFile.getParentFile().exists()) {
- if(!libDestFile.getParentFile().mkdirs()) {
+ if (!libDestFile.getParentFile().mkdirs()) {
throw new RetrieverException("Error creating directory " + libDestFile.getParent());
}
}
@@ -144,7 +143,7 @@ public class DownloadRetriever extends BaseRetriever {
System.out.println("Extracting archive to temp directory.");
File targetDirectory = new File(targetFile.getParent(),
targetFile.getName().substring(0, targetFile.getName().lastIndexOf(".") - 1));
- if(type.equals(SdkType.SWFOBJECT)) {
+ if (type.equals(SdkType.SWFOBJECT)) {
unpack(targetFile, new File(targetDirectory, "templates"));
} else {
unpack(targetFile, targetDirectory);
@@ -154,7 +153,7 @@ public class DownloadRetriever extends BaseRetriever {
System.out.println("===========================================================");
// In case of the swfobject, delete some stuff we don't want in there.
- if(type.equals(SdkType.SWFOBJECT)) {
+ if (type.equals(SdkType.SWFOBJECT)) {
File delFile = new File(targetDirectory, "templates/swfobject/index_dynamic.html");
FileUtils.deleteQuietly(delFile);
delFile = new File(targetDirectory, "templates/swfobject/index.html");
@@ -172,6 +171,12 @@ public class DownloadRetriever extends BaseRetriever {
throw new RetrieverException("Error downloading archive.", e);
} catch (FileNotFoundException e) {
throw new RetrieverException("Error downloading archive.", e);
+ } catch (SSLHandshakeException e) {
+ throw new RetrieverException("Error downloading archive. There were problems in the SSL handshake. " +
+ "In case of Sourceforge this is probably related to Sourceforge using strong encryption for " +
+ "SSL and the default Oracle JDK not supporting this. If you are able to do so please install " +
+ "the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 8 available " +
+ "from http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html", e);
} catch (IOException e) {
throw new RetrieverException("Error downloading archive.", e);
} catch (URISyntaxException e) {
@@ -289,7 +294,7 @@ public class DownloadRetriever extends BaseRetriever {
}
final ProgressBar progressBar = new ProgressBar(expectedSize);
long transferredSize = 0L;
- while ((expectedSize == 0) || (transferredSize < expectedSize)) {
+ while (transferredSize < expectedSize) {
// Transfer about 1MB in each iteration.
long currentSize = fos.getChannel().transferFrom(rbc, transferredSize, MEGABYTE);
if (currentSize < MEGABYTE) {
[15/15] git commit: [flex-utilities]
[refs/heads/feature/flash-downloader] - Continued working on the decoding of
DMG images.
Posted by cd...@apache.org.
Continued working on the decoding of DMG images.
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/d0cef423
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/d0cef423
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/d0cef423
Branch: refs/heads/feature/flash-downloader
Commit: d0cef423715970e7ea624340e7e3371f18934312
Parents: 0b6dfdd ee771e6
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Tue Apr 18 14:14:58 2017 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Tue Apr 18 14:14:58 2017 +0200
----------------------------------------------------------------------
.../spelling/ISpellingContainerController.as | 7 +
.../spelling/SpellingContextMenuForTLF.as | 7 +-
.../SquigglyCustomContainerController.as | 6 +-
.../src/org/apache/flex/ant/tags/Exec.as | 12 +
.../src/org/apache/flex/ant/tags/Replace.as | 5 +
.../utilities/converter/air/AirConverter.java | 66 +++-
.../flex-sdk-converter/converters/base/pom.xml | 16 +
.../flex/utilities/converter/BaseConverter.java | 58 ++--
.../base/src/main/resources/logback.xml | 16 +
.../utilities/converter/flex/FlexConverter.java | 8 +-
.../deployer/aether/AetherDeployer.java | 26 +-
.../converter/retrievers/BaseRetriever.java | 41 ++-
.../retrievers/download/DownloadRetriever.java | 210 ++++++++-----
.../download/utils/utils/DmgBlkxBlock.java | 125 ++++++++
.../utils/utils/DmgPropertyListMishBlock.java | 109 -------
.../download/utils/utils/HFSPlusExtent.java | 40 ---
.../download/utils/utils/HFSPlusForkData.java | 58 ----
.../utils/utils/HFSPlusVolumeHeader.java | 217 -------------
.../download/utils/utils/HFSVolumeHeader.java | 13 -
.../utils/utils/btree/BTreeDescriptor.java | 99 ++++++
.../utils/utils/btree/BTreeHeaderNode.java | 55 ++++
.../utils/utils/btree/BTreeHeaderRecord.java | 168 ++++++++++
.../utils/utils/btree/BTreeIndexNode.java | 36 +++
.../utils/utils/btree/BTreeLeafNode.java | 36 +++
.../utils/utils/btree/BTreeMapNode.java | 36 +++
.../utils/utils/btree/BTreeMapRecord.java | 29 ++
.../download/utils/utils/btree/BTreeNode.java | 42 +++
.../utils/utils/btree/BTreeUserDataRecord.java | 28 ++
.../utils/utils/hfs/HFSVolumeHeader.java | 29 ++
.../utils/utils/hfsplus/HFSPlusExtent.java | 56 ++++
.../utils/utils/hfsplus/HFSPlusFinderInfo.java | 72 +++++
.../utils/utils/hfsplus/HFSPlusForkData.java | 74 +++++
.../utils/hfsplus/HFSPlusVolumeHeader.java | 311 +++++++++++++++++++
.../utils/utils/hfsx/HFSXVolumeHeader.java | 29 ++
npm-flexjs/dependencies/ApacheFalcon.js | 12 +-
35 files changed, 1560 insertions(+), 592 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/DownloadRetriever.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgBlkxBlock.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgBlkxBlock.java
index 0000000,0000000..5bb6bdf
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgBlkxBlock.java
@@@ -1,0 -1,0 +1,125 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils;
++
++import java.io.ByteArrayInputStream;
++import java.io.DataInputStream;
++import java.io.IOException;
++import java.util.ArrayList;
++import java.util.List;
++
++/**
++ * Created by christoferdutz on 25.02.16.
++ */
++public class DmgPropertyListMishBlock {
++
++ private String blockName;
++
++ private int version; // Current version is 1
++ private long sectorNumber; // Starting disk sector in this blkx descriptor
++ private long sectorCount; // Number of disk sectors in this blkx descriptor
++
++ private long dataOffset;
++ private int buffersNeeded;
++ private int blockDescriptors; // Number of descriptors
++
++ private DmgUdifChecksum checksum;
++
++ private List<DmgBlockChunkEntry> blockChunkEntries;
++
++ public DmgPropertyListMishBlock(String blockName, byte[] data) {
++ this.blockName = blockName;
++
++ // Initialize the fields by parsing the input bytes.
++ ByteArrayInputStream bis = new ByteArrayInputStream(data);
++ DataInputStream dis = new DataInputStream(bis);
++ try {
++ dis.readInt();
++ version = dis.readInt();
++ sectorNumber = dis.readLong();
++ sectorCount = dis.readLong();
++ dataOffset = dis.readLong();
++ buffersNeeded = dis.readInt();
++ blockDescriptors = dis.readInt();
++ dis.skipBytes(24);
++ byte[] checksumData = new byte[136];
++ int bytesRead = dis.read(checksumData, 0, 136);
++ if(bytesRead != 136) {
++ throw new IllegalArgumentException(
++ "Invalid DmgPropertyListMishBlock data. Expected to read 136 bytes for 'checksum'");
++ }
++ checksum = new DmgUdifChecksum(checksumData);
++ int numberOfBlockChunks = dis.readInt();
++
++ blockChunkEntries = new ArrayList<DmgBlockChunkEntry>();
++ byte[] blockChunkData = new byte[40];
++ for(int i = 0; i < numberOfBlockChunks; i++) {
++ bytesRead = dis.read(blockChunkData);
++ if(bytesRead != 40) {
++ throw new IllegalArgumentException(
++ "Invalid DmgPropertyListMishBlock data. Expected to read 40 bytes for 'dmg block chunk data'");
++ }
++ DmgBlockChunkEntry entry = new DmgBlockChunkEntry(blockChunkData);
++ // The block with the type "0xFFFFFFFF" is the end-block and contains
++ // no data we could need, so we simply end here.
++ if(entry.getEntryType() == 0xFFFFFFFF) {
++ break;
++ }
++ blockChunkEntries.add(entry);
++ }
++ } catch (IOException e) {
++ throw new IllegalArgumentException("Invalid DmgPropertyListMishBlock data.");
++ }
++ }
++
++ public String getBlockName() {
++ return blockName;
++ }
++
++ public int getVersion() {
++ return version;
++ }
++
++ public long getSectorNumber() {
++ return sectorNumber;
++ }
++
++ public long getSectorCount() {
++ return sectorCount;
++ }
++
++ public long getDataOffset() {
++ return dataOffset;
++ }
++
++ public int getBuffersNeeded() {
++ return buffersNeeded;
++ }
++
++ public int getBlockDescriptors() {
++ return blockDescriptors;
++ }
++
++ public DmgUdifChecksum getChecksum() {
++ return checksum;
++ }
++
++ public List<DmgBlockChunkEntry> getBlockChunkEntries() {
++ return blockChunkEntries;
++ }
++
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeDescriptor.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeDescriptor.java
index 0000000,0000000..d749865
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeDescriptor.java
@@@ -1,0 -1,0 +1,99 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils.btree;
++
++import java.io.DataInputStream;
++import java.io.IOException;
++
++/**
++ * Created by christoferdutz on 15.04.17.
++ */
++public class HFSPlusBTreeDescriptor {
++
++ private int fLink;
++ private int bLink;
++ private BTreeNodeType kind;
++ private byte height;
++ private short numRecords;
++
++ public HFSPlusBTreeDescriptor(DataInputStream dis) {
++ try {
++ fLink = dis.readInt();
++ bLink = dis.readInt();
++ switch(dis.readByte()) {
++ case -1:
++ kind = BTreeNodeType.LEAF_NODE;
++ break;
++ case 0:
++ kind = BTreeNodeType.INDEX_NODE;
++ break;
++ case 1:
++ kind = BTreeNodeType.HEADER_NODE;
++ break;
++ case 2:
++ kind = BTreeNodeType.MAP_NODE;
++ break;
++ default:
++ throw new IllegalArgumentException("Invalid HFSPlusBTreeDescriptor data. Unknown node type.");
++ }
++ height = dis.readByte();
++ numRecords = dis.readShort();
++ dis.readShort();
++ } catch (IOException e) {
++ throw new IllegalArgumentException("Invalid HFSPlusBTreeDescriptor data.");
++ }
++ }
++
++ public int getfLink() {
++ return fLink;
++ }
++
++ public int getbLink() {
++ return bLink;
++ }
++
++ public BTreeNodeType getKind() {
++ return kind;
++ }
++
++ public byte getHeight() {
++ return height;
++ }
++
++ public short getNumRecords() {
++ return numRecords;
++ }
++
++ @Override
++ public String toString() {
++ return "HFSPlusBTreeDescriptor{" +
++ "fLink=" + fLink +
++ ", bLink=" + bLink +
++ ", kind=" + kind +
++ ", height=" + height +
++ ", numRecords=" + numRecords +
++ '}';
++ }
++
++ public enum BTreeNodeType {
++ LEAF_NODE,
++ INDEX_NODE,
++ HEADER_NODE,
++ MAP_NODE
++ }
++
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeHeaderNode.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeHeaderNode.java
index 0000000,0000000..002a03b
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeHeaderNode.java
@@@ -1,0 -1,0 +1,55 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils.btree;
++
++import java.io.DataInputStream;
++
++/**
++ * Created by christoferdutz on 15.04.17.
++ */
++public class HFSPlusBTreeHeaderNode extends HFSPlusBTreeNode {
++
++ private HFSPlusBTreeHeaderRecord headerRecord;
++ private HFSPlusBTreeUserDataRecord userDataRecord;
++ private HFSPlusBTreeMapRecord mapRecord;
++
++ public HFSPlusBTreeHeaderNode(DataInputStream dis) {
++ super(dis);
++ }
++
++ public HFSPlusBTreeHeaderRecord getHeaderRecord() {
++ return headerRecord;
++ }
++
++ public HFSPlusBTreeUserDataRecord getUserDataRecord() {
++ return userDataRecord;
++ }
++
++ public HFSPlusBTreeMapRecord getMapRecord() {
++ return mapRecord;
++ }
++
++ @Override
++ public String toString() {
++ return "HFSPlusBTreeHeaderNode{" +
++ super.toString() +
++ "headerRecord=" + headerRecord +
++ ", userDataRecord=" + userDataRecord +
++ ", mapRecord=" + mapRecord +
++ '}';
++ }
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeHeaderRecord.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeHeaderRecord.java
index 0000000,0000000..ca1b234
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeHeaderRecord.java
@@@ -1,0 -1,0 +1,168 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils.btree;
++
++import java.io.DataInputStream;
++import java.io.IOException;
++
++/**
++ * Created by christoferdutz on 15.04.17.
++ */
++public class HFSPlusBTreeHeaderRecord {
++
++ private short treeDepth;
++ private int rootNode;
++ private int leafRecords;
++ private int firstLeafNode;
++ private int lastLeafNode;
++ private short nodeSize;
++ private short maxKeyLength;
++ private int totalNodes;
++ private int freeNodes;
++ //private short reserved1;
++ private int clumpSize;
++ private byte btreeType;
++ private byte keyCompareType;
++ private int attributes;
++ //private int reserved3[16];
++
++ public HFSPlusBTreeHeaderRecord(DataInputStream dis) {
++ try {
++ treeDepth = dis.readShort();
++ rootNode = dis.readInt();
++ leafRecords = dis.readInt();
++ firstLeafNode = dis.readInt();
++ lastLeafNode = dis.readInt();
++ nodeSize = dis.readShort();
++ maxKeyLength = dis.readShort();
++ totalNodes = dis.readInt();
++ freeNodes = dis.readInt();
++ dis.readShort();
++ clumpSize = dis.readInt();
++ btreeType = dis.readByte();
++ keyCompareType = dis.readByte();
++ attributes = dis.readInt();
++ // read 16 bytes ...
++ if(dis.read(new byte[16]) != 16) {
++ throw new IllegalArgumentException("Invalid HFSPlusBTreeHeaderRecord data.");
++ }
++ } catch (IOException e) {
++ throw new IllegalArgumentException("Invalid HFSPlusBTreeHeaderRecord data.");
++ }
++ }
++
++ /**
++ * @return The current depth of the B-tree. Always equal to the height field of the root node.
++ */
++ public short getTreeDepth() {
++ return treeDepth;
++ }
++
++ /**
++ * @return The node number of the root node, the index node that acts as the root of the B-tree.
++ */
++ public int getRootNode() {
++ return rootNode;
++ }
++
++ /**
++ * @return The total number of records contained in all of the leaf nodes.
++ */
++ public int getLeafRecords() {
++ return leafRecords;
++ }
++
++ /**
++ * @return The node number of the first leaf node. This may be zero if there are no leaf nodes.
++ */
++ public int getFirstLeafNode() {
++ return firstLeafNode;
++ }
++
++ /**
++ * @return The node number of the last leaf node. This may be zero if there are no leaf nodes.
++ */
++ public int getLastLeafNode() {
++ return lastLeafNode;
++ }
++
++ /**
++ * @return The size, in bytes, of a node. This is a power of two, from 512 through 32,768, inclusive.
++ */
++ public short getNodeSize() {
++ return nodeSize;
++ }
++
++ /**
++ * @return The maximum length of a key in an index or leaf node.
++ */
++ public short getMaxKeyLength() {
++ return maxKeyLength;
++ }
++
++ /**
++ * @return The total number of nodes (be they free or used) in the B-tree.
++ */
++ public int getTotalNodes() {
++ return totalNodes;
++ }
++
++ /**
++ * @return The number of unused nodes in the B-tree.
++ */
++ public int getFreeNodes() {
++ return freeNodes;
++ }
++
++ /**
++ * @return clumpSize
++ */
++ public int getClumpSize() {
++ return clumpSize;
++ }
++
++ public byte getBtreeType() {
++ return btreeType;
++ }
++
++ public byte getKeyCompareType() {
++ return keyCompareType;
++ }
++
++ public int getAttributes() {
++ return attributes;
++ }
++
++ @Override
++ public String toString() {
++ return "HFSPlusBTreeHeaderRecord{" +
++ "treeDepth=" + treeDepth +
++ ", rootNode=" + rootNode +
++ ", leafRecords=" + leafRecords +
++ ", firstLeafNode=" + firstLeafNode +
++ ", lastLeafNode=" + lastLeafNode +
++ ", nodeSize=" + nodeSize +
++ ", maxKeyLength=" + maxKeyLength +
++ ", totalNodes=" + totalNodes +
++ ", freeNodes=" + freeNodes +
++ ", clumpSize=" + clumpSize +
++ ", btreeType=" + btreeType +
++ ", keyCompareType=" + keyCompareType +
++ ", attributes=" + attributes +
++ '}';
++ }
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeIndexNode.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeIndexNode.java
index 0000000,0000000..ca25cc2
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeIndexNode.java
@@@ -1,0 -1,0 +1,36 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils.btree;
++
++import java.io.DataInputStream;
++
++/**
++ * Created by christoferdutz on 15.04.17.
++ */
++public class HFSPlusBTreeIndexNode extends HFSPlusBTreeNode {
++
++ public HFSPlusBTreeIndexNode(DataInputStream dis) {
++ super(dis);
++ }
++
++ @Override
++ public String toString() {
++ return "HFSPlusBTreeIndexNode{" +
++ super.toString() +
++ "}";
++ }
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeLeafNode.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeLeafNode.java
index 0000000,0000000..b413ab4
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeLeafNode.java
@@@ -1,0 -1,0 +1,36 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils.btree;
++
++import java.io.DataInputStream;
++
++/**
++ * Created by christoferdutz on 15.04.17.
++ */
++public class HFSPlusBTreeLeafNode extends HFSPlusBTreeNode {
++
++ public HFSPlusBTreeLeafNode(DataInputStream dis) {
++ super(dis);
++ }
++
++ @Override
++ public String toString() {
++ return "HFSPlusBTreeLeafNode{" +
++ super.toString() +
++ "}";
++ }
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeMapNode.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeMapNode.java
index 0000000,0000000..55dad9d
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeMapNode.java
@@@ -1,0 -1,0 +1,36 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils.btree;
++
++import java.io.DataInputStream;
++
++/**
++ * Created by christoferdutz on 15.04.17.
++ */
++public class HFSPlusBTreeMapNode extends HFSPlusBTreeNode {
++
++ public HFSPlusBTreeMapNode(DataInputStream dis) {
++ super(dis);
++ }
++
++ @Override
++ public String toString() {
++ return "HFSPlusBTreeMapNode{" +
++ super.toString() +
++ "}";
++ }
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeMapRecord.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeMapRecord.java
index 0000000,0000000..8d6c90e
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeMapRecord.java
@@@ -1,0 -1,0 +1,29 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils.btree;
++
++/**
++ * Created by christoferdutz on 15.04.17.
++ */
++public class HFSPlusBTreeMapRecord {
++
++ @Override
++ public String toString() {
++ return "HFSPlusBTreeMapRecord{}";
++ }
++
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeNode.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeNode.java
index 0000000,0000000..4a0e52a
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeNode.java
@@@ -1,0 -1,0 +1,42 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils.btree;
++
++import java.io.DataInputStream;
++
++/**
++ * Created by christoferdutz on 15.04.17.
++ */
++public abstract class HFSPlusBTreeNode {
++
++ private HFSPlusBTreeDescriptor nodeDescriptor;
++
++ public HFSPlusBTreeNode(DataInputStream dis) {
++ this.nodeDescriptor = new HFSPlusBTreeDescriptor(dis);
++ }
++
++ public HFSPlusBTreeDescriptor getNodeDescriptor() {
++ return nodeDescriptor;
++ }
++
++ @Override
++ public String toString() {
++ return "HFSPlusBTreeNode{" +
++ "nodeDescriptor=" + nodeDescriptor +
++ '}';
++ }
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeUserDataRecord.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeUserDataRecord.java
index 0000000,0000000..0b7d69f
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/btree/BTreeUserDataRecord.java
@@@ -1,0 -1,0 +1,28 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils.btree;
++
++/**
++ * Created by christoferdutz on 15.04.17.
++ */
++public class HFSPlusBTreeUserDataRecord {
++
++ @Override
++ public String toString() {
++ return "HFSPlusBTreeUserDataRecord{}";
++ }
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfs/HFSVolumeHeader.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfs/HFSVolumeHeader.java
index 0000000,0000000..0895fcd
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfs/HFSVolumeHeader.java
@@@ -1,0 -1,0 +1,29 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils;
++
++import java.io.DataInputStream;
++
++/**
++ * Created by christoferdutz on 27.02.16.
++ */
++public class HFSVolumeHeader implements IHFSVolumeHeader {
++
++ public HFSVolumeHeader(DataInputStream dis) {
++ }
++
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusExtent.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusExtent.java
index 0000000,0000000..d8136e1
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusExtent.java
@@@ -1,0 -1,0 +1,56 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils;
++
++import java.io.DataInputStream;
++import java.io.IOException;
++import java.util.ArrayList;
++
++/**
++ * Created by christoferdutz on 27.02.16.
++ */
++public class HFSPlusExtent {
++
++ private int startBlock;
++ private int blockCount;
++
++ public HFSPlusExtent(DataInputStream dis) {
++ try {
++ startBlock = dis.readInt();
++ blockCount = dis.readInt();
++ } catch (IOException e) {
++ throw new IllegalArgumentException("Invalid HFSPlusVolumeHeader data.");
++ }
++ }
++
++ public int getStartBlock() {
++ return startBlock;
++ }
++
++ public int getBlockCount() {
++ return blockCount;
++ }
++
++ @Override
++ public String toString() {
++ return "HFSPlusExtent{" +
++ "startBlock=" + startBlock +
++ ", blockCount=" + blockCount +
++ '}';
++ }
++
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusFinderInfo.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusFinderInfo.java
index 0000000,0000000..6a0a188
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusFinderInfo.java
@@@ -1,0 -1,0 +1,72 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils;
++
++import java.io.DataInputStream;
++import java.io.IOException;
++
++/**
++ * Created by christoferdutz on 15.04.17.
++ */
++public class HFSPlusFinderInfo {
++
++ private int bootableSystemDirectoryId;
++ private int startupApplicationParentDirectoryId;
++ private int onMountOpenDirectoryId;
++ private int bootableMacOs8Or9SystemDirectoryId;
++ private int bootableMacOsXSystemDirectoryId;
++ private long uniqueVolumeIdentifyer;
++
++ public HFSPlusFinderInfo(DataInputStream dis) {
++ try {
++ bootableSystemDirectoryId = dis.readInt();
++ startupApplicationParentDirectoryId = dis.readInt();
++ onMountOpenDirectoryId = dis.readInt();
++ bootableMacOs8Or9SystemDirectoryId = dis.readInt();
++ dis.readInt();
++ bootableMacOsXSystemDirectoryId = dis.readInt();
++ uniqueVolumeIdentifyer = dis.readLong();
++ } catch (IOException e) {
++ throw new IllegalArgumentException("Invalid HFSPlusVolumeHeader data.");
++ }
++ }
++
++ public int getBootableSystemDirectoryId() {
++ return bootableSystemDirectoryId;
++ }
++
++ public int getStartupApplicationParentDirectoryId() {
++ return startupApplicationParentDirectoryId;
++ }
++
++ public int getOnMountOpenDirectoryId() {
++ return onMountOpenDirectoryId;
++ }
++
++ public int getBootableMacOs8Or9SystemDirectoryId() {
++ return bootableMacOs8Or9SystemDirectoryId;
++ }
++
++ public int getBootableMacOsXSystemDirectoryId() {
++ return bootableMacOsXSystemDirectoryId;
++ }
++
++ public long getUniqueVolumeIdentifyer() {
++ return uniqueVolumeIdentifyer;
++ }
++
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusForkData.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusForkData.java
index 0000000,0000000..ae67f34
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusForkData.java
@@@ -1,0 -1,0 +1,74 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils;
++
++import java.io.DataInputStream;
++import java.io.IOException;
++import java.util.ArrayList;
++import java.util.List;
++
++/**
++ * Created by christoferdutz on 26.02.16.
++ */
++public class HFSPlusForkData {
++
++ private long logicalSize;
++ private int clumpSize;
++ private int totalBlocks;
++ private List<HFSPlusExtent> extents;
++
++ public HFSPlusForkData(DataInputStream dis) {
++ try {
++ logicalSize = dis.readLong();
++ clumpSize = dis.readInt();
++ totalBlocks = dis.readInt();
++ extents = new ArrayList<HFSPlusExtent>(8);
++ for(int i = 0; i < 8; i++) {
++ HFSPlusExtent extent = new HFSPlusExtent(dis);
++ extents.add(extent);
++ }
++ } catch (IOException e) {
++ throw new IllegalArgumentException("Invalid HFSPlusVolumeHeader data.");
++ }
++ }
++
++ public long getLogicalSize() {
++ return logicalSize;
++ }
++
++ public int getClumpSize() {
++ return clumpSize;
++ }
++
++ public int getTotalBlocks() {
++ return totalBlocks;
++ }
++
++ public List<HFSPlusExtent> getExtents() {
++ return extents;
++ }
++
++ @Override
++ public String toString() {
++ return "HFSPlusForkData{" +
++ "logicalSize=" + logicalSize +
++ ", clumpSize=" + clumpSize +
++ ", totalBlocks=" + totalBlocks +
++ ", extents=" + extents +
++ '}';
++ }
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusVolumeHeader.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusVolumeHeader.java
index 0000000,0000000..6e23de0
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsplus/HFSPlusVolumeHeader.java
@@@ -1,0 -1,0 +1,311 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils;
++
++import java.io.DataInputStream;
++import java.io.IOException;
++import java.util.Arrays;
++import java.util.Date;
++
++/**
++ * http://www.dubeyko.com/development/FileSystems/HFSPLUS/hexdumps/hfsplus_volume_header.html
++ * http://dubeiko.com/development/FileSystems/HFSPLUS/tn1150.html
++ * http://dubeyko.com/development/FileSystems/HFSPLUS/tn1150.html#CatalogFile
++ *
++ * Created by christoferdutz on 24.02.16.
++ */
++public class HFSPlusVolumeHeader implements IHFSVolumeHeader {
++
++ private static final int VOLUME_UNMOUNTED = 0x0100;
++ private static final int VOLUME_SPARED_BLOCKS = 0x0200;
++ private static final int VOLUME_NOCACHE_REQUIRED = 0x0400;
++ private static final int BOOT_VOLUME_INCONSISTENT = 0x0800;
++ private static final int CATALOG_NODE_IDS_REUSED = 0x1000;
++ private static final int VOLUME_JOURNALED = 0x2000;
++ private static final int VOLUME_SOFTWARE_LOCK= 0x8000;
++
++ private static final long UNSIGNED_INT_BITS = 0xFFFFFFFFL;
++ private static final long CONVERT_MAC_TO_JAVA_TIME = 2082880800L;
++
++ private short version;
++ private int attributes;
++ private int lastMountedVersion;
++ private int journalInfoBlock;
++
++ private Date createDate;
++ private Date modifyDate;
++ private Date backupDate;
++ private Date checkedDate;
++
++ private int fileCount;
++ private int folderCount;
++
++ private int blockSize;
++ private int totalBlocks;
++ private int freeBlocks;
++
++ private int nextAllocation;
++ private int rsrcClumpSize;
++ private int nextCatalogID;
++ private int dataClumpSize;
++
++ private int writeCount;
++ private long encodingsBitmap;
++
++ private HFSPlusFinderInfo finderInfo;
++
++ private HFSPlusForkData allocationFile;
++ private HFSPlusForkData extentsFile;
++ private HFSPlusForkData catalogFile;
++ private HFSPlusForkData attributesFile;
++ private HFSPlusForkData startupFile;
++
++ public HFSPlusVolumeHeader(DataInputStream dis) {
++ try {
++ version = dis.readShort();
++ attributes = dis.readInt();
++ lastMountedVersion = dis.readInt();
++ journalInfoBlock = dis.readInt();
++
++ createDate = readMacDate(dis);
++ modifyDate = readMacDate(dis);
++ backupDate = readMacDate(dis);
++ checkedDate = readMacDate(dis);
++
++ fileCount = dis.readInt();
++ folderCount = dis.readInt();
++
++ blockSize = dis.readInt();
++ totalBlocks = dis.readInt();
++ freeBlocks = dis.readInt();
++
++ nextAllocation = dis.readInt();
++ rsrcClumpSize = dis.readInt();
++ dataClumpSize = dis.readInt();
++ nextCatalogID = dis.readInt();
++
++ writeCount = dis.readInt();
++ encodingsBitmap = dis.readLong();
++
++ finderInfo = new HFSPlusFinderInfo(dis);
++
++ allocationFile = new HFSPlusForkData(dis);
++ extentsFile = new HFSPlusForkData(dis);
++ catalogFile = new HFSPlusForkData(dis);
++ attributesFile = new HFSPlusForkData(dis);
++ startupFile = new HFSPlusForkData(dis);
++ } catch (IOException e) {
++ throw new IllegalArgumentException("Invalid HFSPlusVolumeHeader data.");
++ }
++ }
++
++ public short getVersion() {
++ return version;
++ }
++
++ public int getAttributes() {
++ return attributes;
++ }
++
++ /**
++ * @return true if the volume was correctly flushed before being unmounted or ejected.
++ */
++ public boolean isVolumeUnmounted() {
++ return (attributes & VOLUME_UNMOUNTED) != 0;
++ }
++
++ /**
++ * @return true if there are any records in the extents overflow file for bad blocks
++ * (belonging to file ID kHFSBadBlockFileID).
++ */
++ public boolean isSparedBlocks() {
++ return (attributes & VOLUME_SPARED_BLOCKS) != 0;
++ }
++
++ /**
++ * @return true if the blocks from this volume should not be cached.
++ */
++ public boolean isNoCacheRequired() {
++ return (attributes & VOLUME_NOCACHE_REQUIRED) != 0;
++ }
++
++ /**
++ * @return true if the volume was NOT correctly flushed before being unmounted or ejected.
++ */
++ public boolean isBootVolumeInconsistent() {
++ return (attributes & BOOT_VOLUME_INCONSISTENT) != 0;
++ }
++
++ /**
++ * @return true when the nextCatalogID field overflows 32 bits, forcing smaller catalog node
++ * IDs to be reused. When this bit is set, it is common (and not an error) for catalog records
++ * to exist with IDs greater than or equal to nextCatalogID.
++ */
++ public boolean isCatalogIdsReused() {
++ return (attributes & CATALOG_NODE_IDS_REUSED) != 0;
++ }
++
++ /**
++ * @return true if the volume has a journal.*2
++ *
++ */
++ public boolean isVolumeJournaled() {
++ return (attributes & VOLUME_JOURNALED) != 0;
++ }
++
++ /**
++ * @return true if the volume is write-protected due to a software setting. Any implementations
++ * must refuse to write to a volume with this bit set.
++ */
++ public boolean isVolumeSoftwareLocked() {
++ return (attributes & VOLUME_SOFTWARE_LOCK) != 0;
++ }
++
++ public int getLastMountedVersion() {
++ return lastMountedVersion;
++ }
++
++ public int getJournalInfoBlock() {
++ return journalInfoBlock;
++ }
++
++ public Date getCreateDate() {
++ return createDate;
++ }
++
++ public Date getModifyDate() {
++ return modifyDate;
++ }
++
++ public Date getBackupDate() {
++ return backupDate;
++ }
++
++ public Date getCheckedDate() {
++ return checkedDate;
++ }
++
++ public int getFileCount() {
++ return fileCount;
++ }
++
++ public int getFolderCount() {
++ return folderCount;
++ }
++
++ public int getBlockSize() {
++ return blockSize;
++ }
++
++ public int getTotalBlocks() {
++ return totalBlocks;
++ }
++
++ public int getFreeBlocks() {
++ return freeBlocks;
++ }
++
++ public int getNextAllocation() {
++ return nextAllocation;
++ }
++
++ public int getRsrcClumpSize() {
++ return rsrcClumpSize;
++ }
++
++ public int getDataClumpSize() {
++ return dataClumpSize;
++ }
++
++ public int getWriteCount() {
++ return writeCount;
++ }
++
++ public long getEncodingsBitmap() {
++ return encodingsBitmap;
++ }
++
++ public int getNextCatalogID() {
++ return nextCatalogID;
++ }
++
++ public HFSPlusFinderInfo getFinderInfo() {
++ return finderInfo;
++ }
++
++ public HFSPlusForkData getAllocationFile() {
++ return allocationFile;
++ }
++
++ public HFSPlusForkData getExtentsFile() {
++ return extentsFile;
++ }
++
++ public HFSPlusForkData getCatalogFile() {
++ return catalogFile;
++ }
++
++ public HFSPlusForkData getAttributesFile() {
++ return attributesFile;
++ }
++
++ public HFSPlusForkData getStartupFile() {
++ return startupFile;
++ }
++
++ /**
++ * Convert the dates saved as HFS+ date (32 bit integer representing the number
++ * of seconds since 01.01.1994) to java dates.
++ * @param dis input stream to read from.
++ * @return Date in Java representation (number of milliseconds since 01.01.1970)
++ * @throws IOException something went wrong.
++ */
++ private Date readMacDate(DataInputStream dis) throws IOException {
++ return new Date(((UNSIGNED_INT_BITS & dis.readInt()) - CONVERT_MAC_TO_JAVA_TIME) * 1000);
++ }
++
++ @Override
++ public String toString() {
++ return "HFSPlusVolumeHeader{" +
++ "version=" + version +
++ ", attributes=" + attributes +
++ ", lastMountedVersion=" + lastMountedVersion +
++ ", journalInfoBlock=" + journalInfoBlock +
++ ", createDate=" + createDate +
++ ", modifyDate=" + modifyDate +
++ ", backupDate=" + backupDate +
++ ", checkedDate=" + checkedDate +
++ ", fileCount=" + fileCount +
++ ", folderCount=" + folderCount +
++ ", blockSize=" + blockSize +
++ ", totalBlocks=" + totalBlocks +
++ ", freeBlocks=" + freeBlocks +
++ ", nextAllocation=" + nextAllocation +
++ ", rsrcClumpSize=" + rsrcClumpSize +
++ ", nextCatalogID=" + nextCatalogID +
++ ", dataClumpSize=" + dataClumpSize +
++ ", writeCount=" + writeCount +
++ ", encodingsBitmap=" + encodingsBitmap +
++ ", finderInfo=" + finderInfo +
++ ", allocationFile=" + allocationFile +
++ ", extentsFile=" + extentsFile +
++ ", catalogFile=" + catalogFile +
++ ", attributesFile=" + attributesFile +
++ ", startupFile=" + startupFile +
++ '}';
++ }
++}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/d0cef423/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsx/HFSXVolumeHeader.java
----------------------------------------------------------------------
diff --cc flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsx/HFSXVolumeHeader.java
index 0000000,0000000..e395c7a
new file mode 100644
--- /dev/null
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/hfsx/HFSXVolumeHeader.java
@@@ -1,0 -1,0 +1,29 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++package org.apache.flex.utilities.converter.retrievers.download.utils.utils;
++
++import java.io.DataInputStream;
++
++/**
++ * Created by christoferdutz on 27.02.16.
++ */
++public class HFSXVolumeHeader implements IHFSVolumeHeader {
++
++ public HFSXVolumeHeader(DataInputStream dis) {
++ }
++
++}