Author: veithen
Date: Tue Nov  1 16:17:05 2011
New Revision: 1196084

URL: http://svn.apache.org/viewvc?rev=1196084&view=rev
Log:
Merged r1195972 and r1195982 to the 1.6 branch to make sure that users will be 
able to import the Axis2 1.6.2 source code into Eclipse.

Modified:
    axis/axis2/java/core/branches/1_6/   (props changed)
    
axis/axis2/java/core/branches/1_6/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/AbstractCreateRepositoryMojo.java
    axis/axis2/java/core/branches/1_6/src/site/xdoc/svn.xml

Propchange: axis/axis2/java/core/branches/1_6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov  1 16:17:05 2011
@@ -1 +1 @@
-/axis/axis2/java/core/trunk:1068985,1069659,1069898,1070439,1072077,1072271,1072296,1072499,1072510,1075057,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1096530,1096557,1099385,1099389,1100628,1101037,1103013,1103336,1103606,1103760,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1136177,1137153,1137159,1138144,1138203,1139448,1139484,1147485,1149224,1149491,1149578,1150055,1154615,1156305,1156382,1157211,1157265,1157373,1157415,1157424,1157501,1157517,1157522,1157535,1163389,1166038,1166040,1166132,1167045,1174618,1184808,1184810,1184816,1190469,1190499
+/axis/axis2/java/core/trunk:1068985,1069659,1069898,1070439,1072077,1072271,1072296,1072499,1072510,1075057,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1096530,1096557,1099385,1099389,1100628,1101037,1103013,1103336,1103606,1103760,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1136177,1137153,1137159,1138144,1138203,1139448,1139484,1147485,1149224,1149491,1149578,1150055,1154615,1156305,1156382,1157211,1157265,1157373,1157415,1157424,1157501,1157517,1157522,1157535,1163389,1166038,1166040,1166132,1167045,1174618,1184808,1184810,1184816,1190469,1190499,1195972,1195982

Modified: 
axis/axis2/java/core/branches/1_6/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/AbstractCreateRepositoryMojo.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/AbstractCreateRepositoryMojo.java?rev=1196084&r1=1196083&r2=1196084&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/1_6/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/AbstractCreateRepositoryMojo.java
 (original)
+++ 
axis/axis2/java/core/branches/1_6/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/AbstractCreateRepositoryMojo.java
 Tue Nov  1 16:17:05 2011
@@ -22,7 +22,6 @@ package org.apache.axis2.maven2.repo;
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -31,10 +30,6 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.AbstractArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
@@ -48,16 +43,6 @@ import org.codehaus.plexus.util.StringUt
 
 public abstract class AbstractCreateRepositoryMojo extends AbstractMojo {
     /**
-     * @component
-     */
-    private ArtifactFactory factory;
-    
-    /**
-     * @component
-     */
-    private ArtifactResolver resolver;
-    
-    /**
      * @parameter expression="${project.artifacts}"
      * @readonly
      * @required
@@ -65,20 +50,6 @@ public abstract class AbstractCreateRepo
     private Set<Artifact> projectArtifacts;
     
     /**
-     * @parameter expression="${project.remoteArtifactRepositories}"
-     * @readonly
-     * @required
-     */
-    private List remoteRepositories;
-    
-    /**
-     * @parameter expression="${localRepository}"
-     * @readonly
-     * @required
-     */
-    private ArtifactRepository localRepository;
-    
-    /**
      * @parameter expression="${project.collectedProjects}"
      * @required
      * @readonly
@@ -213,11 +184,16 @@ public abstract class AbstractCreateRepo
             }
             selectArtifacts(artifacts, modules, "mar");
             selectArtifacts(artifacts, services, "aar");
-            artifacts = replaceIncompleteArtifacts(artifacts);
             Map<String,ArchiveDeployer> deployers = new 
HashMap<String,ArchiveDeployer>();
             deployers.put("aar", new ArchiveDeployer(outputDirectory, 
servicesDirectory, "services.list", generateFileLists, stripServiceVersion));
             deployers.put("mar", new ArchiveDeployer(outputDirectory, 
modulesDirectory, "modules.list", generateFileLists, stripModuleVersion));
             for (Artifact artifact : artifacts) {
+                File file = artifact.getFile();
+                if (file == null || file.isDirectory()) {
+                    throw new MojoFailureException("Artifact " + 
artifact.getId() + " not available. " +
+                               "This typically means that it is part of the 
reactor but that the " +
+                               "package phase has not been executed.");
+                }
                 String type = artifact.getType();
                 ArchiveDeployer deployer = deployers.get(type);
                 if (deployer == null) {
@@ -255,32 +231,4 @@ public abstract class AbstractCreateRepo
             }
         }
     }
-
-    /**
-     * Replace artifacts that have not been packaged yet. This occurs if the 
artifact is
-     * part of the reactor build and the compile phase has been executed, but 
not the
-     * the package phase. These artifacts will be replaced by new artifact 
objects
-     * resolved from the repository.
-     * 
-     * @param artifacts the original sets of {@link Artifact} objects
-     * @return a set of {@link Artifact} objects built as described above
-     * @throws MojoExecutionException
-     */
-    private Set<Artifact> replaceIncompleteArtifacts(Set<Artifact> artifacts) 
throws MojoExecutionException {
-        Set<Artifact> result = new HashSet<Artifact>();
-        for (Artifact artifact : artifacts) {
-            File file = artifact.getFile();
-            if (file != null && file.isDirectory()) {
-                artifact = 
factory.createDependencyArtifact(artifact.getGroupId(), 
artifact.getArtifactId(),
-                        artifact.getVersionRange(), artifact.getType(), 
artifact.getClassifier(), artifact.getScope());
-                try {
-                    resolver.resolve(artifact, remoteRepositories, 
localRepository);
-                } catch (AbstractArtifactResolutionException ex) {
-                    throw new MojoExecutionException(ex.getMessage(), ex);
-                }
-            }
-            result.add(artifact);
-        }
-        return result;
-    }
 }

