jvanzyl 2004/05/16 07:25:17
Modified:
maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin
CompilerPlugin.java
Log:
o just checking in so michal and I can work something out
Revision Changes Path
1.3 +35 -11
maven-components/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerPlugin.java
Index: CompilerPlugin.java
===================================================================
RCS file:
/home/cvs/maven-components/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerPlugin.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CompilerPlugin.java 19 Mar 2004 04:11:11 -0000 1.2
+++ CompilerPlugin.java 16 May 2004 14:25:17 -0000 1.3
@@ -9,28 +9,48 @@
import java.util.Map;
/**
- * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
+ * @plugin.id compiler
+ * @plugin.description A maven2 plugin which integrates the use of Maven2 with
IntelliJ's IDEA
+ *
+ * @parameter <name> <type> <required> <validatator> <description>
+ *
+ * This may be on a per method basis
+ * @parameter sourceDirectories String[] required validator
+ * @parameter outputDirectory String required validator
+ * @parameter classpathElements String[] required validator
+ * @parameter compiler String required validator
+ *
+ * The goal would map to a method if multiple methods were allowed
+ * @goal.name idea
+ * @goal.idea.parameter project #project
*
+ * There could be threadsafe and non threadsafe versions of a compiler
+ * plugin. The case where you instantiate a compiler plugin that maintains
+ * a reference to an incremental compiler.
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @version $Id$
+ * @todo make a plugin for each plugin type so that they are not all globbed in here
+ * this will remove the magic plexus does with Map requirements which will
make
+ * reuse outside of the maven/plexus context easier
+ * @todo use compile source roots and not the pom.build.sourceDirectory so that any
+ * sort of preprocessing and/or source generation can be taken into
consideration.
*/
-// Conditions underwhich we fail
-// - specified source directory does not exist
-// - missing classpath Elements
-// - compilation error
-
-// How to accurately report failures to users
-
public class CompilerPlugin
extends AbstractPlugin
{
private Map compilers;
- private boolean debug = true;
+ private boolean debug = false;
public void execute( PluginExecutionRequest request, PluginExecutionResponse
response )
throws Exception
{
+ // ----------------------------------------------------------------------
+ //
+ // ----------------------------------------------------------------------
+
String sourceDirectory = (String) request.getParameter( "sourceDirectory" );
String outputDirectory = (String) request.getParameter( "outputDirectory" );
@@ -39,9 +59,13 @@
String compilerId = (String) request.getParameter( "compiler" );
+ // ----------------------------------------------------------------------
+ //
+ // ----------------------------------------------------------------------
+
if ( ! new File( sourceDirectory ).exists() )
{
- throw new Exception( "The specified source directory '"+
sourceDirectory + "' does not exist!" );
+ return;
}
Compiler compiler = (Compiler) compilers.get( compilerId );
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]