Author: gnodet
Date: Mon Aug 21 14:09:59 2006
New Revision: 433360

URL: http://svn.apache.org/viewvc?rev=433360&view=rev
Log:
SM-545: fix component name retrieval for SU when generating the SA descriptor.
Use a full dependency graph so that artifacts are all kept when finding direct 
dependencies of one SU.
Also add missing copyrights and remove duplicate attributes on MOJOs.

Modified:
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/AbstractDeployableMojo.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateComponentDescriptorMojo.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateComponentMojo.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyDescriptorMojo.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyMojo.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceUnitDescriptorMojo.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateSharedLibraryDescriptorMojo.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/IsDeployedTask.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiPluginException.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiProjectDeployerMojo.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiResolutionListener.java
    
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiSharedLibraryDescriptorWriter.java

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/AbstractDeployableMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/AbstractDeployableMojo.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/AbstractDeployableMojo.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/AbstractDeployableMojo.java
 Mon Aug 21 14:09:59 2006
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.servicemix.maven.plugin.jbi;
 
 import org.apache.servicemix.jbi.management.task.JbiTask;

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateComponentDescriptorMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateComponentDescriptorMojo.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateComponentDescriptorMojo.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateComponentDescriptorMojo.java
 Mon Aug 21 14:09:59 2006
@@ -170,7 +170,6 @@
                JbiResolutionListener listener = resolveProject();
                // print(listener.getRootNode(), "");
 