Modified: axis/axis2/java/core/branches/1_6/src/site/xdoc/svn.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/src/site/xdoc/svn.xml?rev=1196084&r1=1196083&r2=1196084&view=diff
==============================================================================
--- axis/axis2/java/core/branches/1_6/src/site/xdoc/svn.xml (original)
+++ axis/axis2/java/core/branches/1_6/src/site/xdoc/svn.xml Tue Nov  1 16:17:05 
2011
@@ -123,7 +123,7 @@
                         in multi-module builds. While this has no impact on 
the normal Maven
                         build, it prevents the Maven Eclipse plugin from 
identifying modules
                         with these packagings as Java projects. Therefore it 
is recommended
-                        to use Maven 2.2.x to execute the Maven Eclipse plugin.
+                        to use Maven 2.2.x or 3.0.x to execute the Maven 
Eclipse plugin.
                     </li>
                     <li>
                         By default, the Maven Eclipse plugin only imports 
generated sources
@@ -132,20 +132,20 @@
                         are generated during the 
<tt>generate-test-sources</tt> and
                         <tt>generate-test-resources</tt> phases. This is due 
to a limitation in Maven 2 (see
                         <a 
href="http://jira.codehaus.org/browse/MECLIPSE-37";>MECLIPSE-37</a>
-                        for more information). Therefore it is recommended to 
execute the
-                        <tt>eclipse:eclipse</tt> goal after the 
<tt>process-test-resources</tt>
-                        phase.
-                    </li>
-                    <li>
-                        There is a bug in the Maven Eclipse plugin version 2.8 
that causes
-                        it to fail on the Axis2 sources. However, version 2.7 
is known to work.
+                        for more information). Executing the 
<tt>eclipse:eclipse</tt> goal after
+                        the <tt>process-test-resources</tt> phase is also not 
enough because of
+                        <a 
href="http://jira.codehaus.org/browse/MDEP-259";>MDEP-259</a>. The
+                        best is to execute it after the <tt>install</tt> 
phase. The <tt>skipTests</tt>
+                        property can be used to skip the execution of the unit 
tests (<tt>maven.test.skip</tt>
+                        is not appropriate here because it also skips some of 
the goals configured
+                        in the <tt>generate-test-sources</tt> and 
<tt>generate-test-resources</tt> phases).
                     </li>
                 </ul>
                 <p>
                     To summarize, use the following command to prepare the 
Axis2 sources for
                     import into Eclipse:
                 </p>
-                <pre>mvn process-test-resources 
org.apache.maven.plugins:maven-eclipse-plugin:2.7:eclipse</pre>
+                <pre>mvn -DskipTests=true install eclipse:eclipse</pre>
                 <p>
                     As usual, before importing the projects into Eclipse, 
check that a Classpath Variable
                     for <tt>M2_REPO</tt> is configured in Eclipse. Then select 
File &gt; Import &gt; Existing Projects


Reply via email to