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

chore: fix declaration of maven-source-plugin for v3.3.0 #1922

Merged
merged 6 commits into from
Jan 26, 2024

Conversation

mpeddada1
Copy link
Contributor

@mpeddada1 mpeddada1 commented Jan 25, 2024

The release job is currently failing with:

[INFO] Parent for the Google HTTP Client Library for Java . SUCCESS [  6.038 s]
[INFO] Google HTTP Client Library for Java ................ FAILURE [  8.781 s]
[INFO] Android Platform Extensions to the Google HTTP Client Library for Java. SKIPPED
[INFO] Apache HTTP transport v2 for the Google HTTP Client Library for Java. SKIPPED
[INFO] Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. SKIPPED
[INFO] Google App Engine extensions to the Google HTTP Client Library for Java. SKIPPED
[INFO] GSON extensions to the Google HTTP Client Library for Java. SKIPPED
[INFO] Jackson 2 extensions to the Google HTTP Client Library for Java. SKIPPED
[INFO] Protocol Buffer extensions to the Google HTTP Client Library for Java. SKIPPED
[INFO] XML extensions to the Google HTTP Client Library for Java. SKIPPED
[INFO] Assembly for the Google HTTP Client Library for Java SKIPPED
[INFO] Google APIs Client Library Findbugs custom plugin. . SKIPPED
[INFO] Simple example for the Dailymotion API. ............ SKIPPED
[INFO] Google HTTP Client Library for Java BOM ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  15.888 s
[INFO] Finished at: 2024-01-24T20:33:48Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-source-plugin:3.3.0:jar-no-fork (attach-sources) on project google-http-client: Presumably you have configured maven-source-plugn to execute twice times in your build. You have to configure a classifier for at least on of them. -> [Help 1]

This started happening after we included the native-image-shared-config artifact.The parent pom brings in maven-source-plugin:3.3.0 in the release profile` :
https://github.com/googleapis/java-shared-config/blob/28b2c77ddd2078d628cb8f2b16fae8efd0e673a5/native-image-shared-config/pom.xml#L107-L121.

This PR leverages pluginManagement instead of duplicating the setting in all the module poms to address the issue. This is similar to how google-aut-library-java is set up.

<plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>source-jar</id>
            <phase>compile</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

BEGIN_COMMIT_OVERRIDE
fix: fixing declaration of maven-source-plugin for release job
END_COMMIT_OVERRIDE

@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Jan 25, 2024
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Jan 25, 2024
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Jan 25, 2024
@mpeddada1 mpeddada1 marked this pull request as ready for review January 25, 2024 23:18
@mpeddada1 mpeddada1 requested a review from a team as a code owner January 25, 2024 23:18
@mpeddada1 mpeddada1 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 26, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 26, 2024
@mpeddada1
Copy link
Contributor Author

The kokoro failure is unrelated to the changes in the PR. See googleapis/java-shared-config#712 (comment) for similar observation in a different repo.

@mpeddada1 mpeddada1 merged commit f555f56 into main Jan 26, 2024
22 of 23 checks passed
@mpeddada1 mpeddada1 deleted the fix-source-plugin branch January 26, 2024 19:22
@suztomo suztomo added the release-please:force-run To run release-please label Jan 26, 2024
@release-please release-please bot removed the release-please:force-run To run release-please label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants