Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ares: Make pom.xml file ready for deployment on Maven Central. #37

Merged
merged 7 commits into from
Oct 31, 2024

Conversation

MarkusPaulsen
Copy link
Collaborator

@MarkusPaulsen MarkusPaulsen commented Oct 22, 2024

Checklist

General

Motivation and Context

The current version of the pom.xml does not fulfill the requirements and settings for Ares2 to be uploaded to Maven Central. This PR intends to fix this

Description

This PR changes:

  • The version number of Ares2 from SNAPSHOT to Beta-1
  • This version adds the public certificate fingerprint of Markus Paulsen to the pom file.
  • Added a new execution in the maven-install-plugin for building a .pom file (required for Maven Central)
  • Fixed potential OS based errors by removing / and replacing it with ${file.separator}
  • Added thesis students as developers
  • Replaced nexus-staging-maven-plugin with central-publishing-maven-plugin

Steps for Testing

Check if Ares is succesfully deployed on https://mvnrepository.com/artifact/de.tum.cit.ase/ares

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Performance Review#### Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Summary by CodeRabbit

  • New Features

    • Updated project version to 2.0.0-Beta-1.
    • Enhanced artifact management with new plugin configurations for publishing.
  • Improvements

    • Improved build process with the addition of a new execution block for installing the POM file.
    • Added new properties for better dependency management.
    • Added new developer entries to the project.
  • Bug Fixes

    • Updated GPG key ID for improved security.
    • Updated dependencies to their latest versions for better performance.
    • Corrected capitalization of developer roles for consistency.

Copy link
Contributor

coderabbitai bot commented Oct 22, 2024

Walkthrough

The changes in the pull request primarily involve updates to the pom.xml file, focusing on versioning, dependency management, and plugin configurations. The project version is changed from 2.0.0-SNAPSHOT to 2.0.0-Beta-1, and the GPG key ID is updated. New properties for instrumentation and AspectJ paths are added. An execution block for the maven-install-plugin is introduced, and the maven-surefire-plugin is modified to use these new properties. Additionally, the maven-gpg-plugin version is updated, and the nexus-staging-maven-plugin is replaced with the central-publishing-maven-plugin. Minor changes include updates to developer roles and entries.

Changes

File Change Summary
pom.xml - Version updated from 2.0.0-SNAPSHOT to 2.0.0-Beta-1
- GPG key ID updated to a new certificate fingerprint
- New properties added: instrumentation-path and aspectj-path
- New execution block added for maven-install-plugin to install the POM file
- Version of maven-gpg-plugin updated from 3.1.0 to 3.2.7
- Replaced nexus-staging-maven-plugin with central-publishing-maven-plugin
- Minor changes: capitalization of developer role and addition of two new developer entries

Poem

In the garden of code, where changes bloom,
A new version hops, dispelling the gloom.
With plugins refreshed and GPG keys bright,
Our POM file dances in the soft moonlight.
Two new friends join, a thesis delight,
Together we build, our future in sight! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
pom.xml (1)

463-465: Surefire plugin configuration updated correctly.

The argLine has been updated to use the new version number, which is good. However, consider using Maven properties for version numbers to avoid hardcoding.

Consider refactoring the argLine to use Maven properties:

-                    <argLine>-javaagent:${project.build.directory}${file.separator}ares-2.0.0-Beta-1-agent.jar
+                    <argLine>-javaagent:${project.build.directory}${file.separator}ares-${project.version}-agent.jar
                         -Xbootclasspath/a:${user.home}${file.separator}.m2${file.separator}repository${file.separator}org${file.separator}aspectj${file.separator}aspectjrt${file.separator}${aspectj.version}${file.separator}aspectjrt-${aspectj.version}.jar
                     </argLine>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 973a371 and 09d2f33.

📒 Files selected for processing (1)
  • pom.xml (8 hunks)
🧰 Additional context used
🔇 Additional comments (8)
pom.xml (8)

199-212: Good addition of POM installation execution.

This ensures that the POM file is properly installed in the local repository during the package phase, which is a good practice for Maven projects.


533-562: Developer information updates look good.

The capitalization of MarkusPaulsen's role improves consistency, and the addition of two thesis students as developers provides proper attribution for their contributions.


655-655: Maven GPG plugin version update is appropriate.

