You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/07/19 22:49:25 UTC
svn commit: r423598 -
/cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
Author: cziegeler
Date: Wed Jul 19 13:49:24 2006
New Revision: 423598
URL: http://svn.apache.org/viewvc?rev=423598&view=rev
Log:
Remove wrong scope check
Modified:
cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
Modified: cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java?rev=423598&r1=423597&r2=423598&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java (original)
+++ cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java Wed Jul 19 13:49:24 2006
@@ -231,45 +231,43 @@
Map files = new HashMap();
for(Iterator it = this.getProject().getArtifacts().iterator(); it.hasNext(); ) {
Artifact artifact = (Artifact) it.next();
- if ( artifact.getScope() == Artifact.SCOPE_RUNTIME ) {
- String id = artifact.getArtifactId();
- if (files.containsKey(id)) {
- // Now search for all artifacts and print their dependency trail
- StringBuffer msg = new StringBuffer("There are at least two artifacts with the ID '");
- msg.append(id);
- msg.append("':");
- msg.append(SystemUtils.LINE_SEPARATOR);
- for(Iterator ai = this.getProject().getArtifacts().iterator(); ai.hasNext(); ) {
- final Artifact current = (Artifact) ai.next();
- if ( current.getArtifactId().equals(id) ) {
- msg.append(artifact);
- msg.append(SystemUtils.LINE_SEPARATOR);
- final List l = current.getDependencyTrail();
- final Iterator i = l.iterator();
- while ( i.hasNext() ) {
- msg.append(" ");
- msg.append(i.next().toString());
- msg.append(SystemUtils.LINE_SEPARATOR);
- }
- }
- }
- throw new MojoExecutionException(msg.toString());
- }
- if (containsArtifact(excludedBlocks, artifact.getArtifactId(), artifact.getGroupId())) {
- this.getLog().debug("Skipping " + artifact);
- } else {
- files.put(id, artifact.getFile());
- if ( this.getLog().isDebugEnabled() ) {
- StringBuffer msg = new StringBuffer("Deploying " + artifact);
- final List l = artifact.getDependencyTrail();
+ String id = artifact.getArtifactId();
+ if (files.containsKey(id)) {
+ // Now search for all artifacts and print their dependency trail
+ StringBuffer msg = new StringBuffer("There are at least two artifacts with the ID '");
+ msg.append(id);
+ msg.append("':");
+ msg.append(SystemUtils.LINE_SEPARATOR);
+ for(Iterator ai = this.getProject().getArtifacts().iterator(); ai.hasNext(); ) {
+ final Artifact current = (Artifact) ai.next();
+ if ( current.getArtifactId().equals(id) ) {
+ msg.append(artifact);
+ msg.append(SystemUtils.LINE_SEPARATOR);
+ final List l = current.getDependencyTrail();
final Iterator i = l.iterator();
while ( i.hasNext() ) {
msg.append(" ");
msg.append(i.next().toString());
msg.append(SystemUtils.LINE_SEPARATOR);
}
- this.getLog().debug(msg.toString());
}
+ }
+ throw new MojoExecutionException(msg.toString());
+ }
+ if (containsArtifact(excludedBlocks, artifact.getArtifactId(), artifact.getGroupId())) {
+ this.getLog().debug("Skipping " + artifact);
+ } else {
+ files.put(id, artifact.getFile());
+ if ( this.getLog().isDebugEnabled() ) {
+ StringBuffer msg = new StringBuffer("Deploying " + artifact);
+ final List l = artifact.getDependencyTrail();
+ final Iterator i = l.iterator();
+ while ( i.hasNext() ) {
+ msg.append(" ");
+ msg.append(i.next().toString());
+ msg.append(SystemUtils.LINE_SEPARATOR);
+ }
+ this.getLog().debug(msg.toString());
}
}
}