-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MNG-7255] Infer groupId for dependencies (#356)
- Loading branch information
Showing
6 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7255InferredGroupIdTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* 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. | ||
*/ | ||
package org.apache.maven.it; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
import org.apache.maven.shared.verifier.VerificationException; | ||
import org.apache.maven.shared.verifier.Verifier; | ||
import org.apache.maven.shared.verifier.util.ResourceExtractor; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class MavenITmng7255InferredGroupIdTest extends AbstractMavenIntegrationTestCase { | ||
private static final String PROJECT_PATH = "/mng-7255-inferred-groupid"; | ||
|
||
public MavenITmng7255InferredGroupIdTest() { | ||
super("[4.0.0-alpha-5,)"); | ||
} | ||
|
||
@Test | ||
public void testInferredGroupId() throws IOException, VerificationException { | ||
final File projectDir = ResourceExtractor.simpleExtractResources(getClass(), PROJECT_PATH); | ||
final Verifier verifier = newVerifier(projectDir.getAbsolutePath()); | ||
|
||
verifier.addCliArgument("validate"); | ||
verifier.execute(); | ||
|
||
verifier.verifyErrorFreeLog(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
core-it-suite/src/test/resources/mng-7255-inferred-groupid/child/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.1.0"> | ||
<parent> | ||
<groupId>org.apache.maven.its.mng7255</groupId> | ||
<artifactId>parent</artifactId> | ||
</parent> | ||
<artifactId>child</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<artifactId>dep</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</project> |
9 changes: 9 additions & 0 deletions
9
core-it-suite/src/test/resources/mng-7255-inferred-groupid/dep/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.1.0"> | ||
<parent> | ||
<groupId>org.apache.maven.its.mng7255</groupId> | ||
<artifactId>parent</artifactId> | ||
</parent> | ||
<artifactId>dep</artifactId> | ||
<packaging>jar</packaging> | ||
</project> |
7 changes: 7 additions & 0 deletions
7
core-it-suite/src/test/resources/mng-7255-inferred-groupid/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.1.0"> | ||
<groupId>org.apache.maven.its.mng7255</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
</project> |