Updating to the latest version (3.2.7) of the maven-gpg-plugin is a good practice. This may include important bug fixes or new features.


682-682: Correct update to publishingServerId.

The change of publishingServerId to "central" is correct and consistent with the switch to the central-publishing-maven-plugin for Maven Central deployment.


Line range hint 1-689: Overall, the changes effectively prepare the project for Maven Central deployment.

The updates to version numbers, GPG configurations, and Maven plugins align well with the PR objective. The switch to the central-publishing-maven-plugin and the addition of the POM installation execution are particularly noteworthy improvements. Consider the suggested refactorings and verifications to further enhance the deployment process.


677-679: Good update to use central-publishing-maven-plugin.

Replacing nexus-staging-maven-plugin with central-publishing-maven-plugin is appropriate for publishing to Maven Central. This aligns with current best practices.

Ensure that the new plugin is correctly configured:

✅ Verification successful

central-publishing-maven-plugin is properly configured.

The plugin is correctly set up with the necessary parameters for publishing to Maven Central.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the central-publishing-maven-plugin is properly configured
grep -A 10 "central-publishing-maven-plugin" pom.xml

Length of output: 517


7-7: Version update looks good.

The change from SNAPSHOT to Beta-1 aligns with the PR objective of preparing for Maven Central deployment.

Ensure that all references to the version number in the codebase are updated accordingly. Run this script to check:

✅ Verification successful

All references to the old version have been successfully updated.

No occurrences of "2.0.0-SNAPSHOT" found in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to the old version
rg "2\.0\.0-SNAPSHOT" --type xml --type java

Length of output: 129


Script:

#!/bin/bash
# Search for any remaining references to the old version
rg "2\.0\.0-SNAPSHOT" --type xml --type java

Length of output: 46


22-23: GPG key ID update is appropriate.

The longer key ID format enhances security for artifact signing. This is crucial for Maven Central deployment.

Verify that the new GPG key is properly set up in the build environment:

pom.xml Outdated Show resolved Hide resolved
Co-authored-by: Sarp Sahinalp <[email protected]>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
pom.xml (1)

199-212: Remove unnecessary comment in POM installation configuration.

The comment <!-- Ensure this is correctly pointing to your POM file --> is redundant as ${basedir}/pom.xml is the standard location.

                        <configuration>
-                            <file>${basedir}/pom.xml</file> <!-- Ensure this is correctly pointing to your POM file -->
+                            <file>${basedir}/pom.xml</file>
                            <groupId>${project.groupId}</groupId>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 09d2f33 and 2e15164.

📒 Files selected for processing (1)
  • pom.xml (8 hunks)
🔇 Additional comments (3)
pom.xml (3)

7-7: LGTM: Version and GPG key updates are appropriate for Maven Central deployment.

The version change from SNAPSHOT to Beta-1 and the GPG key update with full fingerprint are well-documented and suitable for Maven Central deployment.

Also applies to: 22-23


655-655: LGTM: Plugin updates are appropriate for Maven Central deployment.

The updates to maven-gpg-plugin and the replacement of nexus-staging-maven-plugin with central-publishing-maven-plugin are well-configured for Maven Central deployment.

Also applies to: 677-682


463-465: ⚠️ Potential issue

Use project.version property instead of hard-coded version.

Replace hard-coded version 2.0.0-Beta-1 with ${project.version} in agent paths to maintain consistency and avoid version mismatch issues.

-                    <argLine>-javaagent:${project.build.directory}${file.separator}ares-2.0.0-Beta-1-agent.jar
+                    <argLine>-javaagent:${project.build.directory}${file.separator}ares-${project.version}-agent.jar

The path separator issue in the fast profile has been previously addressed by @sarpsahinalp.

Also applies to: 638-640

<id>SarpSahinalp</id>
<name>Sarp Sahinalp</name>
<email>[email protected]</email>
<url>https://ase.cit.tum.de/people/paulsen/</url>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix incorrect developer URLs.

The URLs for Sarp Sahinalp and Anirudh Zaveri are incorrectly pointing to Markus Paulsen's page.

-            <url>https://ase.cit.tum.de/people/paulsen/</url>
+            <url>https://ase.cit.tum.de/people/sahinalp/</url>
-            <url>https://ase.cit.tum.de/people/paulsen/</url>
+            <url>https://ase.cit.tum.de/people/zaveri/</url>

