flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1409957 [9/12] - in /incubator/flex/utilities/trunk: common/.settings/ common/src/assets/styles/ common/src/org/apache/flex/utilities/common/ common/src/org/apache/flex/utilities/common/controls/ common/src/org/apache/flex/utilities/common...
Date Thu, 15 Nov 2012 19:56:39 GMT
Modified: incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirFrameworkGenerator.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirFrameworkGenerator.java?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirFrameworkGenerator.java (original)
+++ incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirFrameworkGenerator.java Thu Nov 15 19:56:32 2012
@@ -14,150 +14,150 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package air;
-
-import common.BaseGenerator;
-import common.MavenMetadata;
-import org.w3c.dom.Document;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Created with IntelliJ IDEA.
- * User: cdutz
- * Date: 11.05.12
- * Time: 14:55
- */
-public class AirFrameworkGenerator extends BaseGenerator {
-
-    protected Map<String, String> libraryVersions = new HashMap<String, String>();
-    protected Map<String, String> libraryLocations = new HashMap<String, String>();
-
-    public void process(File sdkSourceDirectory, final boolean isApache, File sdkTargetDirectory, String sdkVersion)
-            throws Exception
-    {
-        final File frameworksDirectory = new File(sdkSourceDirectory, "frameworks");
-        final File targetBaseDirectory = new File(sdkTargetDirectory, "com/adobe/air/framework");
-
-        // Generate the artifacts based upon the structure of the libraries in the lib-directory.
-        final File swcsDirectory = new File(frameworksDirectory, "libs/air");
-        generateArtifactsForDirectory(
-                swcsDirectory, targetBaseDirectory, sdkVersion, "com.adobe.air.framework");
-    }
-
-    protected void generateArtifactsForDirectory(
-            final File sourceDirectory, final File targetDirectory, final String sdkVersion, final String groupId)
-            throws Exception
-    {
-        final MavenMetadata groupMetadata = new MavenMetadata();
-        groupMetadata.setGroupId(groupId);
-        groupMetadata.setArtifactId(groupId.substring(groupId.lastIndexOf(".") + 1, groupId.length()));
-        groupMetadata.setVersion(sdkVersion);
-        groupMetadata.setPackaging("pom");
-        groupMetadata.setLibrariesWithResourceBundles(new ArrayList<String>());
-        groupMetadata.setDependencies(new ArrayList<MavenMetadata>());
-
-        // Don't deploy the player, as this has to be dealt with differently.
-        final File[] directoryContent = sourceDirectory.listFiles(new FileFilter() {
-            public boolean accept(File pathname) {
-                return pathname.getName().endsWith(".swc");
-            }
-        });
-
-        if(directoryContent != null) {
-            for(File file : directoryContent) {
-                final MavenMetadata metadata = new MavenMetadata();
-                metadata.setGroupId(groupId);
-                String libraryName = file.getName().substring(0, file.getName().lastIndexOf("."));
-
-                String libraryVersion = libraryVersions.get(libraryName);
-                if(libraryVersion == null) {
-                    libraryVersion = sdkVersion;
-                }
-                final File targetSwcDirectory = new File(targetDirectory, libraryName + "/" + libraryVersion);
-                if(!targetSwcDirectory.exists()) {
-                    if(!targetSwcDirectory.mkdirs()) {
-                        throw new RuntimeException(
-                                "Could not create directory: " + targetSwcDirectory.getAbsolutePath());
-                    }
-                }
-                final File targetSwcFile =
-                        new File(targetSwcDirectory, libraryName + "-" + libraryVersion + ".swc");
-                copyFile(file, targetSwcFile);
-
-                metadata.setArtifactId(libraryName);
-                metadata.setVersion(libraryVersion);
-                metadata.setPackaging("swc");
-
-                generateSwcPom(targetSwcFile, metadata);
-
-                groupMetadata.getDependencies().add(metadata);
-
-                // Save the checksum and metadata of the playerglobal, so we can
-                // find out which air sdk is used when deploying the flex sdks later
-                // on.
-                if("airglobal".equals(libraryName)) {
-                    final String checksum = calculateChecksum(file);
-                    checksums.put(checksum, metadata);
-                }
-
-                libraryLocations.put(libraryName, targetSwcDirectory.getAbsolutePath());
-                libraryVersions.put(libraryName, libraryVersion);
-            }
-        }
-
-        final MavenMetadata commonFrameworkMetaData = new MavenMetadata();
-        commonFrameworkMetaData.setGroupId(groupMetadata.getGroupId());
-        commonFrameworkMetaData.setArtifactId("common-framework");
-        commonFrameworkMetaData.setVersion(groupMetadata.getVersion());
-        commonFrameworkMetaData.setPackaging("pom");
-        commonFrameworkMetaData.setDependencies(new ArrayList<MavenMetadata>());
-        commonFrameworkMetaData.setLibrariesWithResourceBundles(new ArrayList<String>());
-
-        for(final MavenMetadata dependency : groupMetadata.getDependencies()) {
-            commonFrameworkMetaData.getDependencies().add(dependency);
-            if(groupMetadata.getLibrariesWithResourceBundles().contains(dependency.getArtifactId())) {
-                commonFrameworkMetaData.getLibrariesWithResourceBundles().add(dependency.getArtifactId());
-            }
-        }
-        final File commonFrameworkPom = new File(targetDirectory,
-                "common-framework/" + groupMetadata.getVersion() + "/common-framework-" +
-                        groupMetadata.getVersion() + ".pom");
-        generateSwcPom(commonFrameworkPom, commonFrameworkMetaData);
-
-        // Generate a dummy entry for the "flex-framework" pom,
-        // which will be generated later in the process.
-        final MavenMetadata flexFrameworkMetadata = new MavenMetadata();
-        flexFrameworkMetadata.setGroupId(groupMetadata.getGroupId());
-        flexFrameworkMetadata.setArtifactId("flex-framework");
-        flexFrameworkMetadata.setVersion(groupMetadata.getVersion());
-        flexFrameworkMetadata.setPackaging("pom");
-        groupMetadata.getDependencies().add(flexFrameworkMetadata);
-
-        // Generate the master pom for the current library (Pom that defines
-        // all versions of the current sdk libraries.
-        final File groupPomFile = new File(targetDirectory,
-                groupMetadata.getVersion() + "/" + groupMetadata.getArtifactId() + "-" +
-                        groupMetadata.getVersion() + ".pom");
-        generateDependencyManagementPom(groupPomFile, groupMetadata);
-    }
-
-    protected void generateSwcPom(final File targetSwc, final MavenMetadata metadata) throws Exception {
-        final String swcPath = targetSwc.getAbsolutePath();
-        final String pomPath = swcPath.substring(0, swcPath.lastIndexOf(".")) + ".pom";
-
-        final Document pom = createPomDocument(metadata);
-
-        writeDocument(pom, new File(pomPath));
-    }
-
-    protected void generateDependencyManagementPom(final File targetSwc, final MavenMetadata metadata) throws Exception {
-        final String swcPath = targetSwc.getAbsolutePath();
-        final String pomPath = swcPath.substring(0, swcPath.lastIndexOf(".")) + ".pom";
-
-        final Document pom = createPomDocumentDependencyManagement(metadata);
-
-        writeDocument(pom, new File(pomPath));
-    }
-}
+package air;
+
+import common.BaseGenerator;
+import common.MavenMetadata;
+import org.w3c.dom.Document;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: cdutz
+ * Date: 11.05.12
+ * Time: 14:55
+ */
+public class AirFrameworkGenerator extends BaseGenerator {
+
+    protected Map<String, String> libraryVersions = new HashMap<String, String>();
+    protected Map<String, String> libraryLocations = new HashMap<String, String>();
+
+    public void process(File sdkSourceDirectory, final boolean isApache, File sdkTargetDirectory, String sdkVersion)
+            throws Exception
+    {
+        final File frameworksDirectory = new File(sdkSourceDirectory, "frameworks");
+        final File targetBaseDirectory = new File(sdkTargetDirectory, "com/adobe/air/framework");
+
+        // Generate the artifacts based upon the structure of the libraries in the lib-directory.
+        final File swcsDirectory = new File(frameworksDirectory, "libs/air");
+        generateArtifactsForDirectory(
+                swcsDirectory, targetBaseDirectory, sdkVersion, "com.adobe.air.framework");
+    }
+
+    protected void generateArtifactsForDirectory(
+            final File sourceDirectory, final File targetDirectory, final String sdkVersion, final String groupId)
+            throws Exception
+    {
+        final MavenMetadata groupMetadata = new MavenMetadata();
+        groupMetadata.setGroupId(groupId);
+        groupMetadata.setArtifactId(groupId.substring(groupId.lastIndexOf(".") + 1, groupId.length()));
+        groupMetadata.setVersion(sdkVersion);
+        groupMetadata.setPackaging("pom");
+        groupMetadata.setLibrariesWithResourceBundles(new ArrayList<String>());
+        groupMetadata.setDependencies(new ArrayList<MavenMetadata>());
+
+        // Don't deploy the player, as this has to be dealt with differently.
+        final File[] directoryContent = sourceDirectory.listFiles(new FileFilter() {
+            public boolean accept(File pathname) {
+                return pathname.getName().endsWith(".swc");
+            }
+        });
+
+        if(directoryContent != null) {
+            for(File file : directoryContent) {
+                final MavenMetadata metadata = new MavenMetadata();
+                metadata.setGroupId(groupId);
+                String libraryName = file.getName().substring(0, file.getName().lastIndexOf("."));
+
+                String libraryVersion = libraryVersions.get(libraryName);
+                if(libraryVersion == null) {
+                    libraryVersion = sdkVersion;
+                }
+                final File targetSwcDirectory = new File(targetDirectory, libraryName + "/" + libraryVersion);
+                if(!targetSwcDirectory.exists()) {
+                    if(!targetSwcDirectory.mkdirs()) {
+                        throw new RuntimeException(
+                                "Could not create directory: " + targetSwcDirectory.getAbsolutePath());
+                    }
+                }
+                final File targetSwcFile =
+                        new File(targetSwcDirectory, libraryName + "-" + libraryVersion + ".swc");
+                copyFile(file, targetSwcFile);
+
+                metadata.setArtifactId(libraryName);
+                metadata.setVersion(libraryVersion);
+                metadata.setPackaging("swc");
+
+                generateSwcPom(targetSwcFile, metadata);
+
+                groupMetadata.getDependencies().add(metadata);
+
+                // Save the checksum and metadata of the playerglobal, so we can
+                // find out which air sdk is used when deploying the flex sdks later
+                // on.
+                if("airglobal".equals(libraryName)) {
+                    final String checksum = calculateChecksum(file);
+                    checksums.put(checksum, metadata);
+                }
+
+                libraryLocations.put(libraryName, targetSwcDirectory.getAbsolutePath());
+                libraryVersions.put(libraryName, libraryVersion);
+            }
+        }
+
+        final MavenMetadata commonFrameworkMetaData = new MavenMetadata();
+        commonFrameworkMetaData.setGroupId(groupMetadata.getGroupId());
+        commonFrameworkMetaData.setArtifactId("common-framework");
+        commonFrameworkMetaData.setVersion(groupMetadata.getVersion());
+        commonFrameworkMetaData.setPackaging("pom");
+        commonFrameworkMetaData.setDependencies(new ArrayList<MavenMetadata>());
+        commonFrameworkMetaData.setLibrariesWithResourceBundles(new ArrayList<String>());
+
+        for(final MavenMetadata dependency : groupMetadata.getDependencies()) {
+            commonFrameworkMetaData.getDependencies().add(dependency);
+            if(groupMetadata.getLibrariesWithResourceBundles().contains(dependency.getArtifactId())) {
+                commonFrameworkMetaData.getLibrariesWithResourceBundles().add(dependency.getArtifactId());
+            }
+        }
+        final File commonFrameworkPom = new File(targetDirectory,
+                "common-framework/" + groupMetadata.getVersion() + "/common-framework-" +
+                        groupMetadata.getVersion() + ".pom");
+        generateSwcPom(commonFrameworkPom, commonFrameworkMetaData);
+
+        // Generate a dummy entry for the "flex-framework" pom,
+        // which will be generated later in the process.
+        final MavenMetadata flexFrameworkMetadata = new MavenMetadata();
+        flexFrameworkMetadata.setGroupId(groupMetadata.getGroupId());
+        flexFrameworkMetadata.setArtifactId("flex-framework");
+        flexFrameworkMetadata.setVersion(groupMetadata.getVersion());
+        flexFrameworkMetadata.setPackaging("pom");
+        groupMetadata.getDependencies().add(flexFrameworkMetadata);
+
+        // Generate the master pom for the current library (Pom that defines
+        // all versions of the current sdk libraries.
+        final File groupPomFile = new File(targetDirectory,
+                groupMetadata.getVersion() + "/" + groupMetadata.getArtifactId() + "-" +
+                        groupMetadata.getVersion() + ".pom");
+        generateDependencyManagementPom(groupPomFile, groupMetadata);
+    }
+
+    protected void generateSwcPom(final File targetSwc, final MavenMetadata metadata) throws Exception {
+        final String swcPath = targetSwc.getAbsolutePath();
+        final String pomPath = swcPath.substring(0, swcPath.lastIndexOf(".")) + ".pom";
+
+        final Document pom = createPomDocument(metadata);
+
+        writeDocument(pom, new File(pomPath));
+    }
+
+    protected void generateDependencyManagementPom(final File targetSwc, final MavenMetadata metadata) throws Exception {
+        final String swcPath = targetSwc.getAbsolutePath();
+        final String pomPath = swcPath.substring(0, swcPath.lastIndexOf(".")) + ".pom";
+
+        final Document pom = createPomDocumentDependencyManagement(metadata);
+
+        writeDocument(pom, new File(pomPath));
+    }
+}

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirFrameworkGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirFrameworkGenerator.java
            ('svn:executable' removed)

Modified: incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirRuntimeGenerator.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirRuntimeGenerator.java?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirRuntimeGenerator.java (original)
+++ incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirRuntimeGenerator.java Thu Nov 15 19:56:32 2012
@@ -14,191 +14,191 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package air;
-
-import common.BaseGenerator;
-import common.MavenMetadata;
-import org.apache.commons.compress.archivers.ArchiveEntry;
-import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
-import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
-
-import java.io.*;
-import java.text.NumberFormat;
-import java.util.Locale;
-
-/**
- * Created with IntelliJ IDEA.
- * User: cdutz
- * Date: 14.05.12
- * Time: 22:42
- */
-public class AirRuntimeGenerator extends BaseGenerator {
-
-    @Override
-    public void process(File sdkSourceDirectory, boolean isApache, File sdkTargetDirectory, String sdkVersion)
-            throws Exception
-    {
-        processFlashRuntime(sdkSourceDirectory, sdkTargetDirectory);
-    }
-
-    protected void processFlashRuntime(File sdkSourceDirectory, File sdkTargetDirectory)
-            throws Exception
-    {
-        final File runtimeDirectory = new File(sdkSourceDirectory, "runtimes");
-        final File flashPlayerDirectory = new File(runtimeDirectory, "player");
-
-        File[] versions = flashPlayerDirectory.listFiles(new FileFilter() {
-            public boolean accept(File pathname) {
-                return pathname.isDirectory() && !"win".equalsIgnoreCase(pathname.getName()) &&
-                        !"lnx".equalsIgnoreCase(pathname.getName()) && !"mac".equalsIgnoreCase(pathname.getName());
-            }
-        });
-        // The flash-player 9 is installed directly in the player directory.
-        if(new File(flashPlayerDirectory, "win").exists()) {
-            final File[] extendedVersions = new File[versions.length + 1];
-            System.arraycopy(versions, 0, extendedVersions, 0, versions.length);
-            extendedVersions[versions.length] = flashPlayerDirectory;
-            versions = extendedVersions;
-        }
-
-        if(versions != null) {
-            for(final File versionDir : versions) {
-                // If the versionDir is called "player", then this is the home of the flash-player version 9.
-                final String playerVersionString = "player".equalsIgnoreCase(versionDir.getName()) ? "9.0" : versionDir.getName();
-                final double playerVersion = Double.valueOf(playerVersionString);
-                final NumberFormat doubleFormat = NumberFormat.getInstance(Locale.US);
-                doubleFormat.setMinimumFractionDigits(1);
-                doubleFormat.setMaximumFractionDigits(1);
-                final String version = doubleFormat.format(playerVersion);
-
-                final File targetDir = new File(sdkTargetDirectory, "com/adobe/flash/runtime/" + version);
-
-                // Deploy Windows binaries.
-                final File windowsDirectory = new File(versionDir, "win");
-                if(windowsDirectory.exists()) {
-                    // Find out if a flash-player binary exists.
-                    File flashPlayerBinary = null;
-                    if(new File(windowsDirectory, "FlashPlayerDebugger.exe").exists()) {
-                        flashPlayerBinary = new File(windowsDirectory, "FlashPlayerDebugger.exe");
-                    } else if(new File(windowsDirectory, "FlashPlayer.exe").exists()) {
-                        flashPlayerBinary = new File(windowsDirectory, "FlashPlayer.exe");
-                    }
-
-                    // If a binary exists, copy it to the target and create a pom for it.
-                    if (flashPlayerBinary != null) {
-                        if(!targetDir.exists()) {
-                            if(!targetDir.mkdirs()) {
-                                throw new RuntimeException("Could not create directory: " + targetDir.getAbsolutePath());
-                            }
-                        }
-                        final File targetFile = new File(targetDir, "/runtime-" + version + "-win.exe");
-                        copyFile(flashPlayerBinary, targetFile);
-                    }
-                }
-
-                // Deploy Mac binaries.
-                final File macDirectory = new File(versionDir, "mac");
-                if(macDirectory.exists()) {
-                    // Find out if a flash-player binary exists.
-                    File flashPlayerBinary = null;
-                    if(new File(macDirectory, "Flash Player.app.zip").exists()) {
-                        flashPlayerBinary = new File(macDirectory, "Flash Player.app.zip");
-                    } else if(new File(macDirectory, "Flash Player Debugger.app.zip").exists()) {
-                        flashPlayerBinary = new File(macDirectory, "Flash Player Debugger.app.zip");
-                    }
-
-                    // If a binary exists, copy it to the target and create a pom for it.
-                    if (flashPlayerBinary != null) {
-                        if(!targetDir.exists()) {
-                            if(!targetDir.mkdirs()) {
-                                throw new RuntimeException("Could not create directory: " + targetDir.getAbsolutePath());
-                            }
-                        }
-                        final File targetFile = new File(targetDir, "/runtime-" + version + "-mac.zip");
-                        copyFile(flashPlayerBinary, targetFile);
-                    }
-                }
-
-                // Deploy Linux binaries.
-                final File lnxDirectory = new File(versionDir, "lnx");
-                if(lnxDirectory.exists()) {
-                    // Find out if a flash-player binary exists.
-                    File flashPlayerBinary = null;
-                    if(new File(lnxDirectory, "flashplayer.tar.gz").exists()) {
-                        flashPlayerBinary = new File(lnxDirectory, "flashplayer.tar.gz");
-                    } else if(new File(lnxDirectory, "flashplayerdebugger.tar.gz").exists()) {
-                        flashPlayerBinary = new File(lnxDirectory, "flashplayerdebugger.tar.gz");
-                    }
-
-                    // Decompress the archive.
-                    // First unzip it.
-                    final FileInputStream fin = new FileInputStream(flashPlayerBinary);
-                    final BufferedInputStream in = new BufferedInputStream(fin);
-                    final File tempTarFile = File.createTempFile("flex-sdk-linux-flashplayer-binary-" + version, ".tar");
-                    final FileOutputStream out = new FileOutputStream(tempTarFile);
-                    final GzipCompressorInputStream gzIn = new GzipCompressorInputStream(in);
-                    final byte[] buffer = new byte[1024];
-                    int n;
-                    while (-1 != (n = gzIn.read(buffer))) {
-                        out.write(buffer, 0, n);
-                    }
-                    out.close();
-                    gzIn.close();
-
-                    // Then untar it.
-                    File uncompressedBinary = null;
-                    final FileInputStream tarFileInputStream = new FileInputStream(tempTarFile);
-                    final TarArchiveInputStream tarArchiveInputStream = new TarArchiveInputStream(tarFileInputStream);
-                    ArchiveEntry entry;
-                    while((entry = tarArchiveInputStream.getNextEntry()) != null) {
-                        if("flashplayer".equals(entry.getName())) {
-                            uncompressedBinary = File.createTempFile("flex-sdk-linux-flashplayer-binary-" + version, ".uexe");
-                            final FileOutputStream uncompressedBinaryOutputStream = new FileOutputStream(uncompressedBinary);
-                            while(-1 != (n = tarArchiveInputStream.read(buffer))) {
-                                uncompressedBinaryOutputStream.write(buffer, 0, n);
-                            }
-                            uncompressedBinaryOutputStream.close();
-                        } else if("flashplayerdebugger".equals(entry.getName())) {
-                            uncompressedBinary = File.createTempFile("flex-sdk-linux-flashplayer-binary-" + version, ".uexe");
-                            final FileOutputStream uncompressedBinaryOutputStream = new FileOutputStream(uncompressedBinary);
-                            while(-1 != (n = tarArchiveInputStream.read(buffer))) {
-                                uncompressedBinaryOutputStream.write(buffer, 0, n);
-                            }
-                            uncompressedBinaryOutputStream.close();
-                        }
-                    }
-                    tarFileInputStream.close();
-
-                    // If a binary exists, copy it to the target and create a pom for it.
-                    if (uncompressedBinary != null) {
-                        if(!targetDir.exists()) {
-                            if(!targetDir.mkdirs()) {
-                                throw new RuntimeException("Could not create directory: " + targetDir.getAbsolutePath());
-                            }
-                        }
-                        final File targetFile = new File(targetDir, "/runtime-" + version + "-linux.uexe");
-                        copyFile(uncompressedBinary, targetFile);
-
-                        // Clean up in the temp directory.
-                        if(!uncompressedBinary.delete()) {
-                            System.out.println("Could not delete: " + uncompressedBinary.getAbsolutePath());
-                        }
-                    }
-
-                    // Clean up in the temp directory.
-                    if(!tempTarFile.delete()) {
-                        System.out.println("Could not delete: " + tempTarFile.getAbsolutePath());
-                    }
-                }
-
-                final MavenMetadata playerArtifact = new MavenMetadata();
-                playerArtifact.setGroupId("com.adobe.flash");
-                playerArtifact.setArtifactId("runtime");
-                playerArtifact.setVersion(version);
-                playerArtifact.setPackaging("exe");
-
-                writeDocument(createPomDocument(playerArtifact), new File(targetDir, "runtime-" + version + ".pom"));
-            }
-        }
-    }
-}
+package air;
+
+import common.BaseGenerator;
+import common.MavenMetadata;
+import org.apache.commons.compress.archivers.ArchiveEntry;
+import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
+import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
+
+import java.io.*;
+import java.text.NumberFormat;
+import java.util.Locale;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: cdutz
+ * Date: 14.05.12
+ * Time: 22:42
+ */
+public class AirRuntimeGenerator extends BaseGenerator {
+
+    @Override
+    public void process(File sdkSourceDirectory, boolean isApache, File sdkTargetDirectory, String sdkVersion)
+            throws Exception
+    {
+        processFlashRuntime(sdkSourceDirectory, sdkTargetDirectory);
+    }
+
+    protected void processFlashRuntime(File sdkSourceDirectory, File sdkTargetDirectory)
+            throws Exception
+    {
+        final File runtimeDirectory = new File(sdkSourceDirectory, "runtimes");
+        final File flashPlayerDirectory = new File(runtimeDirectory, "player");
+
+        File[] versions = flashPlayerDirectory.listFiles(new FileFilter() {
+            public boolean accept(File pathname) {
+                return pathname.isDirectory() && !"win".equalsIgnoreCase(pathname.getName()) &&
+                        !"lnx".equalsIgnoreCase(pathname.getName()) && !"mac".equalsIgnoreCase(pathname.getName());
+            }
+        });
+        // The flash-player 9 is installed directly in the player directory.
+        if(new File(flashPlayerDirectory, "win").exists()) {
+            final File[] extendedVersions = new File[versions.length + 1];
+            System.arraycopy(versions, 0, extendedVersions, 0, versions.length);
+            extendedVersions[versions.length] = flashPlayerDirectory;
+            versions = extendedVersions;
+        }
+
+        if(versions != null) {
+            for(final File versionDir : versions) {
+                // If the versionDir is called "player", then this is the home of the flash-player version 9.
+                final String playerVersionString = "player".equalsIgnoreCase(versionDir.getName()) ? "9.0" : versionDir.getName();
+                final double playerVersion = Double.valueOf(playerVersionString);
+                final NumberFormat doubleFormat = NumberFormat.getInstance(Locale.US);
+                doubleFormat.setMinimumFractionDigits(1);
+                doubleFormat.setMaximumFractionDigits(1);
+                final String version = doubleFormat.format(playerVersion);
+
+                final File targetDir = new File(sdkTargetDirectory, "com/adobe/flash/runtime/" + version);
+
+                // Deploy Windows binaries.
+                final File windowsDirectory = new File(versionDir, "win");
+                if(windowsDirectory.exists()) {
+                    // Find out if a flash-player binary exists.
+                    File flashPlayerBinary = null;
+                    if(new File(windowsDirectory, "FlashPlayerDebugger.exe").exists()) {
+                        flashPlayerBinary = new File(windowsDirectory, "FlashPlayerDebugger.exe");
+                    } else if(new File(windowsDirectory, "FlashPlayer.exe").exists()) {
+                        flashPlayerBinary = new File(windowsDirectory, "FlashPlayer.exe");
+                    }
+
+                    // If a binary exists, copy it to the target and create a pom for it.
+                    if (flashPlayerBinary != null) {
+                        if(!targetDir.exists()) {
+                            if(!targetDir.mkdirs()) {
+                                throw new RuntimeException("Could not create directory: " + targetDir.getAbsolutePath());
+                            }
+                        }
+                        final File targetFile = new File(targetDir, "/runtime-" + version + "-win.exe");
+                        copyFile(flashPlayerBinary, targetFile);
+                    }
+                }
+
+                // Deploy Mac binaries.
+                final File macDirectory = new File(versionDir, "mac");
+                if(macDirectory.exists()) {
+                    // Find out if a flash-player binary exists.
+                    File flashPlayerBinary = null;
+                    if(new File(macDirectory, "Flash Player.app.zip").exists()) {
+                        flashPlayerBinary = new File(macDirectory, "Flash Player.app.zip");
+                    } else if(new File(macDirectory, "Flash Player Debugger.app.zip").exists()) {
+                        flashPlayerBinary = new File(macDirectory, "Flash Player Debugger.app.zip");
+                    }
+
+                    // If a binary exists, copy it to the target and create a pom for it.
+                    if (flashPlayerBinary != null) {
+                        if(!targetDir.exists()) {
+                            if(!targetDir.mkdirs()) {
+                                throw new RuntimeException("Could not create directory: " + targetDir.getAbsolutePath());
+                            }
+                        }
+                        final File targetFile = new File(targetDir, "/runtime-" + version + "-mac.zip");
+                        copyFile(flashPlayerBinary, targetFile);
+                    }
+                }
+
+                // Deploy Linux binaries.
+                final File lnxDirectory = new File(versionDir, "lnx");
+                if(lnxDirectory.exists()) {
+                    // Find out if a flash-player binary exists.
+                    File flashPlayerBinary = null;
+                    if(new File(lnxDirectory, "flashplayer.tar.gz").exists()) {
+                        flashPlayerBinary = new File(lnxDirectory, "flashplayer.tar.gz");
+                    } else if(new File(lnxDirectory, "flashplayerdebugger.tar.gz").exists()) {
+                        flashPlayerBinary = new File(lnxDirectory, "flashplayerdebugger.tar.gz");
+                    }
+
+                    // Decompress the archive.
+                    // First unzip it.
+                    final FileInputStream fin = new FileInputStream(flashPlayerBinary);
+                    final BufferedInputStream in = new BufferedInputStream(fin);
+                    final File tempTarFile = File.createTempFile("flex-sdk-linux-flashplayer-binary-" + version, ".tar");
+                    final FileOutputStream out = new FileOutputStream(tempTarFile);
+                    final GzipCompressorInputStream gzIn = new GzipCompressorInputStream(in);
+                    final byte[] buffer = new byte[1024];
+                    int n;
+                    while (-1 != (n = gzIn.read(buffer))) {
+                        out.write(buffer, 0, n);
+                    }
+                    out.close();
+                    gzIn.close();
+
+                    // Then untar it.
+                    File uncompressedBinary = null;
+                    final FileInputStream tarFileInputStream = new FileInputStream(tempTarFile);
+                    final TarArchiveInputStream tarArchiveInputStream = new TarArchiveInputStream(tarFileInputStream);
+                    ArchiveEntry entry;
+                    while((entry = tarArchiveInputStream.getNextEntry()) != null) {
+                        if("flashplayer".equals(entry.getName())) {
+                            uncompressedBinary = File.createTempFile("flex-sdk-linux-flashplayer-binary-" + version, ".uexe");
+                            final FileOutputStream uncompressedBinaryOutputStream = new FileOutputStream(uncompressedBinary);
+                            while(-1 != (n = tarArchiveInputStream.read(buffer))) {
+                                uncompressedBinaryOutputStream.write(buffer, 0, n);
+                            }
+                            uncompressedBinaryOutputStream.close();
+                        } else if("flashplayerdebugger".equals(entry.getName())) {
+                            uncompressedBinary = File.createTempFile("flex-sdk-linux-flashplayer-binary-" + version, ".uexe");
+                            final FileOutputStream uncompressedBinaryOutputStream = new FileOutputStream(uncompressedBinary);
+                            while(-1 != (n = tarArchiveInputStream.read(buffer))) {
+                                uncompressedBinaryOutputStream.write(buffer, 0, n);
+                            }
+                            uncompressedBinaryOutputStream.close();
+                        }
+                    }
+                    tarFileInputStream.close();
+
+                    // If a binary exists, copy it to the target and create a pom for it.
+                    if (uncompressedBinary != null) {
+                        if(!targetDir.exists()) {
+                            if(!targetDir.mkdirs()) {
+                                throw new RuntimeException("Could not create directory: " + targetDir.getAbsolutePath());
+                            }
+                        }
+                        final File targetFile = new File(targetDir, "/runtime-" + version + "-linux.uexe");
+                        copyFile(uncompressedBinary, targetFile);
+
+                        // Clean up in the temp directory.
+                        if(!uncompressedBinary.delete()) {
+                            System.out.println("Could not delete: " + uncompressedBinary.getAbsolutePath());
+                        }
+                    }
+
+                    // Clean up in the temp directory.
+                    if(!tempTarFile.delete()) {
+                        System.out.println("Could not delete: " + tempTarFile.getAbsolutePath());
+                    }
+                }
+
+                final MavenMetadata playerArtifact = new MavenMetadata();
+                playerArtifact.setGroupId("com.adobe.flash");
+                playerArtifact.setArtifactId("runtime");
+                playerArtifact.setVersion(version);
+                playerArtifact.setPackaging("exe");
+
+                writeDocument(createPomDocument(playerArtifact), new File(targetDir, "runtime-" + version + ".pom"));
+            }
+        }
+    }
+}

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirRuntimeGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirRuntimeGenerator.java
            ('svn:executable' removed)

