You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2013/04/12 15:05:27 UTC
[3/4] git commit: [FalconJX] marmotinni file management
[FalconJX] marmotinni file management
When running tests, file management control is passed from the publisher to 'marmotinni'.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/50b3ffea
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/50b3ffea
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/50b3ffea
Branch: refs/heads/develop
Commit: 50b3ffea164df744eab81808f0963283fc547fd5
Parents: 92adca3
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Apr 12 09:30:25 2013 +0200
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Apr 12 09:30:25 2013 +0200
----------------------------------------------------------------------
.../codegen/mxml/flexjs/MXMLFlexJSPublisher.java | 32 ++++++++++----
1 files changed, 23 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/50b3ffea/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
index b5e0bf0..8031e03 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
@@ -71,6 +71,8 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
@Override
public void publish() throws IOException
{
+ final boolean isMarmotinniRun = ((JSGoogConfiguration) configuration)
+ .getMarmotinni() != null;
final String intermediateDirPath = outputFolder.getPath();
final String projectName = FilenameUtils.getBaseName(configuration
@@ -80,9 +82,14 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
File releaseDir = new File(outputParentFolder, FLEXJS_RELEASE_DIR_NAME);
final String releaseDirPath = releaseDir.getPath();
- if (releaseDir.exists())
- org.apache.commons.io.FileUtils.deleteQuietly(releaseDir);
- releaseDir.mkdirs();
+
+ if (!isMarmotinniRun)
+ {
+ if (releaseDir.exists())
+ org.apache.commons.io.FileUtils.deleteQuietly(releaseDir);
+
+ releaseDir.mkdirs();
+ }
final String closureLibDirPath = ((JSGoogConfiguration) configuration)
.getClosureLib();
@@ -109,7 +116,8 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
appendExportSymbol(projectIntermediateJSFilePath, projectName);
- copyFile(sdkJSLibSrcDirPath, sdkJSLibTgtDirPath);
+ if (!isMarmotinniRun)
+ copyFile(sdkJSLibSrcDirPath, sdkJSLibTgtDirPath);
boolean isWindows = System.getProperty("os.name").indexOf("Mac") == -1;
@@ -136,8 +144,11 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
}
}
- copyFile(closureGoogSrcLibDirPath, closureGoogTgtLibDirPath);
- copyFile(closureTPSrcLibDirPath, closureTPTgtLibDirPath);
+ if (!isMarmotinniRun)
+ {
+ copyFile(closureGoogSrcLibDirPath, closureGoogTgtLibDirPath);
+ copyFile(closureTPSrcLibDirPath, closureTPTgtLibDirPath);
+ }
File srcDeps = new File(depsSrcFilePath);
@@ -181,9 +192,12 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements
appendSourceMapLocation(projectReleaseJSFilePath, projectName);
- org.apache.commons.io.FileUtils.deleteQuietly(srcDeps);
- org.apache.commons.io.FileUtils.moveFile(new File(depsTgtFilePath),
- srcDeps);
+ if (!isMarmotinniRun)
+ {
+ org.apache.commons.io.FileUtils.deleteQuietly(srcDeps);
+ org.apache.commons.io.FileUtils.moveFile(new File(depsTgtFilePath),
+ srcDeps);
+ }
System.out.println("The project '"
+ projectName