Also applies to: 555-555

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 2e15164 and 2a1479a.

📒 Files selected for processing (1)
  • pom.xml (8 hunks)
🔇 Additional comments (6)
pom.xml (6)

7-7: Version update aligns with Maven Central requirements.

The version change from SNAPSHOT to Beta-1 is appropriate for Maven Central deployment.


22-23: GPG key fingerprint comment is a good practice.

Including the full fingerprint in a comment helps with key verification.


533-536: Role capitalization update is consistent with naming conventions.

The capitalization change in the role from "scientific researcher" to "Scientific Researcher" improves consistency.


537-561: Fix incorrect URLs in developer entries.

The URLs for Sarp Sahinalp and Anirudh Zaveri are incorrectly pointing to Markus Paulsen's page.


655-655: Plugin updates align with Maven Central requirements.

The updates to maven-gpg-plugin version and replacement of nexus-staging-maven-plugin with central-publishing-maven-plugin are appropriate for Maven Central deployment.

Also applies to: 677-682


199-212: Verify POM installation configuration.

The new execution block for POM installation looks correct, but ensure the file path is properly resolved.

✅ Verification successful

POM installation path configuration is correctly set up

The verification confirms that the POM file exists at the expected location (${basedir}/pom.xml), which means the file path in the Maven install-file configuration is properly resolved.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify POM file exists at the specified location
if [ -f "${PWD}/pom.xml" ]; then
    echo "POM file exists at the expected location"
else
    echo "Warning: POM file not found at ${PWD}/pom.xml"
fi

Length of output: 130

pom.xml Outdated
Comment on lines 463 to 465
<argLine>-javaagent:${project.build.directory}${file.separator}${project.artifactId}-${project.version}-agent.jar
-Xbootclasspath/a:${user.home}${file.separator}.m2${file.separator}repository${file.separator}org${file.separator}aspectj${file.separator}aspectjrt${file.separator}${aspectj.version}${file.separator}aspectjrt-${aspectj.version}.jar
</argLine>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Refactor argLine configuration to use properties.

The argLine configuration contains hardcoded paths. Consider extracting these into properties for better maintainability.

+    <properties>
+        <agent.path>${project.build.directory}${file.separator}${project.artifactId}-${project.version}-agent.jar</agent.path>
+        <aspectj.bootclasspath>-Xbootclasspath/a:${user.home}${file.separator}.m2${file.separator}repository${file.separator}org${file.separator}aspectj${file.separator}aspectjrt${file.separator}${aspectj.version}${file.separator}aspectjrt-${aspectj.version}.jar</aspectj.bootclasspath>
+    </properties>

     <configuration>
         <forkCount>1</forkCount>
-        <argLine>-javaagent:${project.build.directory}${file.separator}${project.artifactId}-${project.version}-agent.jar
-            -Xbootclasspath/a:${user.home}${file.separator}.m2${file.separator}repository${file.separator}org${file.separator}aspectj${file.separator}aspectjrt${file.separator}${aspectj.version}${file.separator}aspectjrt-${aspectj.version}.jar
-        </argLine>
+        <argLine>-javaagent:${agent.path} ${aspectj.bootclasspath}</argLine>
     </configuration>

Committable suggestion was skipped due to low confidence.

pom.xml Outdated
Comment on lines 638 to 640
<argLine>-javaagent:${project.build.directory}${file.separator}${project.artifactId}-${project.version}-agent.jar
-Xbootclasspath/a:${user.home}/.m2/repository/org/aspectj/aspectjrt/${aspectj.version}/aspectjrt-${aspectj.version}.jar
</argLine>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Inconsistent path separator usage in fast profile.

The fast profile uses hardcoded Unix-style path separators (/) while the main configuration uses ${file.separator}. This could cause issues on Windows.

