This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/master by this push: new 90457e519a [MNG-8736] Fix profile activation context recording and caching issues (#2378) 90457e519a is described below commit 90457e519a7bc130de14ace69d26368ac28ead51 Author: Guillaume Nodet <gno...@gmail.com> AuthorDate: Sat Jun 7 01:42:51 2025 +0200 [MNG-8736] Fix profile activation context recording and caching issues (#2378) This commit addresses multiple critical issues in the profile activation context recording and caching mechanism during model inheritance: ## Issues Fixed: 1. **Profile Activation Context Recording Bug**: When there was a cache hit in readAsParentModel(), the keys accessed during cache matching re-evaluation were lost because the recording context was discarded without merging the recorded keys into the parent context. 2. **Recording Context Isolation**: Parent model processing was polluting the child's recording context with intermediate keys that weren't essential to the final result, leading to noisy cache keys and reduced cache effectiveness. 3. **Profile Injection Precedence**: Profile properties from distant ancestors were incorrectly overriding direct properties from closer ancestors due to improper profile injection timing during inheritance assembly. ## Solutions Implemented: 1. **Cache Hit Recording Fix**: - Create a separate recording context for cache matching re-evaluation - Replay cached record keys into the parent recording context on cache hits - Ensure all essential keys are captured regardless of cache hit/miss 2. **Recording Context Isolation**: - Use separate recording contexts for parent model processing - Only replay essential keys from the final result into parent context - Maintain clean, precise cache keys for better performance 3. **Profile Injection Timing**: - Inject profiles into child models using parent's profile list - Ensure proper precedence where child elements override parent elements - Maintain correct inheritance hierarchy during profile activation ## Technical Details: - Made DefaultProfileActivationContext.Record fields package-private for merging - Added replayRecordIntoContext() method for proper key propagation - Updated profile injection to respect inheritance precedence rules - Enhanced MavenModelMerger to handle profile content merging correctly ## Benefits: - Eliminates race conditions in concurrent model building scenarios - Improves cache effectiveness through cleaner, more precise cache keys - Ensures correct profile activation context propagation through inheritance - Maintains proper property precedence in complex inheritance hierarchies - Reduces memory usage by avoiding over-recording of intermediate keys This fix ensures that profile activation behaves consistently and correctly in both single-threaded and multi-threaded environments, while maintaining optimal performance through improved caching mechanisms. Co-authored-by: Guillaume Nodet <gno...@gmail.com> --- .../maven/impl/model/DefaultModelBuilder.java | 124 +++++++++--- .../model/DefaultProfileActivationContext.java | 144 ++++++++------ .../apache/maven/impl/model/MavenModelMerger.java | 4 +- .../maven/impl/model/MavenModelMergerTest.java | 10 +- ...MavenITmng8736ConcurrentFileActivationTest.java | 209 +++++++++++++++++++++ .../org/apache/maven/it/TestSuiteOrdering.java | 1 + .../test/resources/mng-8736/child1/activate.marker | 1 + .../src/test/resources/mng-8736/child1/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child10/pom.xml | 33 ++++ .../resources/mng-8736/child11/activate.marker | 1 + .../src/test/resources/mng-8736/child11/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child12/pom.xml | 33 ++++ .../resources/mng-8736/child13/activate.marker | 1 + .../src/test/resources/mng-8736/child13/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child14/pom.xml | 33 ++++ .../resources/mng-8736/child15/activate.marker | 1 + .../src/test/resources/mng-8736/child15/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child16/pom.xml | 33 ++++ .../resources/mng-8736/child17/activate.marker | 1 + .../src/test/resources/mng-8736/child17/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child18/pom.xml | 33 ++++ .../resources/mng-8736/child19/activate.marker | 1 + .../src/test/resources/mng-8736/child19/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child2/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child20/pom.xml | 33 ++++ .../resources/mng-8736/child21/activate.marker | 1 + .../src/test/resources/mng-8736/child21/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child22/pom.xml | 33 ++++ .../resources/mng-8736/child23/activate.marker | 1 + .../src/test/resources/mng-8736/child23/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child24/pom.xml | 33 ++++ .../resources/mng-8736/child25/activate.marker | 1 + .../src/test/resources/mng-8736/child25/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child26/pom.xml | 33 ++++ .../resources/mng-8736/child27/activate.marker | 1 + .../src/test/resources/mng-8736/child27/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child28/pom.xml | 33 ++++ .../resources/mng-8736/child29/activate.marker | 1 + .../src/test/resources/mng-8736/child29/pom.xml | 33 ++++ .../test/resources/mng-8736/child3/activate.marker | 1 + .../src/test/resources/mng-8736/child3/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child30/pom.xml | 33 ++++ .../resources/mng-8736/child31/activate.marker | 1 + .../src/test/resources/mng-8736/child31/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child32/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child4/pom.xml | 33 ++++ .../test/resources/mng-8736/child5/activate.marker | 1 + .../src/test/resources/mng-8736/child5/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child6/pom.xml | 33 ++++ .../test/resources/mng-8736/child7/activate.marker | 1 + .../src/test/resources/mng-8736/child7/pom.xml | 33 ++++ .../src/test/resources/mng-8736/child8/pom.xml | 33 ++++ .../test/resources/mng-8736/child9/activate.marker | 1 + .../src/test/resources/mng-8736/child9/pom.xml | 33 ++++ .../src/test/resources/mng-8736/pom.xml | 87 +++++++++ 55 files changed, 1565 insertions(+), 86 deletions(-) diff --git a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java index 4938245a7c..c27eb4dc08 100644 --- a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java +++ b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java @@ -1527,28 +1527,54 @@ private Model doReadRawModel() throws ModelBuilderException { return rawModel; } + /** + * Record to store both the parent model and its activated profiles for caching. + */ + private record ParentModelWithProfiles(Model model, List<Profile> activatedProfiles) {} + /** * Reads the request source's parent. */ Model readAsParentModel(DefaultProfileActivationContext profileActivationContext) throws ModelBuilderException { - Map<DefaultProfileActivationContext.Record, Model> parentsPerContext = + Map<DefaultProfileActivationContext.Record, ParentModelWithProfiles> parentsPerContext = cache(request.getSource(), PARENT, ConcurrentHashMap::new); - for (Map.Entry<DefaultProfileActivationContext.Record, Model> e : parentsPerContext.entrySet()) { + + for (Map.Entry<DefaultProfileActivationContext.Record, ParentModelWithProfiles> e : + parentsPerContext.entrySet()) { if (e.getKey().matches(profileActivationContext)) { - return e.getValue(); + ParentModelWithProfiles cached = e.getValue(); + // CRITICAL: On cache hit, we need to replay the cached record's keys into the + // current recording context. The matches() method already re-evaluated the + // conditions and recorded some keys in ctx, but we also need to ensure all + // the keys from the cached record are recorded in the current context. + if (profileActivationContext.record != null) { + replayRecordIntoContext(e.getKey(), profileActivationContext); + } + // Add the activated profiles from cache to the result + addActivePomProfiles(cached.activatedProfiles()); + return cached.model(); } } - DefaultProfileActivationContext.Record prev = profileActivationContext.start(); - Model model = doReadAsParentModel(profileActivationContext); - DefaultProfileActivationContext.Record record = profileActivationContext.stop(prev); - parentsPerContext.put(record, model); - return model; + + // Cache miss: process the parent model + // CRITICAL: Use a separate recording context to avoid recording intermediate keys + // that aren't essential to the final result. Only replay the final essential keys + // into the parent recording context to maintain clean cache keys and avoid + // over-recording during parent model processing. + DefaultProfileActivationContext ctx = profileActivationContext.start(); + ParentModelWithProfiles modelWithProfiles = doReadAsParentModel(ctx); + DefaultProfileActivationContext.Record record = ctx.stop(); + replayRecordIntoContext(record, profileActivationContext); + + parentsPerContext.put(record, modelWithProfiles); + addActivePomProfiles(modelWithProfiles.activatedProfiles()); + return modelWithProfiles.model(); } - private Model doReadAsParentModel(DefaultProfileActivationContext profileActivationContext) - throws ModelBuilderException { + private ParentModelWithProfiles doReadAsParentModel( + DefaultProfileActivationContext childProfileActivationContext) throws ModelBuilderException { Model raw = readRawModel(); - Model parentData = readParent(raw, profileActivationContext); + Model parentData = readParent(raw, childProfileActivationContext); Model parent = new DefaultInheritanceAssembler(new DefaultInheritanceAssembler.InheritanceModelMerger() { @Override protected void mergeModel_Modules( @@ -1568,15 +1594,23 @@ protected void mergeModel_Subprojects( }) .assembleModelInheritance(raw, parentData, request, this); - // activate profiles - List<Profile> parentActivePomProfiles = getActiveProfiles(parent.getProfiles(), profileActivationContext); - // profile injection + // Profile injection SHOULD be performed on parent models to ensure + // that profile content becomes part of the parent model before inheritance. + // This ensures proper precedence: child elements override parent elements, + // including elements that came from parent profiles. + // + // Use the child's activation context (passed as parameter) to determine + // which parent profiles should be active, ensuring consistency. + List<Profile> parentActivePomProfiles = + getActiveProfiles(parent.getProfiles(), childProfileActivationContext); + + // Inject profiles into parent model Model injectedParentModel = profileInjector .injectProfiles(parent, parentActivePomProfiles, request, this) - .withProfiles(List.of()); - addActivePomProfiles(parentActivePomProfiles); + .withProfiles(List.of()); // Remove profiles after injection to avoid double-processing - return injectedParentModel.withParent(null); + // Note: addActivePomProfiles() will be called by the caller for cache miss case + return new ParentModelWithProfiles(injectedParentModel.withParent(null), parentActivePomProfiles); } private Model importDependencyManagement(Model model, Collection<String> importIds) { @@ -1818,6 +1852,43 @@ boolean isBuildRequest() { boolean isBuildRequestWithActivation() { return request.getRequestType() != ModelBuilderRequest.RequestType.BUILD_CONSUMER; } + + /** + * Replays the keys from a cached record into the current recording context. + * This ensures that when there's a cache hit, all the keys that were originally + * accessed during the cached computation are recorded in the current context. + */ + private void replayRecordIntoContext( + DefaultProfileActivationContext.Record cachedRecord, DefaultProfileActivationContext targetContext) { + if (targetContext.record == null) { + return; // Target context is not recording + } + + // Replay all the recorded keys from the cached record into the target context's record + // We need to access the mutable maps in the target context's record + DefaultProfileActivationContext.Record targetRecord = targetContext.record; + + // Replay active profiles + cachedRecord.usedActiveProfiles.forEach(targetRecord.usedActiveProfiles::putIfAbsent); + + // Replay inactive profiles + cachedRecord.usedInactiveProfiles.forEach(targetRecord.usedInactiveProfiles::putIfAbsent); + + // Replay system properties + cachedRecord.usedSystemProperties.forEach(targetRecord.usedSystemProperties::putIfAbsent); + + // Replay user properties + cachedRecord.usedUserProperties.forEach(targetRecord.usedUserProperties::putIfAbsent); + + // Replay model properties + cachedRecord.usedModelProperties.forEach(targetRecord.usedModelProperties::putIfAbsent); + + // Replay model infos + cachedRecord.usedModelInfos.forEach(targetRecord.usedModelInfos::putIfAbsent); + + // Replay exists checks + cachedRecord.usedExists.forEach(targetRecord.usedExists::putIfAbsent); + } } @SuppressWarnings("deprecation") @@ -1861,16 +1932,15 @@ static String getVersion(Model model) { } private DefaultProfileActivationContext getProfileActivationContext(ModelBuilderRequest request, Model model) { - DefaultProfileActivationContext context = - new DefaultProfileActivationContext(pathTranslator, rootLocator, interpolator); - - context.setActiveProfileIds(request.getActiveProfileIds()); - context.setInactiveProfileIds(request.getInactiveProfileIds()); - context.setSystemProperties(request.getSystemProperties()); - context.setUserProperties(request.getUserProperties()); - context.setModel(model); - - return context; + return new DefaultProfileActivationContext( + pathTranslator, + rootLocator, + interpolator, + request.getActiveProfileIds(), + request.getInactiveProfileIds(), + request.getSystemProperties(), + request.getUserProperties(), + model); } private Map<String, Activation> getProfileActivations(Model model) { diff --git a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultProfileActivationContext.java b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultProfileActivationContext.java index cba0609604..9d9ba94546 100644 --- a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultProfileActivationContext.java +++ b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultProfileActivationContext.java @@ -63,13 +63,35 @@ enum ModelInfo { * activation will be the same by verifying that the used keys are the same. */ static class Record { - private final Map<String, Boolean> usedActiveProfiles = new HashMap<>(); - private final Map<String, Boolean> usedInactiveProfiles = new HashMap<>(); - private final Map<String, String> usedSystemProperties = new HashMap<>(); - private final Map<String, String> usedUserProperties = new HashMap<>(); - private final Map<String, String> usedModelProperties = new HashMap<>(); - private final Map<ModelInfo, String> usedModelInfos = new HashMap<>(); - private final Map<ExistRequest, Boolean> usedExists = new HashMap<>(); + final Map<String, Boolean> usedActiveProfiles; + final Map<String, Boolean> usedInactiveProfiles; + final Map<String, String> usedSystemProperties; + final Map<String, String> usedUserProperties; + final Map<String, String> usedModelProperties; + final Map<ModelInfo, String> usedModelInfos; + final Map<ExistRequest, Boolean> usedExists; + + // Constructor for recording phase - creates mutable maps + Record() { + this.usedActiveProfiles = new HashMap<>(); + this.usedInactiveProfiles = new HashMap<>(); + this.usedSystemProperties = new HashMap<>(); + this.usedUserProperties = new HashMap<>(); + this.usedModelProperties = new HashMap<>(); + this.usedModelInfos = new HashMap<>(); + this.usedExists = new HashMap<>(); + } + + // Copy constructor for caching phase - creates immutable maps + Record(Record source) { + this.usedActiveProfiles = Map.copyOf(source.usedActiveProfiles); + this.usedInactiveProfiles = Map.copyOf(source.usedInactiveProfiles); + this.usedSystemProperties = Map.copyOf(source.usedSystemProperties); + this.usedUserProperties = Map.copyOf(source.usedUserProperties); + this.usedModelProperties = Map.copyOf(source.usedModelProperties); + this.usedModelInfos = Map.copyOf(source.usedModelInfos); + this.usedExists = Map.copyOf(source.usedExists); + } @Override public boolean equals(Object o) { @@ -147,34 +169,83 @@ private boolean matchesExists(Map<ExistRequest, Boolean> exists, DefaultProfileA private Map<String, String> systemProperties = Collections.emptyMap(); private Map<String, String> userProperties = Collections.emptyMap(); private Model model; - - private final ThreadLocal<Record> records = new ThreadLocal<>(); + final Record record; public DefaultProfileActivationContext( PathTranslator pathTranslator, RootLocator rootLocator, Interpolator interpolator) { this.pathTranslator = pathTranslator; this.rootLocator = rootLocator; this.interpolator = interpolator; + this.record = null; } - Record start() { - Record record = records.get(); - records.set(new Record()); - return record; + @SuppressWarnings("checkstyle:ParameterNumber") + public DefaultProfileActivationContext( + PathTranslator pathTranslator, + RootLocator rootLocator, + Interpolator interpolator, + List<String> activeProfileIds, + List<String> inactiveProfileIds, + Map<String, String> systemProperties, + Map<String, String> userProperties, + Model model) { + this( + pathTranslator, + rootLocator, + interpolator, + activeProfileIds, + inactiveProfileIds, + systemProperties, + userProperties, + model, + null); } - Record stop(Record previous) { - Record record = records.get(); - records.set(previous); + @SuppressWarnings("checkstyle:ParameterNumber") + private DefaultProfileActivationContext( + PathTranslator pathTranslator, + RootLocator rootLocator, + Interpolator interpolator, + List<String> activeProfileIds, + List<String> inactiveProfileIds, + Map<String, String> systemProperties, + Map<String, String> userProperties, + Model model, + Record record) { + this.pathTranslator = pathTranslator; + this.rootLocator = rootLocator; + this.interpolator = interpolator; + this.activeProfileIds = activeProfileIds; + this.inactiveProfileIds = inactiveProfileIds; + this.systemProperties = systemProperties; + this.userProperties = userProperties; + this.model = model; + this.record = record; + } + + DefaultProfileActivationContext start() { + return new DefaultProfileActivationContext( + pathTranslator, + rootLocator, + interpolator, + activeProfileIds, + inactiveProfileIds, + systemProperties, + userProperties, + model, + new Record()); + } + + Record stop() { // only keep keys for which the value is `true` + Objects.requireNonNull(record, "start() must be called before stop()"); record.usedActiveProfiles.values().removeIf(value -> !value); record.usedInactiveProfiles.values().removeIf(value -> !value); - return record; + return new Record(record); // Return immutable copy for thread-safe caching } @Override public boolean isProfileActive(String profileId) { - Record record = records.get(); if (record != null) { return record.usedActiveProfiles.computeIfAbsent(profileId, activeProfileIds::contains); } else { @@ -182,20 +253,8 @@ public boolean isProfileActive(String profileId) { } } - /** - * Sets the identifiers of those profiles that should be activated by explicit demand. - * - * @param activeProfileIds The identifiers of those profiles to activate, may be {@code null}. - * @return This context, never {@code null}. - */ - public DefaultProfileActivationContext setActiveProfileIds(List<String> activeProfileIds) { - this.activeProfileIds = unmodifiable(activeProfileIds); - return this; - } - @Override public boolean isProfileInactive(String profileId) { - Record record = records.get(); if (record != null) { return record.usedInactiveProfiles.computeIfAbsent(profileId, inactiveProfileIds::contains); } else { @@ -203,20 +262,8 @@ public boolean isProfileInactive(String profileId) { } } - /** - * Sets the identifiers of those profiles that should be deactivated by explicit demand. - * - * @param inactiveProfileIds The identifiers of those profiles to deactivate, may be {@code null}. - * @return This context, never {@code null}. - */ - public DefaultProfileActivationContext setInactiveProfileIds(List<String> inactiveProfileIds) { - this.inactiveProfileIds = unmodifiable(inactiveProfileIds); - return this; - } - @Override public String getSystemProperty(String key) { - Record record = records.get(); if (record != null) { return record.usedSystemProperties.computeIfAbsent(key, systemProperties::get); } else { @@ -238,7 +285,6 @@ public DefaultProfileActivationContext setSystemProperties(Map<String, String> s @Override public String getUserProperty(String key) { - Record record = records.get(); if (record != null) { return record.usedUserProperties.computeIfAbsent(key, userProperties::get); } else { @@ -261,7 +307,6 @@ public DefaultProfileActivationContext setUserProperties(Map<String, String> use @Override public String getModelArtifactId() { - Record record = records.get(); if (record != null) { return record.usedModelInfos.computeIfAbsent(ModelInfo.ArtifactId, k -> model.getArtifactId()); } else { @@ -271,7 +316,6 @@ public String getModelArtifactId() { @Override public String getModelPackaging() { - Record record = records.get(); if (record != null) { return record.usedModelInfos.computeIfAbsent(ModelInfo.Packaging, k -> model.getPackaging()); } else { @@ -281,7 +325,6 @@ public String getModelPackaging() { @Override public String getModelProperty(String key) { - Record record = records.get(); if (record != null) { return record.usedModelProperties.computeIfAbsent( key, k -> model.getProperties().get(k)); @@ -292,7 +335,6 @@ public String getModelProperty(String key) { @Override public String getModelBaseDirectory() { - Record record = records.get(); if (record != null) { return record.usedModelInfos.computeIfAbsent(ModelInfo.BaseDirectory, k -> doGetModelBaseDirectory()); } else { @@ -300,14 +342,13 @@ public String getModelBaseDirectory() { } } - private String doGetModelBaseDirectory() { + public String doGetModelBaseDirectory() { Path basedir = model.getProjectDirectory(); return basedir != null ? basedir.toAbsolutePath().toString() : null; } @Override public String getModelRootDirectory() { - Record record = records.get(); if (record != null) { return record.usedModelInfos.computeIfAbsent(ModelInfo.RootDirectory, k -> doGetModelRootDirectory()); } else { @@ -352,7 +393,6 @@ public String interpolatePath(String path) throws InterpolatorException { @Override public boolean exists(String path, boolean enableGlob) throws ModelBuilderException { - Record record = records.get(); if (record != null) { return record.usedExists.computeIfAbsent( new ExistRequest(path, enableGlob), r -> doExists(r.path, r.enableGlob)); @@ -418,10 +458,6 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { return true; } - private static List<String> unmodifiable(List<String> list) { - return list != null ? Collections.unmodifiableList(list) : Collections.emptyList(); - } - private static Map<String, String> unmodifiable(Map<String, String> map) { return map != null ? Collections.unmodifiableMap(map) : Collections.emptyMap(); } diff --git a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/MavenModelMerger.java b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/MavenModelMerger.java index 5a9d4f3ac8..9657e0d38f 100644 --- a/impl/maven-impl/src/main/java/org/apache/maven/impl/model/MavenModelMerger.java +++ b/impl/maven-impl/src/main/java/org/apache/maven/impl/model/MavenModelMerger.java @@ -165,7 +165,9 @@ protected void mergeModel_ArtifactId( @Override protected void mergeModel_Profiles( Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) { - // neither inherited nor injected + // Profiles are neither inherited nor injected during inheritance assembly. + // Parent profiles are processed and injected into the parent model before inheritance, + // so only child profiles remain to be processed. } @Override diff --git a/impl/maven-impl/src/test/java/org/apache/maven/impl/model/MavenModelMergerTest.java b/impl/maven-impl/src/test/java/org/apache/maven/impl/model/MavenModelMergerTest.java index 22227f2da9..d6bbdedbd5 100644 --- a/impl/maven-impl/src/test/java/org/apache/maven/impl/model/MavenModelMergerTest.java +++ b/impl/maven-impl/src/test/java/org/apache/maven/impl/model/MavenModelMergerTest.java @@ -79,11 +79,12 @@ void testMergeModelPrerequisites() { assertEquals(modelPrerequisites, builder.build().getPrerequisites()); } - // Profiles are neither inherited nor injected + // Profiles are neither inherited nor injected during inheritance assembly @Test void testMergeModelProfiles() { + Profile parentProfile = Profile.newBuilder().id("PARENT").build(); Model parent = Model.newBuilder() - .profiles(Collections.singletonList(Profile.newInstance())) + .profiles(Collections.singletonList(parentProfile)) .build(); Model model = Model.newInstance(); Model.Builder builder = Model.newBuilder(model); @@ -95,7 +96,8 @@ void testMergeModelProfiles() { .profiles(Collections.singletonList(modelProfile)) .build(); builder = Model.newBuilder(model); - modelMerger.mergeModel_Prerequisites(builder, model, parent, false, null); - assertEquals(Collections.singletonList(modelProfile), builder.build().getProfiles()); + modelMerger.mergeModel_Profiles(builder, model, parent, false, null); + assertEquals(1, builder.build().getProfiles().size()); + assertEquals("MODEL", builder.build().getProfiles().get(0).getId()); } } diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8736ConcurrentFileActivationTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8736ConcurrentFileActivationTest.java new file mode 100644 index 0000000000..36ed647fa2 --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8736ConcurrentFileActivationTest.java @@ -0,0 +1,209 @@ +/* + * 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 org.junit.jupiter.api.Test; + +/** + * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-8736">MNG-8736</a>. + * + * Tests concurrent file-based profile activation in a multi-module build to ensure + * that profiles are correctly activated/deactivated based on file existence in each module. + */ +class MavenITmng8736ConcurrentFileActivationTest extends AbstractMavenIntegrationTestCase { + + MavenITmng8736ConcurrentFileActivationTest() { + super("[4.0.0-alpha-1,)"); + } + + /** + * Verify that file-based profile activation works correctly in concurrent builds. + * + * This test creates a parent with 32 child modules, where: + * - 16 modules have the activation file (should activate the profile) + * - 16 modules don't have the activation file (should not activate the profile) + * + * The test runs with multiple threads to verify thread safety. + */ + @Test + void testConcurrentFileActivation() throws Exception { + File testDir = extractResources("/mng-8736"); + + Verifier verifier = newVerifier(testDir.getAbsolutePath()); + verifier.addCliArgument("-T"); + verifier.addCliArgument("4"); + verifier.addCliArgument("-Dmaven.modelBuilder.parallelism=4"); // Use 4 threads for concurrent execution + // verifier.addCliArgument("-X"); // Enable debug logging to see detailed traces + verifier.addCliArgument("help:active-profiles"); + verifier.execute(); + verifier.verifyErrorFreeLog(); + + // Print detailed analysis before assertions + analyzeProfileActivationResults(verifier); + + // Collect all failures before throwing any assertions + StringBuilder failures = new StringBuilder(); + + // Check all 32 modules + for (int i = 1; i <= 32; i++) { + String module = "child" + i; + boolean shouldBeActivated = (i % 2 == 1); // Odd-numbered modules have activation files + checkProfileActivation(verifier, module, shouldBeActivated, failures); + } + + // If there are any failures, throw them all at once + if (failures.length() > 0) { + throw new AssertionError("Profile activation failures detected:\n" + failures.toString()); + } + } + + private void checkProfileActivation( + Verifier verifier, String module, boolean shouldBeActivated, StringBuilder failures) { + try { + String logContent = verifier.loadLogContent(); + String moduleSection = extractModuleSection(logContent, module); + boolean isActivated = moduleSection.contains("file-activated"); + + if (shouldBeActivated && !isActivated) { + failures.append("- ") + .append(module) + .append(": Profile should be activated but was NOT (has activation file)\n"); + } else if (!shouldBeActivated && isActivated) { + failures.append("- ") + .append(module) + .append(": Profile should NOT be activated but WAS (no activation file)\n"); + } + } catch (Exception e) { + failures.append("- ") + .append(module) + .append(": Exception during check: ") + .append(e.getMessage()) + .append("\n"); + } + } + + private void verifyProfileActivatedInLog(Verifier verifier, String module) throws Exception { + // Check that the log contains evidence of profile activation for this module + String logContent = verifier.loadLogContent(); + String moduleSection = extractModuleSection(logContent, module); + if (!moduleSection.contains("file-activated")) { + throw new AssertionError("Profile 'file-activated' was not activated in module " + module + + ". This indicates a concurrency issue with file-based profile activation." + + "\nModule section: " + moduleSection); + } + } + + private void verifyProfileNotActivatedInLog(Verifier verifier, String module) throws Exception { + // Check that the log does not contain evidence of profile activation for this module + String logContent = verifier.loadLogContent(); + String moduleSection = extractModuleSection(logContent, module); + if (moduleSection.contains("file-activated")) { + throw new AssertionError("Profile 'file-activated' was incorrectly activated in module " + module + + ". Module section: " + moduleSection); + } + } + + private String extractModuleSection(String logContent, String module) { + // Extract the section of the log that corresponds to this module using the active profiles output + String projectMarker = + "Active Profiles for Project 'org.apache.maven.its.mng8736:" + module + ":jar:1.0-SNAPSHOT':"; + String nextProjectMarker = "Active Profiles for Project 'org.apache.maven.its.mng8736:"; + + int startIndex = logContent.indexOf(projectMarker); + if (startIndex == -1) { + return "Module section not found for " + module; + } + + int endIndex = logContent.indexOf(nextProjectMarker, startIndex + projectMarker.length()); + if (endIndex == -1) { + // Look for other end markers + endIndex = logContent.indexOf("[INFO] Copying org.apache.maven.its.mng8736", startIndex); + if (endIndex == -1) { + endIndex = logContent.length(); + } + } + + return logContent.substring(startIndex, endIndex); + } + + private void analyzeProfileActivationResults(Verifier verifier) throws Exception { + String logContent = verifier.loadLogContent(); + + System.out.println("\n=== PROFILE ACTIVATION ANALYSIS ==="); + + // Check file existence for all modules + File testDir = new File(verifier.getBasedir()); + + System.out.println("\nFile existence verification:"); + for (int i = 1; i <= 32; i++) { + String module = "child" + i; + File activationFile = new File(testDir, module + "/activate.marker"); + boolean shouldExist = (i % 2 == 1); // Odd-numbered modules should have activation files + boolean exists = activationFile.exists(); + + if (shouldExist) { + System.out.println(" " + module + "/activate.marker: " + (exists ? "EXISTS" : "MISSING")); + } else { + System.out.println(" " + module + "/activate.marker: " + + (exists ? "EXISTS (unexpected!)" : "MISSING (expected)")); + } + } + + // Analyze profile activation results + System.out.println("\nProfile activation results:"); + for (int i = 1; i <= 32; i++) { + String module = "child" + i; + String moduleSection = extractModuleSection(logContent, module); + boolean activated = moduleSection.contains("file-activated"); + boolean shouldBeActivated = (i % 2 == 1); // Odd-numbered modules should have profile activated + + if (shouldBeActivated) { + System.out.println( + " " + module + ": " + (activated ? "ACTIVATED" : "NOT ACTIVATED") + (activated ? " ✓" : " ✗")); + } else { + System.out.println(" " + module + ": " + (activated ? "ACTIVATED (unexpected!)" : "NOT ACTIVATED") + + (activated ? " ✗" : " ✓")); + } + } + + // Look for thread-related information in debug logs + System.out.println("\nThread information from debug logs:"); + String[] threadPatterns = {"Thread-", "pool-", "ForkJoinPool", "MultiThreadedBuilder"}; + + for (String pattern : threadPatterns) { + long count = + logContent.lines().filter(line -> line.contains(pattern)).count(); + if (count > 0) { + System.out.println(" Lines containing '" + pattern + "': " + count); + } + } + + // Look for profile activation debug messages + System.out.println("\nProfile activation debug traces:"); + logContent + .lines() + .filter(line -> line.contains("file-activated") && line.contains("DEBUG")) + .limit(10) + .forEach(line -> System.out.println(" " + line.trim())); + + System.out.println("=== END ANALYSIS ===\n"); + } +} diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java b/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java index 810926b103..91a50cf03b 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/TestSuiteOrdering.java @@ -101,6 +101,7 @@ public TestSuiteOrdering() { * the tests are to finishing. Newer tests are also more likely to fail, so this is * a fail fast technique as well. */ + suite.addTestSuite(MavenITmng8736ConcurrentFileActivationTest.class); suite.addTestSuite(MavenITmng8744CIFriendlyTest.class); suite.addTestSuite(MavenITmng8572DITypeHandlerTest.class); suite.addTestSuite(MavenITmng3558PropertyEscapingTest.class); diff --git a/its/core-it-suite/src/test/resources/mng-8736/child1/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child1/activate.marker new file mode 100644 index 0000000000..d31148c9a3 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child1/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child1 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child1/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child1/pom.xml new file mode 100644 index 0000000000..7c701382e8 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child1/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child1</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child1</name> + <description>Child module with activation file (should activate profile)</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child10/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child10/pom.xml new file mode 100644 index 0000000000..4d1446fa2e --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child10/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child10</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child10</name> + <description>Child module 10</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child11/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child11/activate.marker new file mode 100644 index 0000000000..165402f601 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child11/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child11 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child11/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child11/pom.xml new file mode 100644 index 0000000000..062fae16a6 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child11/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child11</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child11</name> + <description>Child module 11</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child12/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child12/pom.xml new file mode 100644 index 0000000000..f5826daf10 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child12/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child12</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child12</name> + <description>Child module 12</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child13/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child13/activate.marker new file mode 100644 index 0000000000..0cd38c81cb --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child13/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child13 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child13/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child13/pom.xml new file mode 100644 index 0000000000..dc1bd534cb --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child13/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child13</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child13</name> + <description>Child module 13</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child14/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child14/pom.xml new file mode 100644 index 0000000000..6714793e74 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child14/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child14</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child14</name> + <description>Child module 14</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child15/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child15/activate.marker new file mode 100644 index 0000000000..cf6436e603 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child15/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child15 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child15/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child15/pom.xml new file mode 100644 index 0000000000..b9d375bdcb --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child15/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child15</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child15</name> + <description>Child module 15</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child16/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child16/pom.xml new file mode 100644 index 0000000000..01332a7fdc --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child16/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child16</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child16</name> + <description>Child module 16</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child17/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child17/activate.marker new file mode 100644 index 0000000000..da440d321a --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child17/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child17 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child17/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child17/pom.xml new file mode 100644 index 0000000000..5ec65d90ce --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child17/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child17</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child17</name> + <description>Child module 17</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child18/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child18/pom.xml new file mode 100644 index 0000000000..c08c0008d6 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child18/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child18</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child18</name> + <description>Child module 18</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child19/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child19/activate.marker new file mode 100644 index 0000000000..5cdc2c040d --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child19/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child19 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child19/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child19/pom.xml new file mode 100644 index 0000000000..961078d924 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child19/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child19</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child19</name> + <description>Child module 19</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child2/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child2/pom.xml new file mode 100644 index 0000000000..32bf072a8b --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child2/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child2</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child2</name> + <description>Child module without activation file (should not activate profile)</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child20/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child20/pom.xml new file mode 100644 index 0000000000..5656e530c3 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child20/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child20</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child20</name> + <description>Child module 20</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child21/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child21/activate.marker new file mode 100644 index 0000000000..73d1c3c8f0 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child21/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child21 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child21/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child21/pom.xml new file mode 100644 index 0000000000..781280b8e1 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child21/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child21</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child21</name> + <description>Child module 21</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child22/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child22/pom.xml new file mode 100644 index 0000000000..9c5e02c0be --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child22/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child22</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child22</name> + <description>Child module 22</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child23/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child23/activate.marker new file mode 100644 index 0000000000..ae8baec736 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child23/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child23 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child23/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child23/pom.xml new file mode 100644 index 0000000000..2bcf6e930c --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child23/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child23</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child23</name> + <description>Child module 23</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child24/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child24/pom.xml new file mode 100644 index 0000000000..cfea877e42 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child24/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child24</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child24</name> + <description>Child module 24</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child25/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child25/activate.marker new file mode 100644 index 0000000000..b04f52d835 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child25/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child25 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child25/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child25/pom.xml new file mode 100644 index 0000000000..2e4312a93c --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child25/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child25</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child25</name> + <description>Child module 25</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child26/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child26/pom.xml new file mode 100644 index 0000000000..5c5ec7a7f5 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child26/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child26</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child26</name> + <description>Child module 26</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child27/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child27/activate.marker new file mode 100644 index 0000000000..92676c24bf --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child27/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child27 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child27/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child27/pom.xml new file mode 100644 index 0000000000..4fd3184985 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child27/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child27</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child27</name> + <description>Child module 27</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child28/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child28/pom.xml new file mode 100644 index 0000000000..e0b3a5e30d --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child28/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child28</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child28</name> + <description>Child module 28</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child29/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child29/activate.marker new file mode 100644 index 0000000000..3160733aba --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child29/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child29 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child29/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child29/pom.xml new file mode 100644 index 0000000000..c1f085c62c --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child29/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child29</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child29</name> + <description>Child module 29</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child3/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child3/activate.marker new file mode 100644 index 0000000000..5be5eabeb7 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child3/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child3 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child3/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child3/pom.xml new file mode 100644 index 0000000000..1d90a831c2 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child3/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child3</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child3</name> + <description>Child module 3</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child30/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child30/pom.xml new file mode 100644 index 0000000000..1cf3f76d52 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child30/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child30</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child30</name> + <description>Child module 30</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child31/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child31/activate.marker new file mode 100644 index 0000000000..58c5d8cfdb --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child31/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child31 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child31/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child31/pom.xml new file mode 100644 index 0000000000..da01d815c9 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child31/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child31</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child31</name> + <description>Child module 31</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child32/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child32/pom.xml new file mode 100644 index 0000000000..95eb4e38c4 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child32/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child32</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child32</name> + <description>Child module 32</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child4/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child4/pom.xml new file mode 100644 index 0000000000..7a9044cad6 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child4/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child4</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child4</name> + <description>Child module 4</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child5/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child5/activate.marker new file mode 100644 index 0000000000..4929b8de2b --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child5/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child5 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child5/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child5/pom.xml new file mode 100644 index 0000000000..e2f5bae583 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child5/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child5</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child5</name> + <description>Child module 5</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child6/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child6/pom.xml new file mode 100644 index 0000000000..9dbd23eae0 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child6/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child6</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child6</name> + <description>Child module 6</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child7/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child7/activate.marker new file mode 100644 index 0000000000..cc0d98e190 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child7/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child7 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child7/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child7/pom.xml new file mode 100644 index 0000000000..d896458e36 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child7/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child7</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child7</name> + <description>Child module 7</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child8/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child8/pom.xml new file mode 100644 index 0000000000..2541987ed3 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child8/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child8</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child8</name> + <description>Child module 8</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/child9/activate.marker b/its/core-it-suite/src/test/resources/mng-8736/child9/activate.marker new file mode 100644 index 0000000000..5359c869b9 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child9/activate.marker @@ -0,0 +1 @@ +This file triggers profile activation for child9 diff --git a/its/core-it-suite/src/test/resources/mng-8736/child9/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/child9/pom.xml new file mode 100644 index 0000000000..945559fdd1 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/child9/pom.xml @@ -0,0 +1,33 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <artifactId>child9</artifactId> + + <name>Maven Integration Test :: MNG-8736 :: Child9</name> + <description>Child module 9</description> +</project> diff --git a/its/core-it-suite/src/test/resources/mng-8736/pom.xml b/its/core-it-suite/src/test/resources/mng-8736/pom.xml new file mode 100644 index 0000000000..114f5e6c74 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-8736/pom.xml @@ -0,0 +1,87 @@ +<?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 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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.maven.its.mng8736</groupId> + <artifactId>parent</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Maven Integration Test :: MNG-8736 :: Parent</name> + <description>Test concurrent file-based profile activation in multi-module build</description> + + <modules> + <module>child1</module> + <module>child2</module> + <module>child3</module> + <module>child4</module> + <module>child5</module> + <module>child6</module> + <module>child7</module> + <module>child8</module> + <module>child9</module> + <module>child10</module> + <module>child11</module> + <module>child12</module> + <module>child13</module> + <module>child14</module> + <module>child15</module> + <module>child16</module> + <module>child17</module> + <module>child18</module> + <module>child19</module> + <module>child20</module> + <module>child21</module> + <module>child22</module> + <module>child23</module> + <module>child24</module> + <module>child25</module> + <module>child26</module> + <module>child27</module> + <module>child28</module> + <module>child29</module> + <module>child30</module> + <module>child31</module> + <module>child32</module> + </modules> + + <profiles> + <profile> + <id>file-activated</id> + <activation> + <file> + <exists>activate.marker</exists> + </file> + </activation> + <properties> + <profile.activated>true</profile.activated> + </properties> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.13.2</version> + <scope>test</scope> + </dependency> + </dependencies> + </profile> + </profiles> +</project>