[ 
https://issues.apache.org/jira/browse/MNG-6261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16691137#comment-16691137
 ] 

ASF GitHub Bot commented on MNG-6261:
-------------------------------------

fabcipriano commented on a change in pull request #192: [MNG-6261] - using java 
File api to compare
URL: https://github.com/apache/maven/pull/192#discussion_r234469978
 
 

 ##########
 File path: 
maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java
 ##########
 @@ -0,0 +1,52 @@
+package org.apache.maven.model.building;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import junit.framework.TestCase;
+
+/**
+ *
+ * @author fabiano
+ */
+public class FileModelSourceTest 
+    extends TestCase 
+{
+    
+    public FileModelSourceTest() {
+    }
+
+    /**
+     * Test of equals method, of class FileModelSource.
+     */
+    public void testEquals() 
+            throws Exception 
+    {
+        File tempFile = File.createTempFile("pomTest-", ".xml");
+        tempFile.deleteOnExit();
+        FileModelSource instance = new FileModelSource( tempFile );
+
+        assertFalse( instance.equals( null ) );
+        assertFalse( instance.equals( new Object() ) );
+        assertTrue( instance.equals( instance ) );
+        assertTrue( instance.equals( new FileModelSource( tempFile ) ) );
+    }
+
 
 Review comment:
   This seems simpler, thanks.
   I added the test case in the original unit test

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Relative parent POM resolution failing in 3.5.0 with complex multimodule 
> builds
> -------------------------------------------------------------------------------
>
>                 Key: MNG-6261
>                 URL: https://issues.apache.org/jira/browse/MNG-6261
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.5.0
>            Reporter: Dawid Weiss
>            Priority: Minor
>              Labels: up-for-grabs
>             Fix For: 3.6.x-candidate
>
>         Attachments: capture-6.png, repro.zip
>
>
> In my effort to upgrade an existing (fairly complex) Maven build to Java 
> 1.9.0 I updated Maven to 3.5.0 (from 3.3.9). Unfortunately I get errors when 
> the project's modules are resolved:
> {noformat}
> > mvn validate
> [FATAL] Non-resolvable parent POM for 
> com.carrotsearch.lingo4g:lingo4g-public-bom:[unknown-version]: Could not find 
> artifact com.carrotsearch.lingo4g:lingo4g-public:pom:1.6.0-SNAPSHOT and 
> 'parent.relativePath' points at wrong local POM @ line 5, column 11
> ...
> (and many follow).
> {noformat}
> This build has a correct pom parent-structure (a tree), but is fairly complex 
> -- the submodule hierarchy is not aligned with parent-child pom hierarchy 
> (it's best to look at the repro code to understand how it's structured).
> However, it's been working correctly with all prior Maven versions and I 
> wonder if it's a regression bug or maybe underspecified Maven requirement 
> (that should be enforced with a warning and not lead to this odd runtime 
> message).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to