jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1855195 - /jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/AbstractPackageMojo.java
Date Mon, 11 Mar 2019 05:20:14 GMT
Author: tripod
Date: Mon Mar 11 05:20:14 2019
New Revision: 1855195

URL: http://svn.apache.org/viewvc?rev=1855195&view=rev
Log:
JCRVLT-326 use plugin context instead of project properties to share (closes #23)

Modified:
    jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/AbstractPackageMojo.java

Modified: jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/AbstractPackageMojo.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/AbstractPackageMojo.java?rev=1855195&r1=1855194&r2=1855195&view=diff
==============================================================================
--- jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/AbstractPackageMojo.java
(original)
+++ jackrabbit/commons/filevault-package-maven-plugin/trunk/src/main/java/org/apache/jackrabbit/filevault/maven/packaging/AbstractPackageMojo.java
Mon Mar 11 05:20:14 2019
@@ -32,7 +32,7 @@ public abstract class AbstractPackageMoj
 
     static final String JCR_ROOT = "jcr_root/";
 
-    private static final String PROPERTIES_EMBEDDEDFILESMAP_KEY = "vault.embeddedfiles.map";
+    private static final String PROPERTIES_EMBEDDEDFILESMAP_KEY = "embeddedfiles.map";
 
     private static final String VAULT_DIR = "META-INF/vault";
 
@@ -139,16 +139,18 @@ public abstract class AbstractPackageMoj
      * Sets the map of embedded files as project properties as a helper to pass data between
the goals
      * @param embeddedFiles map of embedded files.
      */
+    @SuppressWarnings("unchecked")
     void setEmbeddedFilesMap(Map<String, File> embeddedFiles) {
-        project.getProperties().put(PROPERTIES_EMBEDDEDFILESMAP_KEY, embeddedFiles);
+        getPluginContext().put(PROPERTIES_EMBEDDEDFILESMAP_KEY, embeddedFiles);
     }
 
     /**
      * Reads the map of embedded files from the project properties. This is a helper to pass
data between the goals.
      * @return the map of embedded files.
      */
+    @SuppressWarnings("unchecked")
     Map<String, File> getEmbeddedFilesMap() {
-        Object value = project.getProperties().get(PROPERTIES_EMBEDDEDFILESMAP_KEY);
+        Object value = getPluginContext().get(PROPERTIES_EMBEDDEDFILESMAP_KEY);
         if (value == null) {
             return Collections.emptyMap();
         } else {



Mime
View raw message