SAM is not compatible with license-maven-plugin-git
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- build-system
Research direction
Start with aws_lambda_builders/workflows/java_maven/workflow.py, especially the EXCLUDED_FILES setting referenced in the issue. Reproduce the failure with a Java project using license-maven-plugin-git and sam build, then determine which proposed configuration allows the build to complete. Done means the project builds with sam build while the plugin can access the required Git metadata.
Written by the indexing model from the issue text.
Description
Description:
In my company, we have to use license-maven-plugin-git to check for a company header in all files (it's a company mandate).
Since java workflow is excluding .git (here) when copying it to scratch dir, sam build is failing, because it fails to check for files header.
[INFO] --- license-maven-plugin:3.0:check (default) @ my-lambdas ---
[INFO] Checking licenses...
[WARNING] failure occured while calling class com.mycila.maven.plugin.license.git.CopyrightRangeProvider
java.lang.RuntimeException: Could not compute the year of the last git commit for file mylambda.java
at com.mycila.maven.plugin.license.git.CopyrightRang[WARNING] failure occured while calling class com.mycila.maven.plugin.license.git.CopyrightRangeProvider
I think we can have at least two approaches to fix:
- Be able to override
EXCLUDED_FILESvalue to allow.giton java workflow - Be able to append custom maven parameters, then I can do
-Dlicense.skip=trueand use another build command to validate license header.
I do prefer option 1, since I may have only one build command.
Steps to reproduce the issue:
- Configure a java project with license-maven-plugin-git
- Try to build it using
sam build
Observed result:
sam build is failing since license-maven-plugin-git is unable to get git year.
Expected result:
Be able to build a project using license-maven-plugin-gitby using onlysam build`
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- java8
- maven 3.6.2
- Dominant language
- Python
- Stars
- 381
- Forks
- 162
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-lambda-builders
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aws/aws-lambda-builders#925 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
aws/aws-lambda-builders#924 · 1 comment ·
-
Bug: PythonUvBuilder fails to build app with dependencies on editable installs in the workspace Openstage/needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 25/100
aws/aws-lambda-builders#892 ·
-
stage/needs-triage type/feature
Difficulty 4/5 3-5 days Newbie friendliness 38/100
aws/aws-lambda-builders#839 · 2 comments · 1 reaction ·
-
area/build contributors/good-first-issue contributors/welcome type/feature
Difficulty 4/5 3-5 days Newbie friendliness 38/100
aws/aws-lambda-builders#831 · 3 comments ·
All issues in aws/aws-lambda-builders
Similar issues
-
sponsored
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Diaoul/subliminal#1382 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100