-                            <argLine>-javaagent:${project.build.directory}${file.separator}${project.artifactId}-${project.version}-agent.jar
-                                -Xbootclasspath/a:${user.home}/.m2/repository/org/aspectj/aspectjrt/${aspectj.version}/aspectjrt-${aspectj.version}.jar
+                            <argLine>-javaagent:${project.build.directory}${file.separator}${project.artifactId}-${project.version}-agent.jar
+                                -Xbootclasspath/a:${user.home}${file.separator}.m2${file.separator}repository${file.separator}org${file.separator}aspectj${file.separator}aspectjrt${file.separator}${aspectj.version}${file.separator}aspectjrt-${aspectj.version}.jar
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<argLine>-javaagent:${project.build.directory}${file.separator}${project.artifactId}-${project.version}-agent.jar
-Xbootclasspath/a:${user.home}/.m2/repository/org/aspectj/aspectjrt/${aspectj.version}/aspectjrt-${aspectj.version}.jar
</argLine>
<argLine>-javaagent:${project.build.directory}${file.separator}${project.artifactId}-${project.version}-agent.jar
-Xbootclasspath/a:${user.home}${file.separator}.m2${file.separator}repository${file.separator}org${file.separator}aspectj${file.separator}aspectjrt${file.separator}${aspectj.version}${file.separator}aspectjrt-${aspectj.version}.jar
</argLine>

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 2a1479a and baa3b13.

📒 Files selected for processing (1)
  • pom.xml (12 hunks)
🔇 Additional comments (9)
pom.xml (9)

7-7: LGTM! Version update follows semantic versioning.

The version change from 2.0.0-SNAPSHOT to 2.0.0-Beta-1 follows semantic versioning conventions and appropriately indicates a beta release.


22-23: LGTM! GPG key configuration is properly documented.

The GPG key ID is properly documented with the full fingerprint in a comment, which is a good practice for key management.


199-212: LGTM! POM installation configuration is correct.

The new execution block for installing the POM file during the package phase is properly configured with all required parameters.


463-465: Refactor argLine configuration using properties.

This comment was already made in a previous review. The suggestion to use properties for the argLine configuration is still valid.


533-562: Fix incorrect developer URLs.

This comment was already made in a previous review. The URLs for Sarp Sahinalp and Anirudh Zaveri are still incorrectly pointing to Markus Paulsen's page.


623-623: LGTM! Snapshot repository configuration is correct.

The snapshot repository configuration using a local directory is appropriate for GitHub's limitations with snapshots.


638-640: Inconsistent path separator usage in fast profile.

This comment was already made in a previous review. The fast profile still uses inconsistent path separators.


677-682: LGTM! Central publishing plugin configuration is correct.

The replacement of nexus-staging-maven-plugin with central-publishing-maven-plugin is appropriate for Maven Central deployment, and the configuration is correct.


655-655: LGTM! GPG plugin version update is appropriate.

The update to maven-gpg-plugin version 3.2.7 is appropriate and includes security improvements.

pom.xml Outdated
Comment on lines 365 to 386
<file>${project.build.outputDirectory}${file.separator}ch${file.separator}qos${file.separator}logback${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}com${file.separator}intellij${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}com${file.separator}sun${file.separator}</file>
<!-- We cannot fulfill this one because we are building those classes here
<file>${project.build.outputDirectory}/de/tum/cit/ase/ares/api/</file> -->
<file>${project.build.outputDirectory}/java/</file>
<file>${project.build.outputDirectory}/javax/</file>
<file>${project.build.outputDirectory}/jdk/</file>
<file>${project.build.outputDirectory}/net/jqwik/</file>
<file>${project.build.outputDirectory}/org/apache/</file>
<file>${project.build.outputDirectory}/org/assertj/</file>
<file>${project.build.outputDirectory}/org/eclipse/</file>
<file>${project.build.outputDirectory}/org/jacoco/</file>
<file>${project.build.outputDirectory}/org/json/</file>
<file>${project.build.outputDirectory}/org/junit/</file>
<file>${project.build.outputDirectory}/org/opentest4j/</file>
<file>${project.build.outputDirectory}/sun/</file>
<file>${project.build.outputDirectory}/com/github/javaparser/</file>
<file>${project.build.outputDirectory}${file.separator}de${file.separator}tum${file.separator}cit${file.separator}ase${file.separator}ares${file.separator}api${file.separator}</file> -->
<file>${project.build.outputDirectory}${file.separator}java${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}javax${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}jdk${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}net${file.separator}jqwik${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}org${file.separator}apache${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}org${file.separator}assertj${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}org${file.separator}eclipse${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}org${file.separator}jacoco${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}org${file.separator}json${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}org${file.separator}junit${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}org${file.separator}opentest4j${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}sun${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}com${file.separator}github${file.separator}javaparser${file.separator}</file>
<!-- Required for de.tum.cit.ase.ares.api.security.ArtemisSecurityConfigurationTest -->
<!-- <file>${project.build.outputDirectory}/abc/def/</file> -->
<file>${project.build.outputDirectory}/org/gradle/</file>
<file>${project.build.outputDirectory}/worker/org/gradle/</file>
<!-- <file>${project.build.outputDirectory}${file.separator}abc${file.separator}def${file.separator}</file> -->
<file>${project.build.outputDirectory}${file.separator}org${file.separator}gradle${file.separator}</file>
<file>${project.build.outputDirectory}${file.separator}worker${file.separator}org${file.separator}gradle${file.separator}</file>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider using properties for package paths.

