You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/02/14 19:31:44 UTC

[GitHub] [maven-integration-testing] MartinKanters opened a new pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

MartinKanters opened a new pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138


   Relevant Maven core change: https://github.com/apache/maven/pull/677


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] MartinKanters commented on a change in pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
MartinKanters commented on a change in pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#discussion_r810267693



##########
File path: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7390SelectModuleOutsideCwdTest.java
##########
@@ -0,0 +1,129 @@
+package org.apache.maven.it;
+
+/*
+ * 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 org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This test suite tests whether other modules in the same multi module project can be selected when invoking Maven from a submodule.
+ * Related JIRA issue: <a href="https://issues.apache.org/jira/browse/MNG-7390">MNG-7390</a>.
+ *
+ * @author Martin Kanters
+ */
+public class MavenITmng7390SelectModuleOutsideCwdTest extends AbstractMavenIntegrationTestCase {
+
+    private File moduleADir;
+
+    public MavenITmng7390SelectModuleOutsideCwdTest()
+    {
+        super( "[4.0.0-alpha-1,)" );
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        moduleADir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-7390-pl-outside-cwd/module-a");

Review comment:
       Nice finds. I should configure my formatter correctly..




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] michael-o commented on pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#issuecomment-1039523540


   Will check


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] MartinKanters commented on pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
MartinKanters commented on pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#issuecomment-1039490963


   > This one is essentially the same one as #135, isn't it?
   
   It is exactly the same one, but since I changed the name of the branch, GH automatically closed that PR.
   Somehow I cannot change the target branch and reopen the PR. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] MartinKanters edited a comment on pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
MartinKanters edited a comment on pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#issuecomment-1039490963


   > This one is essentially the same one as #135, isn't it?
   
   It is exactly the same one, but since I changed the name of the branch, GH automatically closed that PR.
   Somehow I cannot change the target branch and reopen the PR. 
   
   The rename had to happen to ensure the maven-core PR is running against the right ITs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] asfgit closed pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] MartinKanters edited a comment on pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
MartinKanters edited a comment on pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#issuecomment-1039490963


   > This one is essentially the same one as #135, isn't it?
   
   It is exactly the same one, but since I changed the name of the branch, GH automatically closed that PR.
   Somehow I cannot change the target branch and reopen the PR. 
   
   The rename had to happen to ensure the simplified PR is running against the right ITs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] MartinKanters commented on pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
MartinKanters commented on pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#issuecomment-1039490963


   > This one is essentially the same one as #135, isn't it?
   
   It is exactly the same one, but since I changed the name of the branch, GH automatically closed that PR.
   Somehow I cannot change the target branch and reopen the PR. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] mthmulders commented on pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
mthmulders commented on pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#issuecomment-1039492808


   > It is exactly the same one, but since I changed the name of the branch, GH automatically closed that PR.
   
   Thanks for the confirmation!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] MartinKanters commented on a change in pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
MartinKanters commented on a change in pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#discussion_r810268848