Modified: incubator/flex/utilities/trunk/mavenizer/src/main/java/common/BaseGenerator.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/mavenizer/src/main/java/common/BaseGenerator.java?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/mavenizer/src/main/java/common/BaseGenerator.java (original)
+++ incubator/flex/utilities/trunk/mavenizer/src/main/java/common/BaseGenerator.java Thu Nov 15 19:56:32 2012
@@ -14,376 +14,376 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package common;
-
-import java.io.*;
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.util.*;
-import javax.xml.parsers.*;
-import javax.xml.transform.*;
-import javax.xml.transform.dom.*;
-import javax.xml.transform.stream.*;
-import org.codehaus.jettison.json.JSONArray;
-import org.codehaus.jettison.json.JSONObject;
-import org.codehaus.jettison.json.JSONTokener;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import com.sun.jersey.api.client.Client;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.WebResource;
-
-/**
- * Created with IntelliJ IDEA.
- * User: cdutz
- * Date: 11.05.12
- * Time: 14:53
- */
-public abstract class BaseGenerator {
-
-    protected static final Map<String, MavenMetadata> checksums = new HashMap<String, MavenMetadata>();
-
-    protected static final String MAVEN_SCHEMA_URI = "http://maven.apache.org/POM/4.0.0";
-    protected static final String MAVEN_CENTRAL_SHA_1_QUERY_URL = "http://search.maven.org/solrsearch/select?rows=20&wt=json&q=1:";
-    // Artifactory: "http://server:port/artifactory/api/search/checksum?repos=libs-release-local&md5=04040c7c184620af0a0a8a3682a75eb7
-    // Nexus: "http://repository.sonatype.org/service/local/data_index?a=04040c7c184620af0a0a8a3682a75eb7"
-
-    abstract public void process(File sdkSourceDirectory, boolean isApache, File sdkTargetDirectory, String sdkVersion)
-            throws Exception;
-
-    protected String calculateChecksum(File jarFile) throws Exception {
-        // Implement the calculation of checksums for a given jar.
-        final MessageDigest digest = MessageDigest.getInstance("SHA-1");
-
-        final InputStream is = new FileInputStream(jarFile);
-        final byte[] buffer = new byte[8192];
-        int read;
-        try {
-        	while( (read = is.read(buffer)) > 0) {
-                digest.update(buffer, 0, read);
-        	}
-            final byte[] md5sum = digest.digest();
-            final BigInteger bigInt = new BigInteger(1, md5sum);
-            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);
-        	}
-        }
-    }
-
-    protected MavenMetadata lookupMetadataForChecksum(String checksum) throws Exception {
-        final String queryUrl = MAVEN_CENTRAL_SHA_1_QUERY_URL + checksum;
-
-        final Client client = Client.create();
-        final WebResource webResource = client.resource(queryUrl);
-        final ClientResponse response = webResource.accept("application/json").get(ClientResponse.class);
-
-      	if (response.getStatus() != 200) {
-   		   throw new RuntimeException("Failed : HTTP error code : " + response.getStatus());
-      	}
-
-        final String output = response.getEntity(String.class);
-
-        final BufferedReader reader = new BufferedReader(new StringReader(output));
-        final StringBuilder builder = new StringBuilder();
-        for (String line; (line = reader.readLine()) != null; ) {
-            builder.append(line).append("\n");
-        }
-        final JSONTokener tokener = new JSONTokener(builder.toString());
-        final JSONObject rootObject = new JSONObject(tokener);
-
-        final JSONObject responseObject = (JSONObject) rootObject.get("response");
-        final int numFound = (Integer) responseObject.get("numFound");
-        if(numFound == 0) {
-            return null;
-        }
-        else if(numFound == 1) {
-            final JSONArray docs = (JSONArray) responseObject.get("docs");
-            final JSONObject firstHit = (JSONObject) docs.get(0);
-
-            final MavenMetadata artifactMetadata = new MavenMetadata();
-            artifactMetadata.groupId = (String) firstHit.get("g");
-            artifactMetadata.artifactId = (String) firstHit.get("a");
-            artifactMetadata.version = (String) firstHit.get("v");
-            artifactMetadata.packaging = (String) firstHit.get("p");
-
-            return artifactMetadata;
-        } else {
-            long newestTimestamp = 0;
-            JSONObject newestVersion = null;
-
-            JSONArray options = (JSONArray) responseObject.get("docs");
-            // if the "groupId" is "batik" then use the newer version.
-            for(int i = 0; i < numFound; i++) {
-                final JSONObject option = (JSONObject) options.get(0);
-                if("batik".equals(option.get("g")) && "batik-dom".equals(option.get("a")) && "jar".equals(option.get("p"))) {
-                    final long timestamp = (Long) option.get("timestamp");
-                    if(timestamp > newestTimestamp) {
-                        newestTimestamp = timestamp;
-                        newestVersion = option;
-                    }
-                }
-            }
-
-            if(newestVersion != null) {
-                final MavenMetadata artifactMetadata = new MavenMetadata();
-                artifactMetadata.groupId = (String) newestVersion.get("g");
-                artifactMetadata.artifactId = (String) newestVersion.get("a");
-                artifactMetadata.version = (String) newestVersion.get("v");
-                artifactMetadata.packaging = (String) newestVersion.get("p");
-
-                return artifactMetadata;
-            } else {
-                System.out.println("For jar-file with checksum: " + checksum +
-                        " more than one result was returned by query: " + queryUrl);
-            }
-        }
-        return null;
-    }
-
-    protected void copyFile(File source, File target) throws Exception {
-        InputStream in = new FileInputStream(source);
-        OutputStream out = new FileOutputStream(target);
-
-        byte[] buf = new byte[1024];
-        int len;
-        while ((len = in.read(buf)) > 0){
-            out.write(buf, 0, len);
-        }
-
-        in.close();
-        out.close();
-    }
-
-    protected void appendArtifact(MavenMetadata artifactMetadata, Element dependencies) {
-        final Document doc = dependencies.getOwnerDocument();
-        final Element dependency = doc.createElementNS(MAVEN_SCHEMA_URI, "dependency");
-        dependencies.appendChild(dependency);
-
-        final Element groupId = doc.createElementNS(MAVEN_SCHEMA_URI, "groupId");
-        groupId.setTextContent(artifactMetadata.groupId);
-        dependency.appendChild(groupId);
-        final Element artifactId = doc.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
-        artifactId.setTextContent(artifactMetadata.artifactId);
-        dependency.appendChild(artifactId);
-        final Element version = doc.createElementNS(MAVEN_SCHEMA_URI, "version");
-        version.setTextContent(artifactMetadata.version);
-        dependency.appendChild(version);
-        if(!artifactMetadata.getPackaging().equals("jar")) {
-            final Element packaging = doc.createElementNS(MAVEN_SCHEMA_URI, "type");
-            packaging.setTextContent(artifactMetadata.packaging);
-            dependency.appendChild(packaging);
-        }
-    }
-
-    protected void writeDocument(Document doc, File outputFile) throws Exception {
-        final Source source = new DOMSource(doc);
-        final File outputDirectory = outputFile.getParentFile();
-        if(!outputDirectory.exists()) {
-            if(!outputDirectory.mkdirs()) {
-                throw new RuntimeException("Could not create directory: " + outputDirectory.getAbsolutePath());
-            }
-        }
-
-        final Result result = new StreamResult(outputFile);
-        final Transformer transformer = TransformerFactory.newInstance().newTransformer();
-        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
-        transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
-        transformer.transform(source, result);
-    }
-
-    protected Document createPomDocument(final MavenMetadata metadata) throws Exception {
-        final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        factory.setNamespaceAware(true);
-        final DocumentBuilder builder = factory.newDocumentBuilder();
-        DOMImplementation domImpl = builder.getDOMImplementation();
-        final Document pom = domImpl.createDocument(MAVEN_SCHEMA_URI, "project", null);
-
-        final Element root = pom.getDocumentElement();
-        final Element modelVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "modelVersion");
-        modelVersion.setTextContent("4.0.0");
-        root.appendChild(modelVersion);
-        final Element groupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
-        groupId.setTextContent(metadata.groupId);
-        root.appendChild(groupId);
-        final Element artifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
-        artifactId.setTextContent(metadata.artifactId);
-        root.appendChild(artifactId);
-        final Element version = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
-        version.setTextContent(metadata.version);
-        root.appendChild(version);
-        final Element packaging = pom.createElementNS(MAVEN_SCHEMA_URI, "packaging");
-        packaging.setTextContent(metadata.packaging);
-        root.appendChild(packaging);
-
-        // Output dependency data.
-        if((metadata.dependencies != null) && !metadata.dependencies.isEmpty()) {
-            final Element dependencies = pom.createElementNS(MAVEN_SCHEMA_URI, "dependencies");
-            root.appendChild(dependencies);
-
-            final Map<String, MavenMetadata> dependencyIndex = new HashMap<String, MavenMetadata>();
-            for(final MavenMetadata dependencyMetadata : metadata.dependencies) {
-                final Element dependency = pom.createElementNS(MAVEN_SCHEMA_URI, "dependency");
-                dependencies.appendChild(dependency);
-
-                final Element dependencyGroupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
-                dependencyGroupId.setTextContent(dependencyMetadata.groupId);
-                dependency.appendChild(dependencyGroupId);
-                final Element dependencyArtifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
-                dependencyArtifactId.setTextContent(dependencyMetadata.artifactId);
-                dependency.appendChild(dependencyArtifactId);
-                final Element dependencyVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
-                dependencyVersion.setTextContent(dependencyMetadata.version);
-                dependency.appendChild(dependencyVersion);
-                final Element dependencyPackaging = pom.createElementNS(MAVEN_SCHEMA_URI, "type");
-                dependencyPackaging.setTextContent(dependencyMetadata.packaging);
-                dependency.appendChild(dependencyPackaging);
-                if(dependencyMetadata.classifier != null) {
-                    final Element dependencyClassifier = pom.createElementNS(MAVEN_SCHEMA_URI, "classifier");
-                    dependencyClassifier.setTextContent(dependencyMetadata.classifier);
-                    dependency.appendChild(dependencyClassifier);
-                }
-
-                dependencyIndex.put(dependencyMetadata.artifactId, dependencyMetadata);
-            }
-
-            // Output the rb.swc dependencies.
-            if(metadata.librariesWithResourceBundles != null) {
-                for(final String artifactWithResourceBundle : metadata.librariesWithResourceBundles) {
-                    final MavenMetadata dependencyMetadata = dependencyIndex.get(artifactWithResourceBundle);
-                    if(dependencyMetadata != null) {
-                        final Element dependency = pom.createElementNS(MAVEN_SCHEMA_URI, "dependency");
-                        dependencies.appendChild(dependency);
-
-                        final Element dependencyGroupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
-                        dependencyGroupId.setTextContent(dependencyMetadata.groupId);
-                        dependency.appendChild(dependencyGroupId);
-                        final Element dependencyArtifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
-                        dependencyArtifactId.setTextContent(dependencyMetadata.artifactId);
-                        dependency.appendChild(dependencyArtifactId);
-                        final Element dependencyVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
-                        dependencyVersion.setTextContent(dependencyMetadata.version);
-                        dependency.appendChild(dependencyVersion);
-                        final Element dependencyPackaging = pom.createElementNS(MAVEN_SCHEMA_URI, "type");
-                        dependencyPackaging.setTextContent("rb.swc");
-                        dependency.appendChild(dependencyPackaging);
-                    }
-                }
-            }
-        }
-
-        return pom;
-    }
-
-    protected Document createPomDocumentDependencyManagement(final MavenMetadata metadata) throws Exception {
-        final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        factory.setNamespaceAware(true);
-        final DocumentBuilder builder = factory.newDocumentBuilder();
-        DOMImplementation domImpl = builder.getDOMImplementation();
-        final Document pom = domImpl.createDocument(MAVEN_SCHEMA_URI, "project", null);
-
-        final Element root = pom.getDocumentElement();
-        final Element modelVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "modelVersion");
-        modelVersion.setTextContent("4.0.0");
-        root.appendChild(modelVersion);
-        final Element groupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
-        groupId.setTextContent(metadata.groupId);
-        root.appendChild(groupId);
-        final Element artifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
-        artifactId.setTextContent(metadata.artifactId);
-        root.appendChild(artifactId);
-        final Element version = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
-        version.setTextContent(metadata.version);
-        root.appendChild(version);
-        final Element packaging = pom.createElementNS(MAVEN_SCHEMA_URI, "packaging");
-        packaging.setTextContent(metadata.packaging);
-        root.appendChild(packaging);
-
-        // Output dependency data.
-        if((metadata.dependencies != null) && !metadata.dependencies.isEmpty()) {
-            final Element dependencyManagement = pom.createElementNS(MAVEN_SCHEMA_URI, "dependencyManagement");
-            root.appendChild(dependencyManagement);
-            final Element dependencies = pom.createElementNS(MAVEN_SCHEMA_URI, "dependencies");
-            dependencyManagement.appendChild(dependencies);
-
-            final Map<String, MavenMetadata> dependencyIndex = new HashMap<String, MavenMetadata>();
-            for(final MavenMetadata dependencyMetadata : metadata.dependencies) {
-                final Element dependency = pom.createElementNS(MAVEN_SCHEMA_URI, "dependency");
-                dependencies.appendChild(dependency);
-
-                final Element dependencyGroupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
-                dependencyGroupId.setTextContent(dependencyMetadata.groupId);
-                dependency.appendChild(dependencyGroupId);
-                final Element dependencyArtifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
-                dependencyArtifactId.setTextContent(dependencyMetadata.artifactId);
-                dependency.appendChild(dependencyArtifactId);
-                final Element dependencyVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
-                dependencyVersion.setTextContent(dependencyMetadata.version);
-                dependency.appendChild(dependencyVersion);
-                final Element dependencyPackaging = pom.createElementNS(MAVEN_SCHEMA_URI, "type");
-                dependencyPackaging.setTextContent(dependencyMetadata.packaging);
-                dependency.appendChild(dependencyPackaging);
-                if(dependencyMetadata.classifier != null) {
-                    final Element dependencyClassifier = pom.createElementNS(MAVEN_SCHEMA_URI, "classifier");
-                    dependencyClassifier.setTextContent(dependencyMetadata.classifier);
-                    dependency.appendChild(dependencyClassifier);
-                }
-
-                dependencyIndex.put(dependencyMetadata.artifactId, dependencyMetadata);
-            }
-
-            // Output the rb.swc dependencies.
-            for(final String artifactWithResourceBundle : metadata.librariesWithResourceBundles) {
-                final MavenMetadata dependencyMetadata = dependencyIndex.get(artifactWithResourceBundle);
-                if(dependencyMetadata != null) {
-                    final Element dependency = pom.createElementNS(MAVEN_SCHEMA_URI, "dependency");
-                    dependencies.appendChild(dependency);
-
-                    final Element dependencyGroupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
-                    dependencyGroupId.setTextContent(dependencyMetadata.groupId);
-                    dependency.appendChild(dependencyGroupId);
-                    final Element dependencyArtifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
-                    dependencyArtifactId.setTextContent(dependencyMetadata.artifactId);
-                    dependency.appendChild(dependencyArtifactId);
-                    final Element dependencyVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
-                    dependencyVersion.setTextContent(dependencyMetadata.version);
-                    dependency.appendChild(dependencyVersion);
-                    final Element dependencyPackaging = pom.createElementNS(MAVEN_SCHEMA_URI, "type");
-                    dependencyPackaging.setTextContent("rb.swc");
-                    dependency.appendChild(dependencyPackaging);
-                }
-            }
-        }
-
-        return pom;
-    }
-
-    protected static File findDirectory(File directory, String directoryToFind) {
-        File[] entries = directory.listFiles();
-        File founded = null;
-
-        // Go over entries
-        for (File entry : entries) {
-            if (entry.isDirectory() && directoryToFind.equalsIgnoreCase(entry.getName())) {
-                founded = entry;
-                break;
-            }
-            if (entry.isDirectory()) {
-                founded = findDirectory(entry, directoryToFind);
-                if (founded != null)
-                    break;
-            }
-        }
-        return founded;
-    }
-}
+package common;
+
+import java.io.*;
+import java.math.BigInteger;
+import java.security.MessageDigest;
+import java.util.*;
+import javax.xml.parsers.*;
+import javax.xml.transform.*;
+import javax.xml.transform.dom.*;
+import javax.xml.transform.stream.*;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONObject;
+import org.codehaus.jettison.json.JSONTokener;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import com.sun.jersey.api.client.Client;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.WebResource;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: cdutz
+ * Date: 11.05.12
+ * Time: 14:53
+ */
+public abstract class BaseGenerator {
+
+    protected static final Map<String, MavenMetadata> checksums = new HashMap<String, MavenMetadata>();
+
+    protected static final String MAVEN_SCHEMA_URI = "http://maven.apache.org/POM/4.0.0";
+    protected static final String MAVEN_CENTRAL_SHA_1_QUERY_URL = "http://search.maven.org/solrsearch/select?rows=20&wt=json&q=1:";
+    // Artifactory: "http://server:port/artifactory/api/search/checksum?repos=libs-release-local&md5=04040c7c184620af0a0a8a3682a75eb7
+    // Nexus: "http://repository.sonatype.org/service/local/data_index?a=04040c7c184620af0a0a8a3682a75eb7"
+
+    abstract public void process(File sdkSourceDirectory, boolean isApache, File sdkTargetDirectory, String sdkVersion)
+            throws Exception;
+
+    protected String calculateChecksum(File jarFile) throws Exception {
+        // Implement the calculation of checksums for a given jar.
+        final MessageDigest digest = MessageDigest.getInstance("SHA-1");
+
+        final InputStream is = new FileInputStream(jarFile);
+        final byte[] buffer = new byte[8192];
+        int read;
+        try {
+        	while( (read = is.read(buffer)) > 0) {
+                digest.update(buffer, 0, read);
+        	}
+            final byte[] md5sum = digest.digest();
+            final BigInteger bigInt = new BigInteger(1, md5sum);
+            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);
+        	}
+        }
+    }
+
+    protected MavenMetadata lookupMetadataForChecksum(String checksum) throws Exception {
+        final String queryUrl = MAVEN_CENTRAL_SHA_1_QUERY_URL + checksum;
+
+        final Client client = Client.create();
+        final WebResource webResource = client.resource(queryUrl);
+        final ClientResponse response = webResource.accept("application/json").get(ClientResponse.class);
+
+      	if (response.getStatus() != 200) {
+   		   throw new RuntimeException("Failed : HTTP error code : " + response.getStatus());
+      	}
+
+        final String output = response.getEntity(String.class);
+
+        final BufferedReader reader = new BufferedReader(new StringReader(output));
+        final StringBuilder builder = new StringBuilder();
+        for (String line; (line = reader.readLine()) != null; ) {
+            builder.append(line).append("\n");
+        }
+        final JSONTokener tokener = new JSONTokener(builder.toString());
+        final JSONObject rootObject = new JSONObject(tokener);
+
+        final JSONObject responseObject = (JSONObject) rootObject.get("response");
+        final int numFound = (Integer) responseObject.get("numFound");
+        if(numFound == 0) {
+            return null;
+        }
+        else if(numFound == 1) {
+            final JSONArray docs = (JSONArray) responseObject.get("docs");
+            final JSONObject firstHit = (JSONObject) docs.get(0);
+
+            final MavenMetadata artifactMetadata = new MavenMetadata();
+            artifactMetadata.groupId = (String) firstHit.get("g");
+            artifactMetadata.artifactId = (String) firstHit.get("a");
+            artifactMetadata.version = (String) firstHit.get("v");
+            artifactMetadata.packaging = (String) firstHit.get("p");
+
+            return artifactMetadata;
+        } else {
+            long newestTimestamp = 0;
+            JSONObject newestVersion = null;
+
+            JSONArray options = (JSONArray) responseObject.get("docs");
+            // if the "groupId" is "batik" then use the newer version.
+            for(int i = 0; i < numFound; i++) {
+                final JSONObject option = (JSONObject) options.get(0);
+                if("batik".equals(option.get("g")) && "batik-dom".equals(option.get("a")) && "jar".equals(option.get("p"))) {
+                    final long timestamp = (Long) option.get("timestamp");
+                    if(timestamp > newestTimestamp) {
+                        newestTimestamp = timestamp;
+                        newestVersion = option;
+                    }
+                }
+            }
+
+            if(newestVersion != null) {
+                final MavenMetadata artifactMetadata = new MavenMetadata();
+                artifactMetadata.groupId = (String) newestVersion.get("g");
+                artifactMetadata.artifactId = (String) newestVersion.get("a");
+                artifactMetadata.version = (String) newestVersion.get("v");
+                artifactMetadata.packaging = (String) newestVersion.get("p");
+
+                return artifactMetadata;
+            } else {
+                System.out.println("For jar-file with checksum: " + checksum +
+                        " more than one result was returned by query: " + queryUrl);
+            }
+        }
+        return null;
+    }
+
+    protected void copyFile(File source, File target) throws Exception {
+        InputStream in = new FileInputStream(source);
+        OutputStream out = new FileOutputStream(target);
+
+        byte[] buf = new byte[1024];
+        int len;
+        while ((len = in.read(buf)) > 0){
+            out.write(buf, 0, len);
+        }
+
+        in.close();
+        out.close();
+    }
+
+    protected void appendArtifact(MavenMetadata artifactMetadata, Element dependencies) {
+        final Document doc = dependencies.getOwnerDocument();
+        final Element dependency = doc.createElementNS(MAVEN_SCHEMA_URI, "dependency");
+        dependencies.appendChild(dependency);
+
+        final Element groupId = doc.createElementNS(MAVEN_SCHEMA_URI, "groupId");
+        groupId.setTextContent(artifactMetadata.groupId);
+        dependency.appendChild(groupId);
+        final Element artifactId = doc.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
+        artifactId.setTextContent(artifactMetadata.artifactId);
+        dependency.appendChild(artifactId);
+        final Element version = doc.createElementNS(MAVEN_SCHEMA_URI, "version");
+        version.setTextContent(artifactMetadata.version);
+        dependency.appendChild(version);
+        if(!artifactMetadata.getPackaging().equals("jar")) {
+            final Element packaging = doc.createElementNS(MAVEN_SCHEMA_URI, "type");
+            packaging.setTextContent(artifactMetadata.packaging);
+            dependency.appendChild(packaging);
+        }
+    }
+
+    protected void writeDocument(Document doc, File outputFile) throws Exception {
+        final Source source = new DOMSource(doc);
+        final File outputDirectory = outputFile.getParentFile();
+        if(!outputDirectory.exists()) {
+            if(!outputDirectory.mkdirs()) {
+                throw new RuntimeException("Could not create directory: " + outputDirectory.getAbsolutePath());
+            }
+        }
+
+        final Result result = new StreamResult(outputFile);
+        final Transformer transformer = TransformerFactory.newInstance().newTransformer();
+        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+        transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+        transformer.transform(source, result);
+    }
+
+    protected Document createPomDocument(final MavenMetadata metadata) throws Exception {
+        final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setNamespaceAware(true);
+        final DocumentBuilder builder = factory.newDocumentBuilder();
+        DOMImplementation domImpl = builder.getDOMImplementation();
+        final Document pom = domImpl.createDocument(MAVEN_SCHEMA_URI, "project", null);
+
+        final Element root = pom.getDocumentElement();
+        final Element modelVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "modelVersion");
+        modelVersion.setTextContent("4.0.0");
+        root.appendChild(modelVersion);
+        final Element groupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
+        groupId.setTextContent(metadata.groupId);
+        root.appendChild(groupId);
+        final Element artifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
+        artifactId.setTextContent(metadata.artifactId);
+        root.appendChild(artifactId);
+        final Element version = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
+        version.setTextContent(metadata.version);
+        root.appendChild(version);
+        final Element packaging = pom.createElementNS(MAVEN_SCHEMA_URI, "packaging");
+        packaging.setTextContent(metadata.packaging);
+        root.appendChild(packaging);
+
+        // Output dependency data.
+        if((metadata.dependencies != null) && !metadata.dependencies.isEmpty()) {
+            final Element dependencies = pom.createElementNS(MAVEN_SCHEMA_URI, "dependencies");
+            root.appendChild(dependencies);
+
+            final Map<String, MavenMetadata> dependencyIndex = new HashMap<String, MavenMetadata>();
+            for(final MavenMetadata dependencyMetadata : metadata.dependencies) {
+                final Element dependency = pom.createElementNS(MAVEN_SCHEMA_URI, "dependency");
+                dependencies.appendChild(dependency);
+
+                final Element dependencyGroupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
+                dependencyGroupId.setTextContent(dependencyMetadata.groupId);
+                dependency.appendChild(dependencyGroupId);
+                final Element dependencyArtifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
+                dependencyArtifactId.setTextContent(dependencyMetadata.artifactId);
+                dependency.appendChild(dependencyArtifactId);
+                final Element dependencyVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
+                dependencyVersion.setTextContent(dependencyMetadata.version);
+                dependency.appendChild(dependencyVersion);
+                final Element dependencyPackaging = pom.createElementNS(MAVEN_SCHEMA_URI, "type");
+                dependencyPackaging.setTextContent(dependencyMetadata.packaging);
+                dependency.appendChild(dependencyPackaging);
+                if(dependencyMetadata.classifier != null) {
+                    final Element dependencyClassifier = pom.createElementNS(MAVEN_SCHEMA_URI, "classifier");
+                    dependencyClassifier.setTextContent(dependencyMetadata.classifier);
+                    dependency.appendChild(dependencyClassifier);
+                }
+
+                dependencyIndex.put(dependencyMetadata.artifactId, dependencyMetadata);
+            }
+
+            // Output the rb.swc dependencies.
+            if(metadata.librariesWithResourceBundles != null) {
+                for(final String artifactWithResourceBundle : metadata.librariesWithResourceBundles) {
+                    final MavenMetadata dependencyMetadata = dependencyIndex.get(artifactWithResourceBundle);
+                    if(dependencyMetadata != null) {
+                        final Element dependency = pom.createElementNS(MAVEN_SCHEMA_URI, "dependency");
+                        dependencies.appendChild(dependency);
+
+                        final Element dependencyGroupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
+                        dependencyGroupId.setTextContent(dependencyMetadata.groupId);
+                        dependency.appendChild(dependencyGroupId);
+                        final Element dependencyArtifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
+                        dependencyArtifactId.setTextContent(dependencyMetadata.artifactId);
+                        dependency.appendChild(dependencyArtifactId);
+                        final Element dependencyVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
+                        dependencyVersion.setTextContent(dependencyMetadata.version);
+                        dependency.appendChild(dependencyVersion);
+                        final Element dependencyPackaging = pom.createElementNS(MAVEN_SCHEMA_URI, "type");
+                        dependencyPackaging.setTextContent("rb.swc");
+                        dependency.appendChild(dependencyPackaging);
+                    }
+                }
+            }
+        }
+
+        return pom;
+    }
+
+    protected Document createPomDocumentDependencyManagement(final MavenMetadata metadata) throws Exception {
+        final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setNamespaceAware(true);
+        final DocumentBuilder builder = factory.newDocumentBuilder();
+        DOMImplementation domImpl = builder.getDOMImplementation();
+        final Document pom = domImpl.createDocument(MAVEN_SCHEMA_URI, "project", null);
+
+        final Element root = pom.getDocumentElement();
+        final Element modelVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "modelVersion");
+        modelVersion.setTextContent("4.0.0");
+        root.appendChild(modelVersion);
+        final Element groupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
+        groupId.setTextContent(metadata.groupId);
+        root.appendChild(groupId);
+        final Element artifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
+        artifactId.setTextContent(metadata.artifactId);
+        root.appendChild(artifactId);
+        final Element version = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
+        version.setTextContent(metadata.version);
+        root.appendChild(version);
+        final Element packaging = pom.createElementNS(MAVEN_SCHEMA_URI, "packaging");
+        packaging.setTextContent(metadata.packaging);
+        root.appendChild(packaging);
+
+        // Output dependency data.
+        if((metadata.dependencies != null) && !metadata.dependencies.isEmpty()) {
+            final Element dependencyManagement = pom.createElementNS(MAVEN_SCHEMA_URI, "dependencyManagement");
+            root.appendChild(dependencyManagement);
+            final Element dependencies = pom.createElementNS(MAVEN_SCHEMA_URI, "dependencies");
+            dependencyManagement.appendChild(dependencies);
+
+            final Map<String, MavenMetadata> dependencyIndex = new HashMap<String, MavenMetadata>();
+            for(final MavenMetadata dependencyMetadata : metadata.dependencies) {
+                final Element dependency = pom.createElementNS(MAVEN_SCHEMA_URI, "dependency");
+                dependencies.appendChild(dependency);
+
+                final Element dependencyGroupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
+                dependencyGroupId.setTextContent(dependencyMetadata.groupId);
+                dependency.appendChild(dependencyGroupId);
+                final Element dependencyArtifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
+                dependencyArtifactId.setTextContent(dependencyMetadata.artifactId);
+                dependency.appendChild(dependencyArtifactId);
+                final Element dependencyVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
+                dependencyVersion.setTextContent(dependencyMetadata.version);
+                dependency.appendChild(dependencyVersion);
+                final Element dependencyPackaging = pom.createElementNS(MAVEN_SCHEMA_URI, "type");
+                dependencyPackaging.setTextContent(dependencyMetadata.packaging);
+                dependency.appendChild(dependencyPackaging);
+                if(dependencyMetadata.classifier != null) {
+                    final Element dependencyClassifier = pom.createElementNS(MAVEN_SCHEMA_URI, "classifier");
+                    dependencyClassifier.setTextContent(dependencyMetadata.classifier);
+                    dependency.appendChild(dependencyClassifier);
+                }
+
+                dependencyIndex.put(dependencyMetadata.artifactId, dependencyMetadata);
+            }
+
+            // Output the rb.swc dependencies.
+            for(final String artifactWithResourceBundle : metadata.librariesWithResourceBundles) {
+                final MavenMetadata dependencyMetadata = dependencyIndex.get(artifactWithResourceBundle);
+                if(dependencyMetadata != null) {
+                    final Element dependency = pom.createElementNS(MAVEN_SCHEMA_URI, "dependency");
+                    dependencies.appendChild(dependency);
+
+                    final Element dependencyGroupId = pom.createElementNS(MAVEN_SCHEMA_URI, "groupId");
+                    dependencyGroupId.setTextContent(dependencyMetadata.groupId);
+                    dependency.appendChild(dependencyGroupId);
+                    final Element dependencyArtifactId = pom.createElementNS(MAVEN_SCHEMA_URI, "artifactId");
+                    dependencyArtifactId.setTextContent(dependencyMetadata.artifactId);
+                    dependency.appendChild(dependencyArtifactId);
+                    final Element dependencyVersion = pom.createElementNS(MAVEN_SCHEMA_URI, "version");
+                    dependencyVersion.setTextContent(dependencyMetadata.version);
+                    dependency.appendChild(dependencyVersion);
+                    final Element dependencyPackaging = pom.createElementNS(MAVEN_SCHEMA_URI, "type");
+                    dependencyPackaging.setTextContent("rb.swc");
+                    dependency.appendChild(dependencyPackaging);
+                }
+            }
+        }
+
+        return pom;
+    }
+
+    protected static File findDirectory(File directory, String directoryToFind) {
+        File[] entries = directory.listFiles();
+        File founded = null;
+
+        // Go over entries
+        for (File entry : entries) {
+            if (entry.isDirectory() && directoryToFind.equalsIgnoreCase(entry.getName())) {
+                founded = entry;
+                break;
+            }
+            if (entry.isDirectory()) {
+                founded = findDirectory(entry, directoryToFind);
+                if (founded != null)
+                    break;
+            }
+        }
+        return founded;
+    }
+}

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/common/BaseGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/common/BaseGenerator.java
            ('svn:executable' removed)

