Return-Path: X-Original-To: apmail-incubator-flex-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49101D4CE for ; Wed, 12 Dec 2012 21:56:36 +0000 (UTC) Received: (qmail 33609 invoked by uid 500); 12 Dec 2012 21:56:36 -0000 Delivered-To: apmail-incubator-flex-commits-archive@incubator.apache.org Received: (qmail 33564 invoked by uid 500); 12 Dec 2012 21:56:36 -0000 Mailing-List: contact flex-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-commits@incubator.apache.org Received: (qmail 33557 invoked by uid 99); 12 Dec 2012 21:56:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2012 21:56:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2012 21:56:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7F5852388906; Wed, 12 Dec 2012 21:56:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: flex-commits@incubator.apache.org From: josebarragan@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121212215614.7F5852388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 processCmd = new ArrayList(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 processCmdBase = new ArrayList(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 processCmd = null; if (artifacts != null && artifacts.length > 0) { for (File artifact : artifacts) { + processCmd = new ArrayList(10); + processCmd.addAll(processCmdBase); classifier = packaging = null; artifactName = artifact.getName(); @@ -126,6 +129,8 @@ public class SDKDeployer { exec(processBuilder.start()); } } else { + processCmd = new ArrayList(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");