The enforcer plugin configuration contains many hardcoded package paths. Consider extracting these into properties for better maintainability.

+ <properties>
+     <trusted.packages>
+         ch.qos.logback,
+         com.intellij,
+         com.sun,
+         java,
+         javax,
+         jdk,
+         net.jqwik,
+         org.apache,
+         org.assertj,
+         org.eclipse,
+         org.jacoco,
+         org.json,
+         org.junit,
+         org.opentest4j,
+         sun,
+         com.github.javaparser,
+         org.gradle,
+         worker.org.gradle
+     </trusted.packages>
+ </properties>

  <requireFilesDontExist>
      <files>
-         <file>${project.build.outputDirectory}${file.separator}ch${file.separator}qos${file.separator}logback${file.separator}</file>
+         <file>${project.build.outputDirectory}${file.separator}${trusted.packages}</file>

Committable suggestion was skipped due to low confidence.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between baa3b13 and 25c82f9.

📒 Files selected for processing (1)
  • pom.xml (12 hunks)
🔇 Additional comments (6)
pom.xml (6)

7-7: LGTM: Version update from SNAPSHOT to Beta-1.

The version change from 2.0.0-SNAPSHOT to 2.0.0-Beta-1 is appropriate for Maven Central deployment.


22-27: LGTM: Properties configuration for deployment.

Good practices observed:

  • Full GPG key fingerprint documented in comment
  • Path properties extracted for better maintainability
  • Consistent use of ${file.separator} for cross-platform compatibility

202-215: LGTM: New POM installation configuration.

The new execution block for installing the POM file during the package phase is correctly configured and necessary for Maven Central deployment.


465-465: LGTM: Consistent agent configuration.

The surefire plugin configuration correctly uses the new properties for agent paths in both the main and fast profiles.

Also applies to: 638-638


675-680: LGTM: Updated deployment configuration.

The switch from nexus-staging-maven-plugin to central-publishing-maven-plugin is appropriate for Maven Central deployment.


533-561: ⚠️ Potential issue

Fix incorrect developer URLs.

The URLs for Sarp Sahinalp and Anirudh Zaveri are incorrectly pointing to Markus Paulsen's page.

Apply these fixes:

-            <url>https://ase.cit.tum.de/people/paulsen/</url>
+            <url>https://ase.cit.tum.de/people/sahinalp/</url>
-            <url>https://ase.cit.tum.de/people/paulsen/</url>
+            <url>https://ase.cit.tum.de/people/zaveri/</url>

pom.xml Outdated
Comment on lines 368 to 374
<file>${project.build.outputDirectory}/abc/def/</file>
<file>${project.build.outputDirectory}/ch/qos/logback/</file>
<file>${project.build.outputDirectory}/com/github/javaparser/</file>
<file>${project.build.outputDirectory}/com/intellij/</file>
<file>${project.build.outputDirectory}/com/sun/</file>
<!-- We cannot fulfill this one because we are building those classes here
<file>${project.build.outputDirectory}/de/tum/cit/ase/ares/api/</file> -->
<file>${project.build.outputDirectory}/de/tum/cit/ase/ares/api/</file>
<file>${project.build.outputDirectory}/de/tum/in/test/api/</file>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider using properties for package paths.

The enforcer plugin configuration contains many hardcoded package paths. Consider extracting these into properties for better maintainability.

