You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by me...@apache.org on 2006/09/17 21:44:48 UTC

svn commit: r447122 - in /incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war: Dependency.java TuscanyWarMojo.java

Author: meerajk
Date: Sun Sep 17 12:44:47 2006
New Revision: 447122

URL: http://svn.apache.org/viewvc?view=rev&rev=447122
Log:
Re-edited to remove windows CR.

Modified:
    incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war/Dependency.java
    incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war/TuscanyWarMojo.java

Modified: incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war/Dependency.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war/Dependency.java?view=diff&rev=447122&r1=447121&r2=447122
==============================================================================
--- incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war/Dependency.java (original)
+++ incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war/Dependency.java Sun Sep 17 12:44:47 2006
@@ -23,7 +23,7 @@
 
 /**
  * Represents a configured tuscany dependency for boot and extension libraries.
- *
+ * 
  * @version
  */
 public class Dependency {
@@ -34,8 +34,7 @@
     private static final String TYPE_JAR = "jar";
 
     /**
-     * Default boot libraries.
-     * TODO Decide on whether to get snapshot version rather than hardcoded version..
+     * Default boot libraries. TODO Decide on whether to get snapshot version rather than hardcoded version..
      */
     private static final Dependency[] DEFAULT_BOOT_LIBS = new Dependency[] { new WebappHostDependency() };
 
@@ -56,14 +55,14 @@
 
     /**
      * Default constructor.
-     *
+     * 
      */
     public Dependency() {
     }
 
     /**
      * Initializes the field.
-     *
+     * 
      * @param groupId
      *            Group id.
      * @param artifactId
@@ -80,7 +79,7 @@
 
     /**
      * Gets the artifact using the specified artifact factory.
-     *
+     * 
      * @param artifactFactory
      *            Artifact factory to use.
      * @return Artifact identified by the dependency.
@@ -91,6 +90,7 @@
 
     /**
      * Returns the default boot libraries.
+     * 
      * @return Default boot libraries.
      */
     public static Dependency[] getDefaultBootLibs() {
@@ -99,7 +99,9 @@
 
     /**
      * Checks whether the specified artifact has the same artifact id.
-     * @param artifact Artifact to be matched.
+     * 
+     * @param artifact
+     *            Artifact to be matched.
      * @return True if the sepcified artifact has the same id.
      */
     public boolean match(Artifact artifact) {

Modified: incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war/TuscanyWarMojo.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war/TuscanyWarMojo.java?view=diff&rev=447122&r1=447121&r2=447122
==============================================================================
--- incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war/TuscanyWarMojo.java (original)
+++ incubator/tuscany/java/sca/plugins/plugin.war/src/main/java/org/apache/tuscany/plugin/war/TuscanyWarMojo.java Sun Sep 17 12:44:47 2006
@@ -170,6 +170,12 @@
      */
     public void execute() throws MojoExecutionException {
 
+        System.err.println(this.artifactFactory);
+        System.err.println(this.metadataSource);
+        System.err.println(this.resolver);
+        System.err.println(this.localRepository);
+        System.err.println(this.remoteRepositories);
+
         JarFile originalWar = null;
         JarOutputStream newWar = null;
         File originalWarFile = null;
@@ -236,7 +242,8 @@
      * @throws ArtifactNotFoundException If the artifact is not found.
      * @throws ArtifactMetadataRetrievalException In case of error in retrieving metadata.
      */
-    private Set<Artifact> resolveDependency(Dependency dependency, boolean transitive) throws IOException, ArtifactResolutionException, ArtifactNotFoundException, ArtifactMetadataRetrievalException {
+    private Set<Artifact> resolveDependency(Dependency dependency, boolean transitive) throws IOException, ArtifactResolutionException,
+            ArtifactNotFoundException, ArtifactMetadataRetrievalException {
 
         Set<Artifact> resolvedArtifacts = new HashSet<Artifact>();
 
@@ -276,13 +283,12 @@
         FileOutputStream fileOutputStream = null;
 
         try {
-            
+
             File artifactFile = artifact.getFile();
             if (packagedLibs.contains(artifactFile.getName())) {
                 return;
             }
             artifactStream = new FileInputStream(artifactFile);
-            
 
             newWar.putNextEntry(new JarEntry(path + artifactFile.getName()));
 
@@ -298,7 +304,7 @@
 
             artifactStream = new FileInputStream(artifactFile);
             IOUtils.copy(artifactStream, newWar);
-            
+
             packagedLibs.add(artifactFile.getName());
 
             getLog().info("Processed " + path + artifactFile.getName());



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org