##########
File path: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7390SelectModuleOutsideCwdTest.java
##########
@@ -0,0 +1,129 @@
+package org.apache.maven.it;
+
+/*
+ * 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 org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This test suite tests whether other modules in the same multi module project can be selected when invoking Maven from a submodule.
+ * Related JIRA issue: <a href="https://issues.apache.org/jira/browse/MNG-7390">MNG-7390</a>.
+ *
+ * @author Martin Kanters
+ */
+public class MavenITmng7390SelectModuleOutsideCwdTest extends AbstractMavenIntegrationTestCase {
+
+    private File moduleADir;
+
+    public MavenITmng7390SelectModuleOutsideCwdTest()
+    {
+        super( "[4.0.0-alpha-1,)" );
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        moduleADir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-7390-pl-outside-cwd/module-a");
+
+        // Clean up target files from earlier runs (verifier.setAutoClean does not work, as we are reducing the reactor)
+        final Verifier verifier = newVerifier( moduleADir.getAbsolutePath() );
+        verifier.addCliOption( "-f" );
+        verifier.addCliOption( ".." );
+        verifier.executeGoal( "clean" );

Review comment:
       Nope, this should already work in the current Maven 3. It's basically just referring to an external directory where it will look for the pom file. (`--file ../pom.xml` in short)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] MartinKanters commented on a change in pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
MartinKanters commented on a change in pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#discussion_r810268073



##########
File path: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7390SelectModuleOutsideCwdTest.java
##########
@@ -0,0 +1,129 @@
+package org.apache.maven.it;
+
+/*
+ * 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 org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This test suite tests whether other modules in the same multi module project can be selected when invoking Maven from a submodule.
+ * Related JIRA issue: <a href="https://issues.apache.org/jira/browse/MNG-7390">MNG-7390</a>.
+ *
+ * @author Martin Kanters
+ */
+public class MavenITmng7390SelectModuleOutsideCwdTest extends AbstractMavenIntegrationTestCase {
+
+    private File moduleADir;
+
+    public MavenITmng7390SelectModuleOutsideCwdTest()
+    {
+        super( "[4.0.0-alpha-1,)" );
+    }
+
+    @Override
+    protected void setUp() throws Exception {

Review comment:
       Nice one, I also fixed the one at the class declaration.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] michael-o commented on pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#issuecomment-1039523540


   Will check


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] MartinKanters edited a comment on pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
MartinKanters edited a comment on pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#issuecomment-1039490963






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] mthmulders commented on pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
mthmulders commented on pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#issuecomment-1039483698


   This one is essentially the same one as #135, isn't it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] mthmulders commented on pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
mthmulders commented on pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#issuecomment-1039483698






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] michael-o commented on a change in pull request #138: [MNG-7390] Testing whether modules can be selected outside the cwd.

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #138:
URL: https://github.com/apache/maven-integration-testing/pull/138#discussion_r808399621



##########
File path: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7390SelectModuleOutsideCwdTest.java
##########
@@ -0,0 +1,129 @@
+package org.apache.maven.it;
+
+/*
+ * 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 org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This test suite tests whether other modules in the same multi module project can be selected when invoking Maven from a submodule.
+ * Related JIRA issue: <a href="https://issues.apache.org/jira/browse/MNG-7390">MNG-7390</a>.
+ *
+ * @author Martin Kanters
+ */
+public class MavenITmng7390SelectModuleOutsideCwdTest extends AbstractMavenIntegrationTestCase {
+
+    private File moduleADir;
+
+    public MavenITmng7390SelectModuleOutsideCwdTest()
+    {
+        super( "[4.0.0-alpha-1,)" );
+    }
+
+    @Override
+    protected void setUp() throws Exception {

Review comment:
       Curly on new line

##########
File path: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7390SelectModuleOutsideCwdTest.java
##########
@@ -0,0 +1,129 @@
+package org.apache.maven.it;
+
+/*
+ * 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 org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This test suite tests whether other modules in the same multi module project can be selected when invoking Maven from a submodule.
+ * Related JIRA issue: <a href="https://issues.apache.org/jira/browse/MNG-7390">MNG-7390</a>.
+ *
+ * @author Martin Kanters
+ */
+public class MavenITmng7390SelectModuleOutsideCwdTest extends AbstractMavenIntegrationTestCase {
+
+    private File moduleADir;
+
+    public MavenITmng7390SelectModuleOutsideCwdTest()
+    {
+        super( "[4.0.0-alpha-1,)" );
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        moduleADir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-7390-pl-outside-cwd/module-a");

Review comment:
       padding space at end

##########
File path: core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7390SelectModuleOutsideCwdTest.java
##########
@@ -0,0 +1,129 @@
+package org.apache.maven.it;
+
+/*
+ * 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 org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This test suite tests whether other modules in the same multi module project can be selected when invoking Maven from a submodule.
+ * Related JIRA issue: <a href="https://issues.apache.org/jira/browse/MNG-7390">MNG-7390</a>.
+ *
+ * @author Martin Kanters
+ */
+public class MavenITmng7390SelectModuleOutsideCwdTest extends AbstractMavenIntegrationTestCase {
+
+    private File moduleADir;
+
+    public MavenITmng7390SelectModuleOutsideCwdTest()
+    {
+        super( "[4.0.0-alpha-1,)" );
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        moduleADir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-7390-pl-outside-cwd/module-a");
+
+        // Clean up target files from earlier runs (verifier.setAutoClean does not work, as we are reducing the reactor)
+        final Verifier verifier = newVerifier( moduleADir.getAbsolutePath() );
+        verifier.addCliOption( "-f" );
+        verifier.addCliOption( ".." );
+        verifier.executeGoal( "clean" );

Review comment:
       Is the setup already a test to test the traversal up the hierarchy?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org