commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1424854 - in /commons/sandbox/privilizer/trunk: example/pom.xml maven-plugin/src/main/java/org/apache/commons/weaver/maven/AbstractWeaveMojo.java
Date Fri, 21 Dec 2012 10:32:51 GMT
Author: struberg
Date: Fri Dec 21 10:32:51 2012
New Revision: 1424854

URL: http://svn.apache.org/viewvc?rev=1424854&view=rev
Log:
fix maven-plugin and examples

well, at least they now compile again ^^

Modified:
    commons/sandbox/privilizer/trunk/example/pom.xml
    commons/sandbox/privilizer/trunk/maven-plugin/src/main/java/org/apache/commons/weaver/maven/AbstractWeaveMojo.java

Modified: commons/sandbox/privilizer/trunk/example/pom.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/privilizer/trunk/example/pom.xml?rev=1424854&r1=1424853&r2=1424854&view=diff
==============================================================================
--- commons/sandbox/privilizer/trunk/example/pom.xml (original)
+++ commons/sandbox/privilizer/trunk/example/pom.xml Fri Dec 21 10:32:51 2012
@@ -24,16 +24,15 @@
     <version>0.1-SNAPSHOT</version>
   </parent>
   <artifactId>commons-privilizer-example</artifactId>
-  <name>Commons Privilizer Example</name>
+  <name>Commons Weaver Privilizer Example</name>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   </properties>
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.2</version><!--$NO-MVN-MAN-VER$ -->
-      <scope>test</scope>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-privilizer</artifactId>
+      <version>${project.version}</version>
     </dependency>
   </dependencies>
   <build>

Modified: commons/sandbox/privilizer/trunk/maven-plugin/src/main/java/org/apache/commons/weaver/maven/AbstractWeaveMojo.java
URL: http://svn.apache.org/viewvc/commons/sandbox/privilizer/trunk/maven-plugin/src/main/java/org/apache/commons/weaver/maven/AbstractWeaveMojo.java?rev=1424854&r1=1424853&r2=1424854&view=diff
==============================================================================
--- commons/sandbox/privilizer/trunk/maven-plugin/src/main/java/org/apache/commons/weaver/maven/AbstractWeaveMojo.java
(original)
+++ commons/sandbox/privilizer/trunk/maven-plugin/src/main/java/org/apache/commons/weaver/maven/AbstractWeaveMojo.java
Fri Dec 21 10:32:51 2012
@@ -16,14 +16,12 @@
 package org.apache.commons.weaver.maven;
 
 import java.io.File;
-import java.net.URLClassLoader;
 import java.util.List;
 import java.util.Properties;
 
 import org.apache.commons.weaver.WeaveProcessor;
-import org.apache.commons.weaver.utils.URLArray;
 import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.Parameter;
 
 
@@ -35,13 +33,14 @@ public abstract class AbstractWeaveMojo 
     @Parameter(defaultValue = "false")
     protected boolean verbose;
 
-    @Parameter(property = "weaver.properties", required = false)
-    protected Properties properties;
+    @Parameter(property = "weaver.config", required = false)
+    protected Properties weaverConfig;
 
     protected abstract List<String> getClasspath();
 
     protected abstract File getTarget();
 
+/*X TODO remove finally
     protected FilesystemPrivilizer createWeaver() {
         return new FilesystemPrivilizer(policy, new URLClassLoader(URLArray.fromPaths(getClasspath())),
getTarget()) {
             @Override
@@ -80,16 +79,17 @@ public abstract class AbstractWeaveMojo 
             }
         });
     }
-
+*/
 
     @Override
-    public void execute() throws MojoFailureException {
+    public void execute() throws MojoExecutionException
+    {
         try {
             WeaveProcessor wp = WeaveProcessor.getInstance();
             configure(wp);
             wp.weave();
         } catch (Exception e) {
-            throw new MojoFailureException("weaving failed", e);
+            throw new MojoExecutionException("weaving failed", e);
         }
     }
 



Mime
View raw message