You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by br...@apache.org on 2013/03/06 15:22:35 UTC
svn commit: r1453381 -
/incubator/npanday/trunk/plugins/silverlight-maven-plugin/src/main/java/org/apache/npanday/plugins/silverlight/SilverlightPackageMojo.java
Author: brett
Date: Wed Mar 6 15:22:35 2013
New Revision: 1453381
URL: http://svn.apache.org/r1453381
Log:
[NPANDAY-452] Install Silverlight application DLL
This allows other projects to refer to the application as a dependency as if it
were another library.
Modified:
incubator/npanday/trunk/plugins/silverlight-maven-plugin/src/main/java/org/apache/npanday/plugins/silverlight/SilverlightPackageMojo.java
Modified: incubator/npanday/trunk/plugins/silverlight-maven-plugin/src/main/java/org/apache/npanday/plugins/silverlight/SilverlightPackageMojo.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/silverlight-maven-plugin/src/main/java/org/apache/npanday/plugins/silverlight/SilverlightPackageMojo.java?rev=1453381&r1=1453380&r2=1453381&view=diff
==============================================================================
--- incubator/npanday/trunk/plugins/silverlight-maven-plugin/src/main/java/org/apache/npanday/plugins/silverlight/SilverlightPackageMojo.java (original)
+++ incubator/npanday/trunk/plugins/silverlight-maven-plugin/src/main/java/org/apache/npanday/plugins/silverlight/SilverlightPackageMojo.java Wed Mar 6 15:22:35 2013
@@ -24,6 +24,7 @@ import org.apache.maven.plugin.AbstractM
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectHelper;
import java.io.File;
@@ -53,6 +54,11 @@ public class SilverlightPackageMojo
*/
protected MavenProject project;
+ /**
+ * @component
+ */
+ private MavenProjectHelper projectHelper;
+
public void execute()
throws MojoExecutionException, MojoFailureException
{
@@ -68,5 +74,13 @@ public class SilverlightPackageMojo
getLog().debug( "Set the artifact file to '" + artifact.getAbsolutePath() + "'." );
project.getArtifact().setFile( artifact );
+
+ // include the DLL for silverlight applications as well
+ if ( !"dll".equals( type.getExtension() ) )
+ {
+ File dllFile = new File( outputDirectory, project.getArtifactId() + ".dll" );
+ getLog().debug( "Attaching the DLL file '" + dllFile.getAbsolutePath() + "'." );
+ projectHelper.attachArtifact( project, "dll", dllFile );
+ }
}
}