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 lc...@apache.org on 2012/05/03 13:07:43 UTC
svn commit: r1333445 - in
/incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy:
MsDeployResolveWebRolesMojo.java ResolveAzureWebRolesMojo.java
Author: lcorneliussen
Date: Thu May 3 13:07:43 2012
New Revision: 1333445
URL: http://svn.apache.org/viewvc?rev=1333445&view=rev
Log:
[NPANDAY-231] Remove RDF repository and model
o Use NPanday-Resolver to resolve azure web role references...
Added:
incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/ResolveAzureWebRolesMojo.java (contents, props changed)
- copied, changed from r1332286, incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/MsDeployResolveWebRolesMojo.java
Removed:
incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/MsDeployResolveWebRolesMojo.java
Copied: incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/ResolveAzureWebRolesMojo.java (from r1332286, incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/MsDeployResolveWebRolesMojo.java)
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/ResolveAzureWebRolesMojo.java?p2=incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/ResolveAzureWebRolesMojo.java&p1=incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/MsDeployResolveWebRolesMojo.java&r1=1332286&r2=1333445&rev=1333445&view=diff
==============================================================================
--- incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/MsDeployResolveWebRolesMojo.java (original)
+++ incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/ResolveAzureWebRolesMojo.java Thu May 3 13:07:43 2012
@@ -21,10 +21,14 @@ package npanday.plugin.msdeploy;
import com.google.common.collect.Lists;
import npanday.ArtifactType;
+import npanday.LocalRepositoryUtil;
+import npanday.resolver.NPandayDependencyResolution;
import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
+import java.io.File;
import java.util.List;
import java.util.Set;
@@ -37,12 +41,45 @@ import static com.google.common.collect.
* @author <a href="mailto:lcorneliussen@apache.org">Lars Corneliussen</a>
*
* @goal resolve-azure-web-roles
- *
- * TODO requiresDependencyResolution compile
*/
-public class MsDeployResolveWebRolesMojo
+public class ResolveAzureWebRolesMojo
extends AbstractMsDeployMojo<UnpackDependencyIterationItem>
{
+ /**
+ * @component
+ */
+ private NPandayDependencyResolution dependencyResolution;
+
+ /**
+ * The location of the local Maven repository.
+ *
+ * @parameter expression="${settings.localRepository}"
+ */
+ protected File localRepository;
+
+ /**
+ * Up to which scope dependencies should be considered.
+ *
+ * @parameter default-value="compile"
+ */
+ protected String dependencyScope;
+
+ @Override
+ public void execute() throws MojoExecutionException, MojoFailureException
+ {
+ try
+ {
+ dependencyResolution.require( project, LocalRepositoryUtil.create( localRepository ), dependencyScope );
+ }
+ catch ( ArtifactResolutionException e )
+ {
+ throw new MojoExecutionException(
+ "NPANDAY-156-000: Could not satisfy required dependencies for scope " + dependencyScope, e
+ );
+ }
+ super.execute();
+ }
+
@Override
protected void afterCommandExecution( UnpackDependencyIterationItem iterationItem ) throws MojoExecutionException
{
Propchange: incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/ResolveAzureWebRolesMojo.java
------------------------------------------------------------------------------
svn:eol-style = native