You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by pt...@apache.org on 2009/01/18 17:06:27 UTC
svn commit: r735483 -
/jakarta/cactus/trunk/integration/maven2/src/main/java/org/apache/cactus/maven2/mojos/CactifyEarMojo.java
Author: ptahchiev
Date: Sun Jan 18 08:06:26 2009
New Revision: 735483
URL: http://svn.apache.org/viewvc?rev=735483&view=rev
Log:
Minor changes for better readability.
Modified:
jakarta/cactus/trunk/integration/maven2/src/main/java/org/apache/cactus/maven2/mojos/CactifyEarMojo.java
Modified: jakarta/cactus/trunk/integration/maven2/src/main/java/org/apache/cactus/maven2/mojos/CactifyEarMojo.java
URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/integration/maven2/src/main/java/org/apache/cactus/maven2/mojos/CactifyEarMojo.java?rev=735483&r1=735482&r2=735483&view=diff
==============================================================================
--- jakarta/cactus/trunk/integration/maven2/src/main/java/org/apache/cactus/maven2/mojos/CactifyEarMojo.java (original)
+++ jakarta/cactus/trunk/integration/maven2/src/main/java/org/apache/cactus/maven2/mojos/CactifyEarMojo.java Sun Jan 18 08:06:26 2009
@@ -70,6 +70,7 @@
/**
* The archive that contains the web-app that should be cactified.
+ * @required
* @parameter
*/
private File srcFile;
@@ -77,6 +78,7 @@
/**
* The archive that contains the web-app that should be cactified.
* @parameter
+ * default-value="${project.build.directory}/${project.artifactId}-cactified.ear"
*/
private File destFile;
@@ -136,6 +138,12 @@
{
cactusWar = createCactusWarConfig();
}
+
+ if (getSrcFile() == null)
+ {
+ throw new MojoExecutionException("You need to specify [srcFile] "
+ + "attribute for cactification!");
+ }
MavenArchiver archiver = new MavenArchiver();
archiver.setArchiver(earArchiver);
@@ -149,7 +157,7 @@
try
{
- if(this.srcFile != null)
+ if (this.srcFile != null)
{
AssemblyFileUtils.unpack(this.srcFile, tempLocation,
archiverManager);
@@ -204,7 +212,7 @@
archiver.createArchive(getProject(), getArchive());
}
- catch(ArchiverException aex)
+ catch (ArchiverException aex)
{
throw new MojoExecutionException("Error while performing the "
+ "cactified archive.", aex);
@@ -469,8 +477,18 @@
* Getter method for the destFile.
* @return
*/
- public File getDestFile() {
+ public File getDestFile()
+ {
return destFile;
}
+
+ /**
+ * Getter method for the srcFile.
+ * @return
+ */
+ public File getSrcFile()
+ {
+ return srcFile;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org