[jboss-svn-commits] JBL Code SVN: r10723 - labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/src/main/java/org/jboss/maven/plugins/deploy.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Apr 3 15:05:57 EDT 2007
Author: pgier
Date: 2007-04-03 15:05:57 -0400 (Tue, 03 Apr 2007)
New Revision: 10723
Modified:
labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/src/main/java/org/jboss/maven/plugins/deploy/JBossDeployMojo.java
Log:
JBBUILD-354; Added check for no attached artifacts. Removed some unused variables.
Added log of component-info being deployed.
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-04-03 18:44:30 UTC (rev 10722)
+++ labs/jbossbuild/maven-plugins/trunk/jboss-deploy-maven-plugin/src/main/java/org/jboss/maven/plugins/deploy/JBossDeployMojo.java 2007-04-03 19:05:57 UTC (rev 10723)
@@ -83,34 +83,6 @@
protected Properties projectProperties;
/**
- * The plugin dependencies.
- *
- * @parameter expression="${plugin.artifacts}"
- * @required
- * @readonly
- */
- private List pluginArtifacts;
-
- /**
- * The directory for compiled classes.
- *
- * @parameter expression="${project.build.directory}"
- * @required
- * @readonly
- */
- private File targetDirectory;
-
- /**
- * Project artifacts.
- *
- * @parameter expression="${project.artifact}"
- * @required
- * @readonly
- * @todo this is an export variable, really
- */
- private Artifact projectArtifact;
-
- /**
* This is the location that the jboss repository (non-maven) files will be copied to.
* @parameter
* @required
@@ -136,6 +108,14 @@
{
this.getLog().debug("Executing JBoss deploy plugin");
+ // Check that there is at least one artifact to deploy
+ if ((project.getArtifact() == null || project.getArtifact().getFile() == null)
+ && project.getAttachedArtifacts().size() == 0)
+ {
+ this.getLog().info("No artifacts to deploy for project:" + project.getName());
+ return;
+ }
+
// Initialize some local variables
File deployToDir = new File(jbossDeployRoot + fileSep + project.getGroupId() + fileSep + project.getArtifactId()
+ fileSep + project.getVersion() + fileSep);
@@ -275,6 +255,7 @@
}
File compInfoFile = new File(deployToDir + fileSep + "component-info.xml");
FileWriter fw = new FileWriter(compInfoFile);
+ this.getLog().info("Deploying file: " + compInfoFile.getCanonicalPath());
fw.write(compInfoTemplate.toString());
fw.close();
}
More information about the jboss-svn-commits
mailing list