[jboss-svn-commits] JBL Code SVN: r12508 - in labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin: src/main/java/org/jboss/maven/plugins/deploy and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jun 12 15:39:55 EDT 2007
Author: pgier
Date: 2007-06-12 15:39:54 -0400 (Tue, 12 Jun 2007)
New Revision: 12508
Modified:
labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/pom.xml
labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/src/main/java/org/jboss/maven/plugins/deploy/JBossDeployMojo.java
Log:
Changed svn urls in pom.
Fixed issue with artifact ids in component-info.xml.
Modified: labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/pom.xml
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/pom.xml 2007-06-12 19:13:21 UTC (rev 12507)
+++ labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/pom.xml 2007-06-12 19:39:54 UTC (rev 12508)
@@ -12,14 +12,14 @@
<version>1.3-SNAPSHOT</version>
<description>Plugin for deploying artifacts to JBoss non-maven repository.</description>
<scm>
- <connection>scm:svn:https://svn.labs.jboss.org/labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin</connection>
+ <connection>scm:svn:https://svn.jboss.org/repos/labs/labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin</connection>
</scm>
<build>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
- <tagBase>https://svn.labs.jboss.org/labs/jbossbuild/maven-plugins/tags</tagBase>
+ <tagBase>https://svn.jboss.org/repos/labs/labs/jbossbuild/maven-plugins/tags/</tagBase>
</configuration>
</plugin>
</plugins>
Modified: labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/src/main/java/org/jboss/maven/plugins/deploy/JBossDeployMojo.java
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/src/main/java/org/jboss/maven/plugins/deploy/JBossDeployMojo.java 2007-06-12 19:13:21 UTC (rev 12507)
+++ labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/src/main/java/org/jboss/maven/plugins/deploy/JBossDeployMojo.java 2007-06-12 19:39:54 UTC (rev 12508)
@@ -200,7 +200,7 @@
evaluateVariable(compInfoTemplate, "project.scm", "scm=\"" + scmConnStr + "\"");
}
- // Get the list of artifacts, copy them to the lib directory, and add them to component-info
+ // Build list of artifacts, copy them to the lib directory, and add them to component-info.xml
HashSet<String> artifactSet = new HashSet<String>();
Artifact projectArtifact = project.getArtifact();
if (projectArtifact != null && projectArtifact.getFile() != null)
@@ -217,15 +217,21 @@
}
}
+ // Add the attached (non-default) artifacts
List list = project.getAttachedArtifacts();
this.getLog().debug("Number of attached artifacts: " + list.size());
- for (Object obj : list)
+
+ for (Object artifactObj : list)
{
- Artifact artifact = (Artifact) obj;
- this.getLog().debug(artifact.getArtifactId());
+ Artifact artifact = (Artifact) artifactObj;
+ this.getLog().debug("Attaching artifact: " + artifact.getArtifactId());
+
String classifierStr = artifact.getClassifier();
if (classifierStr == null) {
classifierStr = "";
+ // If the classifier is null and the artifactId matches the project
+ // the it must be a composite project, so we add the artifact to the
+ // list of exports.
if (artifact.getArtifactId().equals(project.getArtifactId())) {
exports.add(artifact.getArtifactId() + "." + artifact.getType());
}
@@ -233,18 +239,17 @@
getLog().warn("Attached artifact with same name as default artifact.");
getLog().warn("This could be caused by an assembly descriptor with no id.");
}
- } else {
- classifierStr = "-" + classifierStr;
}
- String artifactLine = " <artifact id=\"" + artifact.getArtifactId() + classifierStr
- + ".jar" + "\"/>\n";
- if (artifactSet.contains(artifactLine))
- {
+ String artifactLine = " <artifact id=\"" + artifact.getFile().getName() + "\"/>\n";
+
+ // Check for duplicates
+ if (artifactSet.contains(artifactLine)) {
this.getLog().warn(
- "Duplicate attached artifact found: " + artifact.getArtifactId() + classifierStr
+ "Duplicate attached artifact found: " + artifact.getFile().getName()
+ ".jar");
}
artifactSet.add(artifactLine);
+
try
{
this.getLog().debug("Deploying file://" + deployToLibDir + fileSep + artifact.getFile().getName());
More information about the jboss-svn-commits
mailing list