Author: bentmann
Date: Sat Mar 21 15:34:11 2009
New Revision: 756956

URL: http://svn.apache.org/viewvc?rev=756956&view=rev
Log:
o Fixed URL processing

Added:
    
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/
   (with props)
    
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/pom.xml
   (with props)
Modified:
    
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ModelProcessor.java
    
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

Modified: 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ModelProcessor.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ModelProcessor.java?rev=756956&r1=756955&r2=756956&view=diff
==============================================================================
--- 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ModelProcessor.java
 (original)
+++ 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/processor/ModelProcessor.java
 Sat Mar 21 15:34:11 2009
@@ -119,7 +119,7 @@
             t.setInceptionYear( p.getInceptionYear() );
         }
         
-        if(t.getUrl() != null)
+        if ( c.getUrl() != null )
         {
             t.setUrl(c.getUrl());         
         }       

Modified: 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=756956&r1=756955&r2=756956&view=diff
==============================================================================
--- 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Sat Mar 21 15:34:11 2009
@@ -965,6 +965,33 @@
         assertEquals( pom.getBasedir().toURI().toString(), pom.getValue( 
"properties/prop1" ).toString() );
     }
 
+    public void testCompleteModel()
+        throws Exception
+    {
+        PomTestWrapper pom = buildPom( "complete-model" );
+
+        assertEquals( "4.0.0", pom.getValue( "modelVersion" ) );
+
+        assertEquals( "org.apache.maven.its.mng", pom.getValue( "groupId" ) );
+        assertEquals( "test", pom.getValue( "artifactId" ) );
+        assertEquals( "0.2", pom.getValue( "version" ) );
+        assertEquals( "pom", pom.getValue( "packaging" ) );
+
+        assertEquals( "project-name", pom.getValue( "name" ) );
+        assertEquals( "project-description", pom.getValue( "description" ) );
+        assertEquals( "http://project.url/";, pom.getValue( "url" ) );
+        assertEquals( "2009", pom.getValue( "inceptionYear" ) );
+
+        assertEquals( "project-org", pom.getValue( "organization/name" ) );
+        assertEquals( "http://project-org.url/";, pom.getValue( 
"organization/url" ) );
+
+        assertEquals( 1, ((List<?>)pom.getValue( "licenses" )).size() );
+        assertEquals( "project-license", pom.getValue( "licenses[1]/name" ) );
+        assertEquals( "http://project.url/license";, pom.getValue( 
"licenses[1]/url" ) );
+        assertEquals( "repo", pom.getValue( "licenses[1]/distribution" ) );
+        assertEquals( "free", pom.getValue( "licenses[1]/comments" ) );
+    }
+
 
     private void assertPathWithNormalizedFileSeparators( Object value )
     {

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: 
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/pom.xml?rev=756956&view=auto
==============================================================================
--- 
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/pom.xml
 (added)
+++ 
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/pom.xml
 Sat Mar 21 15:34:11 2009
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng</groupId>
+  <artifactId>test</artifactId>
+  <version>0.2</version>
+  <packaging>pom</packaging>
+
+  <name>project-name</name> 
+  <description>project-description</description>
+  <url>http://project.url/</url>
+  <inceptionYear>2009</inceptionYear>
+  <organization>
+    <name>project-org</name>
+    <url>http://project-org.url/</url>
+  </organization>
+  <licenses>
+    <license>
+      <name>project-license</name>
+      <url>http://project.url/license</url>
+      <distribution>repo</distribution>
+      <comments>free</comments>
+    </license>
+  </licenses>
+
+  <developers>
+    <developer>
+      <id>dev</id>
+      <name>project-developer</name>
+      <email>developer@</email>
+      <url>http://developer</url>
+      <organization>developer</organization>
+      <organizationUrl>http://devel.org</organizationUrl>
+      <roles>
+        <role>devel</role>
+      </roles>
+      <timezone>-1</timezone>
+      <properties>
+        <developer>yes</developer>
+      </properties>
+    </developer>
+  </developers>
+  <contributors>
+    <contributor>
+      <name>project-contributor</name>
+      <email>contributor@</email>
+      <url>http://contributor</url>
+      <organization>contributor</organization>
+      <organizationUrl>http://contrib.org</organizationUrl>
+      <roles>
+        <role>contrib</role>
+      </roles>
+      <timezone>+1</timezone>
+      <properties>
+        <contributor>yes</contributor>
+      </properties>
+    </contributor>
+  </contributors>
+
+  <mailingLists>
+    <mailingList>
+      <name>project-mailing-list</name>
+      <subscribe>subscribe@</subscribe>
+      <unsubscribe>unsubscribe@</unsubscribe>
+      <post>post@</post>
+      <archive>mail-archive</archive>
+      <otherArchives>
+        <otherArchive>other-archive</otherArchive>
+      </otherArchives>
+    </mailingList>
+  </mailingLists>
+
+  <prerequisites>
+    <maven>2.0.1</maven>
+  </prerequisites>
+
+  <scm>
+    <url>http://project.url/trunk</url>
+    <connection>http://project.url/scm</connection>
+    <developerConnection>https://project.url/scm</developerConnection>
+    <tag>HEAD</tag>
+  </scm>
+  <issueManagement>
+    <system>issues</system>
+    <url>http://project.url/issues</url>
+  </issueManagement>
+  <ciManagement>
+    <system>ci</system>
+    <url>http://project.url/ci</url>
+    <notifiers>
+      <notifier>
+        <type>email</type>
+        <address>ci@</address>
+        <sendOnError>true</sendOnError>
+        <sendOnFailure>false</sendOnFailure>
+        <sendOnSuccess>false</sendOnSuccess>
+        <sendOnWarning>false</sendOnWarning>
+        <configuration>
+          <ciProp>ci</ciProp>
+        </configuration>
+      </notifier>
+    </notifiers>
+  </ciManagement>
+  <distributionManagement>
+    <repository>
+      <url>http://project.url/dist</url>
+      <id>project.distros</id>
+      <name>distros</name>
+    </repository>
+    <snapshotRepository>
+      <url>http://project.url/snaps</url>
+      <id>project.snaps</id>
+      <name>snaps</name>
+      <uniqueVersion>false</uniqueVersion>
+    </snapshotRepository>
+    <site>
+      <url>http://project.url/site</url>
+      <id>project.site</id>
+      <name>docs</name>
+    </site>
+    <downloadUrl>http://project.url/download</downloadUrl>
+    <relocation>
+      <groupId>reloc-gid</groupId>
+      <artifactId>reloc-aid</artifactId>
+      <version>reloc-version</version>
+      <message>project-reloc-msg</message>
+    </relocation>
+  </distributionManagement>
+
+  <modules>
+    <module>sub</module>
+  </modules>
+
+  <properties>
+    <itProperty>project-property</itProperty>
+  </properties>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.maven.its</groupId>
+        <artifactId>managed-dep</artifactId>
+        <version>0.1</version>
+        <type>war</type>
+        <scope>runtime</scope>
+        <exclusions>
+          <exclusion>
+            <groupId>org.apache.maven.its</groupId>
+            <artifactId>excluded-managed-dep</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its</groupId>
+      <artifactId>dep</artifactId>
+      <version>0.2</version>
+      <type>ejb</type>
+      <scope>test</scope>
+      <optional>true</optional>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.maven.its</groupId>
+          <artifactId>excluded-dep</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+
+  <repositories>
+    <repository>
+      <id>project-remote-repo</id>
+      <url>http://project.url/remote</url>
+      <name>repo</name>
+    </repository>
+  </repositories>
+
+  <build>
+    <defaultGoal>test</defaultGoal>
+    <directory>build</directory>
+    <sourceDirectory>sources/main</sourceDirectory>
+    <scriptSourceDirectory>sources/scripts</scriptSourceDirectory>
+    <testSourceDirectory>sources/test</testSourceDirectory>
+    <outputDirectory>build/main</outputDirectory>
+    <testOutputDirectory>build/test</testOutputDirectory>
+    <finalName>coreit</finalName>
+    <resources>
+      <resource>
+        <directory>res/main</directory>
+        <filtering>true</filtering>
+        <targetPath>main</targetPath>
+        <includes>
+          <include>main.included</include>
+        </includes>
+        <excludes>
+          <exclude>main.excluded</exclude>
+        </excludes>
+      </resource>
+    </resources>
+    <testResources>
+      <testResource>
+        <directory>res/test</directory>
+        <filtering>true</filtering>
+        <targetPath>test</targetPath>
+        <includes>
+          <include>test.included</include>
+        </includes>
+        <excludes>
+          <exclude>test.excluded</exclude>
+        </excludes>
+      </testResource>
+    </testResources>
+    <filters>
+      <filter>src/main/filter/it.properties</filter>
+    </filters>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-build</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <configuration>
+          <outputFile>target/test.properties</outputFile>
+        </configuration>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>eval</goal>
+            </goals>
+            <configuration>
+              <outputFile>target/pom.properties</outputFile>
+            </configuration>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven.its</groupId>
+            <artifactId>build-plugin-dep</artifactId>
+            <version>0.3</version>
+            <type>zip</type>
+            <exclusions>
+              <exclusion>
+                <groupId>org.apache.maven.its</groupId>
+                <artifactId>excluded-build-plugin-dep</artifactId>
+              </exclusion>
+            </exclusions>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <excludeDefaults>false</excludeDefaults>
+    <outputDirectory>docs</outputDirectory>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-reporting</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <configuration>
+          <outputFile>target/test.html</outputFile>
+        </configuration>
+        <reportSets>
+          <reportSet>
+            <id>it</id>
+            <reports>
+              <report>run</report>
+            </reports>
+            <configuration>
+              <outputFile>target/index.html</outputFile>
+            </configuration>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/complete-model/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision


Reply via email to