You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "michael-o (via GitHub)" <gi...@apache.org> on 2024/06/08 21:51:44 UTC
[PR] [MRELEASE-1144] Upgrade to Parent 42 and Maven 3.6.3 [maven-release]
michael-o opened a new pull request, #216:
URL: https://github.com/apache/maven-release/pull/216
This closes #216
Following this checklist to help us incorporate your
contribution quickly and easily:
- [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MRELEASE) filed
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] Format the pull request title like `[MRELEASE-XXX] - Fixes bug in ApproximateQuantiles`,
where you replace `MRELEASE-XXX` with the appropriate JIRA issue. Best practice
is to use the JIRA issue title in the pull request title and in the first line of the
commit message.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify -Prun-its` to make sure basic checks pass. A more thorough check will
be performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRELEASE-1144] Upgrade to Parent 42 [maven-release]
Posted by "asfgit (via GitHub)" <gi...@apache.org>.
asfgit merged PR #216:
URL: https://github.com/apache/maven-release/pull/216
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRELEASE-1144] Upgrade to Parent 42 and Maven 3.6.3 [maven-release]
Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #216:
URL: https://github.com/apache/maven-release/pull/216#issuecomment-2156250872
Resolution problem is gone, but still for some reason junit is added as a test dep to subproject2 which does not make sense...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRELEASE-1144] Upgrade to Parent 42 and Maven 3.6.3 [maven-release]
Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #216:
URL: https://github.com/apache/maven-release/pull/216#issuecomment-2156217725
@cstamas Can you help and have a look at the failure? subproject2 depends on subproject1 (in compile scope) which has junit in test scope, but some some reason that is dragged into subproject1 as test as well.
The code which builds is:
```
protected List<MavenProject> createReactorProjects(String sourcePath, String targetPath, String executionRoot)
throws Exception {
final Path testCaseRootFrom =
Paths.get(getBasedir(), "src/test/resources").resolve(Paths.get("projects", sourcePath));
final Path testCaseRootTo = getWorkingDirectory(targetPath);
// Recopy the test resources since they are modified in some tests
Files.walkFileTree(testCaseRootFrom, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
Path relPath = testCaseRootFrom.relativize(file);
if (!relPath.toFile().getName().startsWith("expected-")) {
Files.createDirectories(testCaseRootTo.resolve(relPath).getParent());
Files.copy(file, testCaseRootTo.resolve(relPath), StandardCopyOption.REPLACE_EXISTING);
}
return FileVisitResult.CONTINUE;
}
});
Path projectFile;
if (executionRoot == null) {
projectFile = testCaseRootTo.resolve("pom.xml");
} else {
projectFile = testCaseRootTo.resolve(Paths.get(executionRoot, "pom.xml"));
}
List<ArtifactRepository> repos = Collections.singletonList(
new DefaultArtifactRepository("central", getRemoteRepositoryURL(), new DefaultRepositoryLayout()));
Repository repository = new Repository();
repository.setId("central");
repository.setUrl(getRemoteRepositoryURL());
Profile profile = new Profile();
profile.setId("profile");
profile.addRepository(repository);
ProjectBuildingRequest buildingRequest = new DefaultProjectBuildingRequest();
buildingRequest.setLocalRepository(localRepository);
buildingRequest.setRemoteRepositories(repos);
buildingRequest.setPluginArtifactRepositories(repos);
buildingRequest.setRepositoryMerging(RepositoryMerging.REQUEST_DOMINANT);
DefaultRepositorySystemSession repositorySession = new DefaultRepositorySystemSession();
repositorySession.setLocalRepositoryManager(new SimpleLocalRepositoryManagerFactory()
.newInstance(repositorySession, new LocalRepository(localRepository.getBasedir())));
buildingRequest.setRepositorySession(repositorySession);
buildingRequest.addProfile(profile);
buildingRequest.setActiveProfileIds(Collections.singletonList(profile.getId()));
buildingRequest.setResolveDependencies(true);
List<ProjectBuildingResult> buildingResults =
projectBuilder.build(Collections.singletonList(projectFile.toFile()), true, buildingRequest);
List<MavenProject> reactorProjects = new ArrayList<>();
for (ProjectBuildingResult buildingResult : buildingResults) {
reactorProjects.add(buildingResult.getProject());
}
WorkspaceReader simpleReactorReader = new SimpleReactorWorkspaceReader(reactorProjects);
repositorySession.setWorkspaceReader(simpleReactorReader);
ProjectSorter sorter = new ProjectSorter(reactorProjects);
reactorProjects = sorter.getSortedProjects();
List<MavenProject> resolvedProjects = new ArrayList<>(reactorProjects.size());
for (MavenProject project : reactorProjects) {
MavenProject resolvedProject =
projectBuilder.build(project.getFile(), buildingRequest).getProject();
// from LifecycleDependencyResolver
if (resolvedProject.getDependencyArtifacts() == null) {
try {
resolvedProject.setDependencyArtifacts(
resolvedProject.createArtifacts(artifactFactory, null, null));
} catch (InvalidDependencyVersionException e) {
throw new LifecycleExecutionException(e);
}
}
// TODO .... understand why this is working ... :-)
// why projectBuilder doesn't resolve and set in proper way DependencyArtifacts and Artifacts
if (resolvedProject.getDependencyArtifacts().size()
>= resolvedProject.getArtifacts().size()
&& resolvedProject.getDependencyArtifacts().stream().noneMatch(a -> a.getVersion() == null)) {
resolvedProject.setArtifacts(resolvedProject.getDependencyArtifacts());
}
resolvedProjects.add(resolvedProject);
}
return resolvedProjects;
}
```
from `org.apache.maven.shared.release.phase.AbstractReleaseTestCase`.
I am down to

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRELEASE-1144] Upgrade to Parent 42 [maven-release]
Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #216:
URL: https://github.com/apache/maven-release/pull/216#issuecomment-2156543319
Maven upgrade will be handled separately
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRELEASE-1144] Upgrade to Parent 42 [maven-release]
Posted by "asfgit (via GitHub)" <gi...@apache.org>.
asfgit closed pull request #216: [MRELEASE-1144] Upgrade to Parent 42
URL: https://github.com/apache/maven-release/pull/216
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRELEASE-1144] Upgrade to Parent 42 and Maven 3.6.3 [maven-release]
Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #216:
URL: https://github.com/apache/maven-release/pull/216#issuecomment-2156224489
I think I have found it, stay put...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRELEASE-1144] Upgrade to Parent 42 [maven-release]
Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #216:
URL: https://github.com/apache/maven-release/pull/216#issuecomment-2156744166
Moved partially to #217.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org