mirror of https://github.com/apache/maven.git
[MNG-8336] Only inject plugins information if requested (#1904)
This commit is contained in:
parent
46707e0f28
commit
a14732597b
|
@ -936,6 +936,10 @@ public class DefaultProjectBuilder implements ProjectBuilder {
|
|||
}
|
||||
project.setRemoteArtifactRepositories(remoteRepositories);
|
||||
|
||||
return lifecycleBindingsInjector.injectLifecycleBindings(model3.getDelegate(), request, problems);
|
||||
if (projectBuildingRequest.isProcessPlugins()) {
|
||||
return lifecycleBindingsInjector.injectLifecycleBindings(model3.getDelegate(), request, problems);
|
||||
} else {
|
||||
return model3.getDelegate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* 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.util.List;
|
||||
|
||||
import org.apache.maven.shared.verifier.Verifier;
|
||||
import org.apache.maven.shared.verifier.util.ResourceExtractor;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-8336">MNG-8336</a>.
|
||||
*/
|
||||
class MavenITmng8336UnknownPackagingTest extends AbstractMavenIntegrationTestCase {
|
||||
|
||||
MavenITmng8336UnknownPackagingTest() {
|
||||
super("[4.0.0-beta-6,)");
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify that the build succeeds
|
||||
*/
|
||||
@Test
|
||||
void testUnknownPackaging() throws Exception {
|
||||
File testDir = ResourceExtractor.simpleExtractResources(getClass(), "/mng-8336-unknown-packaging");
|
||||
|
||||
Verifier verifier = newVerifier(testDir.getAbsolutePath(), "remote");
|
||||
verifier.addCliArgument("clean");
|
||||
verifier.addCliArgument("org.codehaus.mojo:license-maven-plugin:2.4.0:add-third-party");
|
||||
verifier.execute();
|
||||
|
||||
// verify log
|
||||
List<String> lines = verifier.loadFile(verifier.getBasedir(), verifier.getLogFileName(), false);
|
||||
assertTrue(lines.stream().noneMatch(s -> s.contains("Unable to obtain POM for artifact")));
|
||||
}
|
||||
}
|
|
@ -120,6 +120,7 @@ public class TestSuiteOrdering implements ClassOrderer {
|
|||
* the tests are to finishing. Newer tests are also more likely to fail, so this is
|
||||
* a fail fast technique as well.
|
||||
*/
|
||||
suite.addTestSuite(MavenITmng8336UnknownPackagingTest.class);
|
||||
suite.addTestSuite(MavenITmng8340GeneratedPomInTargetTest.class);
|
||||
suite.addTestSuite(MavenITmng8360SubprojectProfileActivationTest.class);
|
||||
suite.addTestSuite(MavenITmng8347TransitiveDependencyManagerTest.class);
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.github.danthe1st</groupId>
|
||||
<artifactId>maven-repro</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<properties>
|
||||
<maven.compiler.release>17</maven.compiler.release>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.pdfbox</groupId>
|
||||
<artifactId>pdfbox-io</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.13.0</version>
|
||||
<configuration>
|
||||
<release>17</release>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* 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 io.github.danthe1st.mavenrepro;
|
||||
|
||||
public class MavenRepro {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue