continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r312712 - in /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum: execution/maven/m1/ project/builder/maven/
Date Mon, 10 Oct 2005 19:11:55 GMT
Author: evenisse
Date: Mon Oct 10 12:11:49 2005
New Revision: 312712

URL: http://svn.apache.org/viewcvs?rev=312712&view=rev
Log:
[CONTINUUM-337] fix group name. Group name is the name of parent project and groupId if name
doesn't exist.

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java?rev=312712&r1=312711&r2=312712&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
Mon Oct 10 12:11:49 2005
@@ -128,6 +128,14 @@
         }
 
         // ----------------------------------------------------------------------
+        // description
+        // ----------------------------------------------------------------------
+
+        String shortDescription = getValue( mavenProject, "shortDescription", project.getDescription()
);
+
+        String description = getValue( mavenProject, "description", project.getDescription()
);
+
+        // ----------------------------------------------------------------------
         // scm
         // ----------------------------------------------------------------------
 
@@ -327,6 +335,15 @@
         project.setVersion( version );
 
         project.setName( name );
+
+        if ( StringUtils.isEmpty( shortDescription ) )
+        {
+            project.setDescription( description );
+        }
+        else
+        {
+            project.setDescription( shortDescription );
+        }
 
         project.setScmUrl( scmConnection );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java?rev=312712&r1=312711&r2=312712&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
Mon Oct 10 12:11:49 2005
@@ -29,6 +29,7 @@
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
 import java.io.IOException;
@@ -77,10 +78,10 @@
             return result;
         }
 
+        Project project = new Project();
+
         try
         {
-            Project project = new Project();
-
             metadataHelper.mapMetadata( pomFile, project );
 
             BuildDefinition bd = new BuildDefinition();
@@ -111,15 +112,37 @@
             result.addWarning( e.getMessage() );
         }
 
+        ProjectGroup projectGroup = new ProjectGroup();
+
         // ----------------------------------------------------------------------
-        // This is a hack.
+        // Group id
         // ----------------------------------------------------------------------
 
-        ProjectGroup projectGroup = new ProjectGroup();
+        if ( StringUtils.isEmpty( project.getGroupId() ) )
+        {
+            return null;
+        }
+
+        projectGroup.setGroupId( project.getGroupId() );
+
+        // ----------------------------------------------------------------------
+        // Name
+        // ----------------------------------------------------------------------
+
+        String name = project.getName();
 
-        projectGroup.setName( "Maven 1 group" );
+        if ( StringUtils.isEmpty( name ) )
+        {
+            name = project.getGroupId();
+        }
+
+        projectGroup.setName( name );
+
+        // ----------------------------------------------------------------------
+        // Description
+        // ----------------------------------------------------------------------
 
-        projectGroup.setGroupId( "dummy" );
+        projectGroup.setDescription( project.getDescription() );
 
         result.addProjectGroup( projectGroup );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java?rev=312712&r1=312711&r2=312712&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
Mon Oct 10 12:11:49 2005
@@ -224,7 +224,7 @@
 
         if ( StringUtils.isEmpty( name ) )
         {
-            name = mavenProject.getId();
+            name = mavenProject.getGroupId();
         }
 
         projectGroup.setName( name );
@@ -235,29 +235,6 @@
 
         projectGroup.setDescription( mavenProject.getDescription() );
 
-        // ----------------------------------------------------------------------
-        // URL
-        // ----------------------------------------------------------------------
-
-/*
-        projectGroup.setUrl( mavenProject.getUrl() );
-
-        // ----------------------------------------------------------------------
-        //
-        // ----------------------------------------------------------------------
-
-        String issueManagementUrl = null;
-
-        IssueManagement issueManagement = mavenProject.getIssueManagement();
-
-        if ( issueManagement != null )
-        {
-            issueManagementUrl = issueManagement.getUrl();
-        }
-
-        projectGroup.setIssueManagementUrl( issueManagementUrl );
-
-*/
         return projectGroup;
     }
 }



Mime
View raw message