Closed jthomaskerr closed 12 years ago
diff --git a/branches/2.0-SNAPSHOT/maven-php-phar/src/main/java/org/phpmaven/phar/IPharPackagingRequest.java b/branches/2.0-SNAPSHOT/maven-php-phar/src/main/java/org/phpmaven/phar/IPharPackagingRequest.java index b0e8ec9..aefba66 100644 --- a/branches/2.0-SNAPSHOT/maven-php-phar/src/main/java/org/phpmaven/phar/IPharPackagingRequest.java +++ b/branches/2.0-SNAPSHOT/maven-php-phar/src/main/java/org/phpmaven/phar/IPharPackagingRequest.java @@ -17,6 +17,7 @@ package org.phpmaven.phar;
import java.io.File; +import java.util.Map;
import org.phpmaven.core.IComponentFactory;
@@ -107,6 +108,14 @@ import org.phpmaven.core.IComponentFactory;
Usage: <metadata><myMetadataKey>Value</myMetadataKey></metadata>
@author Martin Eisengardt Martin.Eisengardt@googlemail.com @@ -323,5 +332,16 @@ public interface IPharPackagingRequest {
+
import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.logging.Log; @@ -99,7 +100,16 @@ public class PharPackager implements IPharPackager {
final String targetMasked = request.getTargetDirectory().getAbsolutePath().replace("\\", "\\\\");
final String stubToUse = request.getStub().replace("\\", "\\\\").replace("'", "\\'");
String compression = ""; if (request.isCompressed()) { if (request.isLargePhar()) { @@ -115,7 +125,8 @@ public class PharPackager implements IPharPackager { replace("$:{pharcontents}", contents.toString()). // TODO: May we need to set a compression template???? replace("$:{pharcompression}", compression).
replace("$:{pharmetadata}", metadata);
// XXX: respect build directory (set working path) exec.executeCode("", snippet); diff --git a/branches/2.0-SNAPSHOT/maven-php-phar/src/main/java/org/phpmaven/phar/PharPackagingRequest.java b/branches/2.0-SNAPSHOT/maven-php-phar/src/main/java/org/phpmaven/phar/PharPackagingRequest.java index e952a3e..06d92c1 100644 --- a/branches/2.0-SNAPSHOT/maven-php-phar/src/main/java/org/phpmaven/phar/PharPackagingRequest.java +++ b/branches/2.0-SNAPSHOT/maven-php-phar/src/main/java/org/phpmaven/phar/PharPackagingRequest.java @@ -18,7 +18,9 @@ package org.phpmaven.phar;
import java.io.File; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map;
import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Configuration; @@ -55,6 +57,7 @@ public class PharPackagingRequest implements IPharPackagingRequest { "$:{pharcontents}" + "$:{pharcompression}" + "$phar->setStub('$:{pharstub}');\n" +
@@ -120,6 +123,11 @@ public class PharPackagingRequest implements IPharPackagingRequest { private boolean largeFile;
/**
Hmm...perhaps that was not a good way to submit a patch....there doesn't appear to be an attachment option...
Can you attach the patch as text file?
Here (hopefully) is the attachment.
On 8 June 2012 01:33, Martin Eisengardt < reply@reply.github.com
wrote:
Can you attach the patch as text file?
Reply to this email directly or view it on GitHub:
https://github.com/php-maven/maven-php-plugin/issues/13#issuecomment-6179077
hmmm. do not see any attachement. :( So please add it to our trac: http://trac.php-maven.org/ticket/77 Or send it to me directly: martin.eisengardt@php-maven.org
Closing it know. Please watch the trac ticket for news.
I would like to be able to add metadata to a phar as part of a maven phase. This is a simple change to add an extra configuration entry to the build plugin, eg:
I have implemented these changes in the 2.0-SNAPSHOT branch (is this the appropriate place?) and attached a patch. it would be fantastic if this made it to the next release.