+ <properties>
+     <trusted.packages>abc.def,ch.qos.logback,com.github.javaparser,com.intellij,com.sun,de.tum.cit.ase.ares.api,de.tum.in.test.api,java,javax,jdk,net.jqwik,org.apache,org.assertj,org.eclipse,org.jacoco,org.json,org.junit,org.opentest4j,sun,org.gradle,worker.org.gradle</trusted.packages>
+ </properties>

  <configuration>
      <rules>
          <requireFilesDontExist>
              <files>
-                 <file>${project.build.outputDirectory}/abc/def/</file>
-                 <file>${project.build.outputDirectory}/ch/qos/logback/</file>
+                 <files>${trusted.packages}</files>

Committable suggestion was skipped due to low confidence.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
pom.xml (1)

Line range hint 375-398: Consider using properties for package paths.

The list of restricted packages is quite long. Consider extracting these paths into properties for better maintainability.

+ <properties>
+     <trusted.packages>ch.qos.logback,com.github.javaparser,com.intellij,com.sun,java,javax,jdk,net.jqwik,org.apache,org.assertj,org.eclipse,org.jacoco,org.json,org.junit,org.opentest4j,sun,org.gradle,worker.org.gradle</trusted.packages>
+ </properties>

  <requireFilesDontExist>
      <files>
-         <file>${project.build.outputDirectory}/ch/qos/logback/</file>
-         <file>${project.build.outputDirectory}/com/github/javaparser/</file>
+         <files>${trusted.packages}</files>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 25c82f9 and 97fe7a0.

📒 Files selected for processing (1)
  • pom.xml (12 hunks)
🔇 Additional comments (7)
pom.xml (7)

7-7: LGTM: Version update is appropriate for Maven Central.

The version change from SNAPSHOT to Beta-1 follows Maven's version naming conventions for release versions.


22-23: LGTM: GPG key configuration is properly documented.

The full certificate fingerprint is included as a comment, which is good practice for key identification and verification.


26-31: LGTM: Well-structured path properties.

The new properties improve maintainability by centralizing path configurations and using platform-independent separators.


206-220: LGTM: POM installation configuration is properly set up.

The new execution block correctly installs the POM file during the package phase, which is necessary for Maven Central deployment.


429-434: LGTM: Cross-platform path handling.

The use of ${file.separator} ensures proper path handling across different operating systems.


551-551: Duplicate comment: Fix incorrect developer URLs.

This issue was already identified in a previous review.

Also applies to: 565-565


663-663: LGTM: Plugin updates align with Maven Central requirements.

The updates to the GPG plugin and the switch to central-publishing-maven-plugin are appropriate for Maven Central deployment.

Also applies to: 685-691

@@ -446,7 +472,7 @@
<version>3.5.1</version>
<configuration>
<forkCount>1</forkCount>
<argLine>-javaagent:${project.build.directory}${file.separator}ares-2.0.0-SNAPSHOT-agent.jar -Xbootclasspath/a:${user.home}${file.separator}.m2${file.separator}repository${file.separator}org${file.separator}aspectj${file.separator}aspectjrt${file.separator}${aspectj.version}${file.separator}aspectjrt-${aspectj.version}.jar</argLine>
<argLine>-javaagent:${instrumentation-path} -Xbootclasspath/a:${aspectj-path}</argLine>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider extracting duplicated argLine configuration.

The same argLine configuration appears in both the main build and fast profile. Consider extracting it to a property.

 <properties>
+    <surefire.argLine>-javaagent:${instrumentation-path} -Xbootclasspath/a:${aspectj-path}</surefire.argLine>
 </properties>

 <configuration>
     <forkCount>1</forkCount>
-    <argLine>-javaagent:${instrumentation-path} -Xbootclasspath/a:${aspectj-path}</argLine>
+    <argLine>${surefire.argLine}</argLine>
 </configuration>

Also applies to: 648-648

Copy link
Collaborator

@sarpsahinalp sarpsahinalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code lgtm and tests are passing

@MarkusPaulsen MarkusPaulsen merged commit 951ddd6 into main Oct 31, 2024
2 checks passed
@MarkusPaulsen MarkusPaulsen deleted the chore/maven-central-deployment branch October 31, 2024 21:06
@coderabbitai coderabbitai bot mentioned this pull request Dec 5, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants