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

Release 1.7 #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions pibify-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.flipkart.pibify</groupId>

<parent>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify</artifactId>
<version>${revision}</version>
</parent>

<artifactId>pibify-core</artifactId>
<packaging>jar</packaging>
<version>1.6</version>
<version>${revision}</version>
<name>pibify-core</name>
<properties>
<protobuf-java.version>4.28.2</protobuf-java.version>

</properties>
Comment on lines 33 to 35
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Define missing protobuf-java.version property.

The property ${protobuf-java.version} is used in dependencies but not defined in either this POM or the parent POM.

 <properties>
+    <protobuf-java.version>4.28.2</protobuf-java.version>
 </properties>
📝 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
<properties>
<protobuf-java.version>4.28.2</protobuf-java.version>
</properties>
<properties>
<protobuf-java.version>4.28.2</protobuf-java.version>
</properties>

<build>
<plugins>
Expand Down
11 changes: 7 additions & 4 deletions pibify-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify</artifactId>
<version>${revision}</version>
</parent>
<packaging>maven-plugin</packaging>
<version>1.6</version>
<groupId>com.flipkart.pibify</groupId>
<version>${revision}</version>
<artifactId>pibify-maven-plugin</artifactId>

<name>Pibify Maven Plugin</name>
Expand All @@ -33,7 +37,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<auto-service.version>1.1.1</auto-service.version>
<maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>
<javapoet.version>1.13.0</javapoet.version>
<maven.version>3.8.4</maven.version>
</properties>
Expand Down Expand Up @@ -172,7 +175,7 @@
<dependency>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-core</artifactId>
<version>1.6</version>
<version>${revision}</version>
</dependency>

<dependency>
Expand Down
76 changes: 75 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify</artifactId>
<packaging>pom</packaging>
<version>1.6</version>
<version>${revision}</version>
<name>pibify</name>
<properties>
<maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>
<protobuf-java.version>4.28.2</protobuf-java.version>
<revision>1.7-SNAPSHOT</revision>
</properties>
<modules>
<module>pibify-core</module>
Expand All @@ -35,4 +37,76 @@
<module>test-environments/lombok</module>
<module>test-environments/vertx</module>
</modules>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.0.1</version>
<configuration>
<updatePomFile>true</updatePomFile>
<outputDirectory>target</outputDirectory>
<flattenMode>bom</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<prefix>git</prefix>
<verbose>false</verbose>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
</generateGitPropertiesFilename>
<format>json</format>
<gitDescribe>
<skip>false</skip>
<always>true</always>
<dirty>-dirty</dirty>
</gitDescribe>
</configuration>
</plugin>
Comment on lines +75 to +101
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical: Update git-commit-id-plugin version and configuration.

The current configuration has several issues:

  1. Version 2.2.4 is severely outdated (latest is 7.0.0)
  2. Hardcoded .git directory path might cause issues in CI/CD environments
 <plugin>
     <groupId>pl.project13.maven</groupId>
     <artifactId>git-commit-id-plugin</artifactId>
-    <version>2.2.4</version>
+    <version>7.0.0</version>
     <configuration>
-        <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
+        <useNativeGit>true</useNativeGit>
         <generateGitPropertiesFile>true</generateGitPropertiesFile>
         <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
📝 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
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<prefix>git</prefix>
<verbose>false</verbose>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
</generateGitPropertiesFilename>
<format>json</format>
<gitDescribe>
<skip>false</skip>
<always>true</always>
<dirty>-dirty</dirty>
</gitDescribe>
</configuration>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>7.0.0</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<useNativeGit>true</useNativeGit>
<prefix>git</prefix>
<verbose>false</verbose>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
</generateGitPropertiesFilename>
<format>json</format>
<gitDescribe>
<skip>false</skip>
<always>true</always>
<dirty>-dirty</dirty>
</gitDescribe>
</configuration>
</plugin>

</plugins>
</build>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub flipkart-incubator Apache Maven Packages</name>
<url>https://maven.pkg.github.com/flipkart-incubator/pibify</url>
</repository>
</distributionManagement>
Comment on lines +105 to +111
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

GitHub Packages deployment configuration is incomplete

The distributionManagement is configured in pom.xml, but the GitHub Actions workflow doesn't handle package deployment. Update .github/workflows/maven.yml to include:

  1. Required permissions:
permissions:
  packages: write
  1. Deployment step:
- name: Publish to GitHub Packages
  run: mvn -B deploy
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
🔗 Analysis chain

Verify GitHub Packages authentication configuration.

The distribution management setup looks correct, but ensure that GitHub authentication is properly configured in your CI/CD environment and local settings.xml:

  1. CI/CD: Set GITHUB_TOKEN with write:packages scope
  2. Local: Add server credentials to ~/.m2/settings.xml:
<servers>
    <server>
        <id>github</id>
        <username>USERNAME</username>
        <password>TOKEN</password>
    </server>
</servers>
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if settings.xml exists in common locations
echo "Checking for settings.xml configuration..."
for dir in ~/.m2 .mvn .; do
    if [ -f "$dir/settings.xml" ]; then
        echo "Found settings.xml in $dir"
        # Check if it contains github server configuration (without exposing credentials)
        grep -A 5 "<id>github</id>" "$dir/settings.xml" || echo "No github server configuration found in $dir/settings.xml"
    fi
done

Length of output: 276


Script:

#!/bin/bash
# Check for GitHub Actions workflow files
echo "Checking GitHub Actions workflows..."
fd -e yml -e yaml . .github/workflows

# Look for GitHub token or authentication setup in workflows
echo -e "\nChecking authentication configuration in workflows..."
rg -i "github.*token|secrets\..*token|permissions.*packages" .github/workflows

Length of output: 354


Script:

#!/bin/bash
# Display the complete workflow file
echo "Content of GitHub Actions workflow:"
cat .github/workflows/maven.yml

Length of output: 1285

</project>
11 changes: 8 additions & 3 deletions test-environments/dropwizard/test-dropwizard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify</artifactId>
<version>${revision}</version>
<relativePath>../../../pom.xml</relativePath>
</parent>

<groupId>com.pibify</groupId>
<artifactId>test-dropwizard</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
Expand Down Expand Up @@ -69,7 +74,7 @@
<dependency>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-core</artifactId>
<version>1.6</version>
<version>${revision}</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -112,7 +117,7 @@
<plugin>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-maven-plugin</artifactId>
<version>1.6</version>
<version>${revision}</version>
<configuration>
<excludes>
<!-- <exclude>com/flipkart/pibify/toskip/**</exclude>-->
Expand Down
14 changes: 10 additions & 4 deletions test-environments/lombok/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.flipkart.pibify</groupId>
<parent>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify</artifactId>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>pibify-test-lombok</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>pibify-test-lombok</name>

<properties>
<maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>

</properties>

<build>
Expand All @@ -44,7 +50,7 @@
<plugin>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-maven-plugin</artifactId>
<version>1.6</version>
<version>${revision}</version>
<executions>
<execution>
<id>generate-sources</id>
Expand Down Expand Up @@ -106,7 +112,7 @@
<dependency>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-core</artifactId>
<version>1.6</version>
<version>${revision}</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
19 changes: 11 additions & 8 deletions test-environments/pibify-test-vanilla/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-test-vanilla</artifactId>
<parent>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify</artifactId>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>pibify-test-vanilla</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>pibify-test-vanilla</name>
<url>http://url-here</url>

<properties>
<maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>
<pibify-annotation-processor.version>1.1</pibify-annotation-processor.version>

</properties>

<build>
Expand All @@ -46,7 +49,7 @@
<plugin>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-maven-plugin</artifactId>
<version>1.6</version>
<version>${revision}</version>
<configuration>
<excludes>
<exclude>com/flipkart/pibify/toskip/**</exclude>
Expand All @@ -68,7 +71,7 @@
<plugin>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-maven-plugin</artifactId>
<version>1.6</version>
<version>${revision}</version>
<configuration>
<incremental>true</incremental>
<incrementalBuildProvider>com.flipkart.pibify.mvn.GitIncrementalBuildProvider</incrementalBuildProvider>
Expand Down Expand Up @@ -137,7 +140,7 @@
<dependency>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-core</artifactId>
<version>1.6</version>
<version>${revision}</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
16 changes: 10 additions & 6 deletions test-environments/vertx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.flipkart.pibify</groupId>
<parent>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify</artifactId>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>pibify-test-vertex</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>pibify-test-vertex</name>
<url>http://url-here</url>

<properties>
<maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>
<pibify-annotation-processor.version>1.1</pibify-annotation-processor.version>

</properties>

<build>
Expand All @@ -46,7 +50,7 @@
<plugin>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-maven-plugin</artifactId>
<version>1.6</version>
<version>${revision}</version>
<dependencies>
<dependency>
<groupId>io.vertx</groupId>
Expand Down Expand Up @@ -129,7 +133,7 @@
<dependency>
<groupId>com.flipkart.pibify</groupId>
<artifactId>pibify-core</artifactId>
<version>1.6</version>
<version>${revision}</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Loading