incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From josebarra...@apache.org
Subject svn commit: r1421004 - in /incubator/flex/utilities/trunk/mavenizer/src/main/java: SDKDeployer.java air/AirFrameworkGenerator.java flex/FlexFrameworkGenerator.java
Date Wed, 12 Dec 2012 21:56:13 GMT
Author: josebarragan
Date: Wed Dec 12 21:56:12 2012
New Revision: 1421004

URL: http://svn.apache.org/viewvc?rev=1421004&view=rev
Log:
[FLEX-33296] Fixed.
https://issues.apache.org/jira/browse/FLEX-33296

Generator:
Fix the groupMetadataId when main directory pom is defining.

Deployer:
Grant has only one execution command for each ProcessBuilder

Modified:
    incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java
    incubator/flex/utilities/trunk/mavenizer/src/main/java/air/AirFrameworkGenerator.java
    incubator/flex/utilities/trunk/mavenizer/src/main/java/flex/FlexFrameworkGenerator.java

Modified: incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java?rev=1421004&r1=1421003&r2=1421004&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java (original)
+++ incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java Wed Dec 12 21:56:12
2012
@@ -91,12 +91,12 @@ public class SDKDeployer {
         String artifactName = fileName.substring(0, fileName.lastIndexOf("-"));
 
         if (artifactName != null) {
-            final File artifacts[] = new File(pom.getParent()).listFiles(new ArtifactFilter());
-	        final List<String> processCmd = new ArrayList<String>(10);
-	        processCmd.add(mvn);
-	        processCmd.add("deploy:deploy-file");
-	        processCmd.add("-DrepositoryId=" + repositoryId);
-	        processCmd.add("-Durl=" + url);
+            File artifacts[] = new File(pom.getParent()).listFiles(new ArtifactFilter());
+	        List<String> processCmdBase = new ArrayList<String>(10);
+	        processCmdBase.add(mvn);
+	        processCmdBase.add("deploy:deploy-file");
+	        processCmdBase.add("-DrepositoryId=" + repositoryId);
+	        processCmdBase.add("-Durl=" + url);
 
 	        ProcessBuilder processBuilder = null;
 
@@ -104,8 +104,11 @@ public class SDKDeployer {
             String packaging;
             String classifier = null;
 
+	        List<String> processCmd = null;
             if (artifacts != null && artifacts.length > 0) {
                 for (File artifact : artifacts) {
+	                processCmd = new ArrayList<String>(10);
+	                processCmd.addAll(processCmdBase);
                     classifier = packaging = null;
                     artifactName = artifact.getName();
 
@@ -126,6 +129,8 @@ public class SDKDeployer {
 	                exec(processBuilder.start());
                 }
             } else {
+	            processCmd = new ArrayList<String>(10);
+	            processCmd.addAll(processCmdBase);
 	            processCmd.add("-Dfile=" + pom.getAbsolutePath());
 	            processCmd.add("-DpomFile=" + pom.getAbsolutePath());
 	            processBuilder = new ProcessBuilder(processCmd);

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=1421004&r1=1421003&r2=1421004&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
Wed Dec 12 21:56:12 2012
@@ -51,7 +51,8 @@ public class AirFrameworkGenerator exten
             throws Exception
     {
         final MavenMetadata groupMetadata = new MavenMetadata();
-        groupMetadata.setGroupId(groupId);
+	    String groupMetadataId = groupId;
+        groupMetadata.setGroupId(groupId.substring(0, groupId.lastIndexOf(".")));
         groupMetadata.setArtifactId(groupId.substring(groupId.lastIndexOf(".") + 1, groupId.length()));
         groupMetadata.setVersion(sdkVersion);
         groupMetadata.setPackaging("pom");
@@ -108,7 +109,7 @@ public class AirFrameworkGenerator exten
         }
 
         final MavenMetadata commonFrameworkMetaData = new MavenMetadata();
-        commonFrameworkMetaData.setGroupId(groupMetadata.getGroupId());
+        commonFrameworkMetaData.setGroupId(groupMetadataId);
         commonFrameworkMetaData.setArtifactId("common-framework");
         commonFrameworkMetaData.setVersion(groupMetadata.getVersion());
         commonFrameworkMetaData.setPackaging("pom");
@@ -129,7 +130,7 @@ public class AirFrameworkGenerator exten
         // 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.setGroupId(groupMetadataId);
         flexFrameworkMetadata.setArtifactId("flex-framework");
         flexFrameworkMetadata.setVersion(groupMetadata.getVersion());
         flexFrameworkMetadata.setPackaging("pom");

Modified: incubator/flex/utilities/trunk/mavenizer/src/main/java/flex/FlexFrameworkGenerator.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/mavenizer/src/main/java/flex/FlexFrameworkGenerator.java?rev=1421004&r1=1421003&r2=1421004&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/mavenizer/src/main/java/flex/FlexFrameworkGenerator.java
(original)
+++ incubator/flex/utilities/trunk/mavenizer/src/main/java/flex/FlexFrameworkGenerator.java
Wed Dec 12 21:56:12 2012
@@ -228,7 +228,8 @@ public class FlexFrameworkGenerator exte
                                                  boolean skipGroupPomGeneration, final boolean
isApache)
             throws Exception {
         final MavenMetadata groupMetadata = new MavenMetadata();
-        groupMetadata.setGroupId(groupId);
+	    String groupMetadataId = groupId;
+        groupMetadata.setGroupId(groupId.substring(0, groupId.lastIndexOf(".")));
         groupMetadata.setArtifactId(groupId.substring(groupId.lastIndexOf(".") + 1, groupId.length()));
         groupMetadata.setVersion(sdkVersion);
         groupMetadata.setPackaging("pom");
@@ -349,7 +350,7 @@ public class FlexFrameworkGenerator exte
             // the dependencies the same way velos sdks did.
             if ("libs".equals(sourceDirectory.getName())) {
                 final MavenMetadata commonFrameworkMetaData = new MavenMetadata();
-                commonFrameworkMetaData.setGroupId(groupMetadata.getGroupId());
+                commonFrameworkMetaData.setGroupId(groupMetadataId);
                 commonFrameworkMetaData.setArtifactId("common-framework");
                 commonFrameworkMetaData.setVersion(groupMetadata.getVersion());
                 commonFrameworkMetaData.setPackaging("pom");
@@ -370,14 +371,14 @@ public class FlexFrameworkGenerator exte
                 // 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.setGroupId(groupMetadataId);
                 flexFrameworkMetadata.setArtifactId("flex-framework");
                 flexFrameworkMetadata.setVersion(groupMetadata.getVersion());
                 flexFrameworkMetadata.setPackaging("pom");
                 groupMetadata.getDependencies().add(flexFrameworkMetadata);
             } else if ("air".equals(sourceDirectory.getName())) {
                 final MavenMetadata airCommonFrameworkMetaData = new MavenMetadata();
-                airCommonFrameworkMetaData.setGroupId(groupMetadata.getGroupId());
+                airCommonFrameworkMetaData.setGroupId(groupMetadataId);
                 airCommonFrameworkMetaData.setArtifactId("common-framework");
                 airCommonFrameworkMetaData.setVersion(groupMetadata.getVersion());
                 airCommonFrameworkMetaData.setPackaging("pom");
@@ -398,7 +399,7 @@ public class FlexFrameworkGenerator exte
                 // 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.setGroupId(groupMetadataId);
                 flexFrameworkMetadata.setArtifactId("air-framework");
                 flexFrameworkMetadata.setVersion(groupMetadata.getVersion());
                 flexFrameworkMetadata.setPackaging("pom");



Mime
View raw message