Modified: incubator/flex/utilities/trunk/mavenizer/src/main/java/common/MavenMetadata.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/mavenizer/src/main/java/common/MavenMetadata.java?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/mavenizer/src/main/java/common/MavenMetadata.java (original)
+++ incubator/flex/utilities/trunk/mavenizer/src/main/java/common/MavenMetadata.java Thu Nov 15 19:56:32 2012
@@ -14,78 +14,78 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package common;
-
-import java.util.List;
-
-/**
- * Created with IntelliJ IDEA.
- * User: cdutz
- * Date: 01.07.12
- * Time: 12:31
- */
-public class MavenMetadata {
-    protected String groupId;
-    protected String artifactId;
-    protected String version;
-    protected String packaging;
-    protected String classifier;
-    protected List<String> librariesWithResourceBundles;
-    protected List<MavenMetadata> dependencies;
-
-    public String getGroupId() {
-        return groupId;
-    }
-
-    public void setGroupId(String groupId) {
-        this.groupId = groupId;
-    }
-
-    public String getArtifactId() {
-        return artifactId;
-    }
-
-    public void setArtifactId(String artifactId) {
-        this.artifactId = artifactId;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public String getPackaging() {
-        return packaging;
-    }
-
-    public void setPackaging(String packaging) {
-        this.packaging = packaging;
-    }
-
-    public String getClassifier() {
-        return classifier;
-    }
-
-    public void setClassifier(String classifier) {
-        this.classifier = classifier;
-    }
-
-    public List<String> getLibrariesWithResourceBundles() {
-        return librariesWithResourceBundles;
-    }
-
-    public void setLibrariesWithResourceBundles(List<String> librariesWithResourceBundles) {
-        this.librariesWithResourceBundles = librariesWithResourceBundles;
-    }
-
-    public List<MavenMetadata> getDependencies() {
-        return dependencies;
-    }
-
-    public void setDependencies(List<MavenMetadata> dependencies) {
-        this.dependencies = dependencies;
-    }
-}
+package common;
+
+import java.util.List;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: cdutz
+ * Date: 01.07.12
+ * Time: 12:31
+ */
+public class MavenMetadata {
+    protected String groupId;
+    protected String artifactId;
+    protected String version;
+    protected String packaging;
+    protected String classifier;
+    protected List<String> librariesWithResourceBundles;
+    protected List<MavenMetadata> dependencies;
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    public String getArtifactId() {
+        return artifactId;
+    }
+
+    public void setArtifactId(String artifactId) {
+        this.artifactId = artifactId;
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    public String getPackaging() {
+        return packaging;
+    }
+
+    public void setPackaging(String packaging) {
+        this.packaging = packaging;
+    }
+
+    public String getClassifier() {
+        return classifier;
+    }
+
+    public void setClassifier(String classifier) {
+        this.classifier = classifier;
+    }
+
+    public List<String> getLibrariesWithResourceBundles() {
+        return librariesWithResourceBundles;
+    }
+
+    public void setLibrariesWithResourceBundles(List<String> librariesWithResourceBundles) {
+        this.librariesWithResourceBundles = librariesWithResourceBundles;
+    }
+
+    public List<MavenMetadata> getDependencies() {
+        return dependencies;
+    }
+
+    public void setDependencies(List<MavenMetadata> dependencies) {
+        this.dependencies = dependencies;
+    }
+}

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/common/MavenMetadata.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/common/MavenMetadata.java
            ('svn:executable' removed)



Mime
View raw message