-               Set sharedLibraries = new HashSet();
                Set includes = new HashSet();
                for (Iterator iter = project.getArtifacts().iterator(); 
iter.hasNext();) {
                        Artifact artifact = (Artifact) iter.next();

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateComponentMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateComponentMojo.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateComponentMojo.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateComponentMojo.java
 Mon Aug 21 14:09:59 2006
@@ -170,7 +170,6 @@
                JbiResolutionListener listener = resolveProject();
                // print(listener.getRootNode(), "");
 
-               Set sharedLibraries = new HashSet();
                Set includes = new HashSet();
                for (Iterator iter = project.getArtifacts().iterator(); 
iter.hasNext();) {
                        Artifact artifact = (Artifact) iter.next();

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyDescriptorMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyDescriptorMojo.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyDescriptorMojo.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyDescriptorMojo.java
 Mon Aug 21 14:09:59 2006
@@ -24,13 +24,11 @@
 import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.MavenProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
 import org.codehaus.plexus.util.FileUtils;
 
@@ -83,21 +81,11 @@
         * @parameter expression="${project.build.directory}/classes/META-INF"
         */
        private String generatedDescriptorLocation;
-
-       /**
-        * @component
-        */
-       private MavenProjectBuilder pb;
-
-       /**
-        * @parameter default-value="${localRepository}"
-        */
-       private ArtifactRepository localRepo;
-
-       /**
-        * @parameter default-value="${project.remoteArtifactRepositories}"
-        */
-       private List remoteRepos;
+    
+    /**
+     * Dependency graph
+     */
+    private JbiResolutionListener listener;
 
        public void execute() throws MojoExecutionException, 
MojoFailureException {
 
@@ -121,6 +109,7 @@
                // Generate jbi descriptor and copy it to the build directory
                getLog().info("Generating jbi.xml");
                try {
+            listener = resolveProject();
                        generateJbiDescriptor();
                } catch (JbiPluginException e) {
                        throw new MojoExecutionException("Failed to generate 
jbi.xml", e);
@@ -162,7 +151,7 @@
                                        && 
(artifact.getDependencyTrail().size() == 2)) {
                                MavenProject project = null;
                                try {
-                                       project = 
pb.buildFromRepository(artifact, remoteRepos,
+                                       project = 
projectBuilder.buildFromRepository(artifact, remoteRepos,
                                                        localRepo);
                                } catch (ProjectBuildingException e) {
                                        getLog().warn(
@@ -225,45 +214,32 @@
                if (project.getProperties().getProperty("componentName") != 
null) {
                        return 
project.getProperties().getProperty("componentName");
                }
-
-               String currentArtifact = suArtifact.getGroupId() + ":"
-                               + suArtifact.getArtifactId() + ":" + 
suArtifact.getType() + ":"
-                               + suArtifact.getVersion();
-
-               // Find artifacts directly under this project
-               for (Iterator iter = artifacts.iterator(); iter.hasNext();) {
-                       Artifact artifact = (Artifact) iter.next();
-                       if ((artifact.getDependencyTrail().size() == 3)) {
-                               String parent = getDependencyParent(artifact
-                                               .getDependencyTrail());         
                
-                               if (parent.equals(currentArtifact)) {           
                        
-                                       MavenProject artifactProject = null;
-                                       try {
-                                               artifactProject = 
pb.buildFromRepository(artifact,
-                                                               remoteRepos, 
localRepo);
-                                       } catch (ProjectBuildingException e) {
-                                               getLog().warn(
-                                                               "Unable to 
determine packaging for dependency : "
-                                                                               
+ artifact.getArtifactId()
-                                                                               
+ " assuming jar");
-                                       }
-                                       getLog().info("Project 
"+artifactProject+" packaged "+artifactProject.getPackaging());
-                                       if ((artifactProject != null)
-                                                       && 
(artifactProject.getPackaging()
-                                                                       
.equals("jbi-component"))) {
-                                               return artifact.getArtifactId();
-                                       }
-                               }
-                       }
-               }
-
+        
+        JbiResolutionListener.Node n = listener.getNode(suArtifact);
+        for (Iterator it = n.getChildren().iterator(); it.hasNext();) {
+            JbiResolutionListener.Node child = (JbiResolutionListener.Node) 
it.next(); 
+            MavenProject artifactProject = null;
+            try {
+                artifactProject = 
projectBuilder.buildFromRepository(child.getArtifact(),
+                        remoteRepos, localRepo);
+            } catch (ProjectBuildingException e) {
+                getLog().warn(
+                        "Unable to determine packaging for dependency : "
+                                + child.getArtifact().getArtifactId()
+                                + " assuming jar");
+            }
+            getLog().info("Project "+artifactProject+" packaged 
"+artifactProject.getPackaging());
+            if ((artifactProject != null)
+                    && (artifactProject.getPackaging()
+                            .equals("jbi-component"))) {
+                return child.getArtifact().getArtifactId();
+            }
+        }
+        
                throw new MojoExecutionException(
                                "The service unit "
                                                + project.getArtifactId()
                                                + " does not have a dependency 
which is packaged as a jbi-component or a project property 'componentName'");
        }
 
-       private String getDependencyParent(List dependencyTrail) {
-               return (String) dependencyTrail.get(dependencyTrail.size() - 2);
-       }
 }

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyMojo.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyMojo.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyMojo.java
 Mon Aug 21 14:09:59 2006
@@ -22,7 +22,6 @@
 import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
@@ -44,11 +43,6 @@
  * @description injects additional libraries into service assembly
  */
 public class GenerateServiceAssemblyMojo extends AbstractJbiMojo {
-
-       /**
-        * @component
-        */
-       private ArtifactFactory af;
 
        /**
         * Directory where the application.xml file will be auto-generated.

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceUnitDescriptorMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceUnitDescriptorMojo.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceUnitDescriptorMojo.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceUnitDescriptorMojo.java
 Mon Aug 21 14:09:59 2006
@@ -27,13 +27,11 @@
 import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.MavenProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
 import org.apache.servicemix.common.packaging.ServiceUnitAnalyzer;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
@@ -102,21 +100,6 @@
         */
        private File serviceUnitArtifactsDir;
 
-       /**
-        * @component
-        */
-       private MavenProjectBuilder pb;
-
-       /**
-        * @parameter default-value="${localRepository}"
-        */
-       private ArtifactRepository localRepo;
-
-       /**
-        * @parameter default-value="${project.remoteArtifactRepositories}"
-        */
-       private List remoteRepos;
-
        public void execute() throws MojoExecutionException, 
MojoFailureException {
 
                getLog().debug(
@@ -270,7 +253,7 @@
                                        && 
(artifact.getDependencyTrail().size() == 2)) {
                                MavenProject project = null;
                                try {
-                                       project = 
pb.buildFromRepository(artifact, remoteRepos,
+                                       project = 
projectBuilder.buildFromRepository(artifact, remoteRepos,
                                                        localRepo);
                                } catch (ProjectBuildingException e) {
                                        getLog().warn(

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateSharedLibraryDescriptorMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateSharedLibraryDescriptorMojo.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateSharedLibraryDescriptorMojo.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateSharedLibraryDescriptorMojo.java
 Mon Aug 21 14:09:59 2006
@@ -24,11 +24,9 @@
 import java.util.Set;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProjectBuilder;
 import org.codehaus.plexus.util.FileUtils;
 
 /**
@@ -94,21 +92,6 @@
         * @parameter expression="${project.build.directory}"
         */
        private String generatedDescriptorLocation;
-
-       /**
-        * @component
-        */
-       private MavenProjectBuilder pb;
-
-       /**
-        * @parameter default-value="${localRepository}"
-        */
-       private ArtifactRepository localRepo;
-
-       /**
-        * @parameter default-value="${project.remoteArtifactRepositories}"
-        */
-       private List remoteRepos;
 
        public void execute() throws MojoExecutionException, 
MojoFailureException {
 

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/IsDeployedTask.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/IsDeployedTask.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/IsDeployedTask.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/IsDeployedTask.java
 Mon Aug 21 14:09:59 2006
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.servicemix.maven.plugin.jbi;
 
 import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiPluginException.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiPluginException.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiPluginException.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiPluginException.java
 Mon Aug 21 14:09:59 2006
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.servicemix.maven.plugin.jbi;
 
 public class JbiPluginException extends Exception {

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiProjectDeployerMojo.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiProjectDeployerMojo.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiProjectDeployerMojo.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiProjectDeployerMojo.java
 Mon Aug 21 14:09:59 2006
@@ -25,14 +25,11 @@
 import java.util.Stack;
 
 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.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.MavenProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
 import org.apache.servicemix.jbi.management.task.DeployServiceAssemblyTask;
 import org.apache.servicemix.jbi.management.task.InstallComponentTask;
@@ -70,31 +67,6 @@
        private List deploymentTypes;
 
        /**
-        * @parameter default-value="${project}"
-        */
-       private MavenProject project;
-
-       /**
-        * @component
-        */
-       private MavenProjectBuilder pb;
-
-       /**
-        * @component
-        */
-       private ArtifactFactory af;
-
-       /**
-        * @parameter default-value="${localRepository}"
-        */
-       private ArtifactRepository localRepo;
-
-       /**
-        * @parameter default-value="${project.remoteArtifactRepositories}"
-        */
-       private List remoteRepos;
-
-       /**
         * @parameter default-value="true"
         */
        private boolean deployDependencies;
@@ -293,7 +265,7 @@
                        throws ArtifactResolutionException, 
ArtifactNotFoundException {
                MavenProject project = null;
                try {
-                       project = pb.buildFromRepository(artifact, remoteRepos, 
localRepo,
+                       project = projectBuilder.buildFromRepository(artifact, 
remoteRepos, localRepo,
                                        true);
                } catch (ProjectBuildingException e) {
                        getLog().warn(
@@ -322,7 +294,7 @@
        private JbiDeployableArtifact resolveDeploymentPackage(
                        MavenProject project, Artifact artifact)
                        throws ArtifactResolutionException, 
ArtifactNotFoundException {
-               Artifact jbiArtifact = af.createArtifactWithClassifier(artifact
+               Artifact jbiArtifact = 
factory.createArtifactWithClassifier(artifact
                                .getGroupId(), artifact.getArtifactId(), 
artifact.getVersion(),
                                "zip", getExtension(project));
                resolver.resolve(jbiArtifact, remoteRepos, localRepo);

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiResolutionListener.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiResolutionListener.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiResolutionListener.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiResolutionListener.java
 Mon Aug 21 14:09:59 2006
@@ -1,5 +1,3 @@
-package org.apache.servicemix.maven.plugin.jbi;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.servicemix.maven.plugin.jbi;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.resolver.ResolutionListener;

Modified: 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiSharedLibraryDescriptorWriter.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiSharedLibraryDescriptorWriter.java?rev=433360&r1=433359&r2=433360&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiSharedLibraryDescriptorWriter.java
 (original)
+++ 
incubator/servicemix/trunk/tooling/jbi-maven-plugin/src/main/java/org/apache/servicemix/maven/plugin/jbi/JbiSharedLibraryDescriptorWriter.java
 Mon Aug 21 14:09:59 2006
@@ -23,7 +23,6 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.maven.artifact.Artifact;
 import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
 import org.codehaus.plexus.util.xml.XMLWriter;
 


Reply via email to