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

Build stopped by files with unapproved licenses #250

Open
DomGarguilo opened this issue Oct 21, 2022 · 3 comments
Open

Build stopped by files with unapproved licenses #250

DomGarguilo opened this issue Oct 21, 2022 · 3 comments
Labels
bug terraform issues related to terraform

Comments

@DomGarguilo
Copy link
Member

Trying to run mvn clean verify results in a build failure due to:

[WARNING] Files with unapproved licenses:
  contrib/terraform-testing-infrastructure/modules/config-files/conf/hadoop_bashrc
  contrib/terraform-testing-infrastructure/modules/config-files/conf/hosts
  contrib/terraform-testing-infrastructure/modules/config-files/conf/genders
  contrib/terraform-testing-infrastructure/modules/config-files/conf/hadoop_bash_profile

These are sources generated from using Terraform and I have to manually delete them before being able to run verify.

@dlmarion
Copy link
Contributor

I believe the conf directory used to be in .gitignore. check that file and it's history

@DomGarguilo
Copy link
Member Author

I believe the conf directory used to be in .gitignore. check that file and it's history

It is in the .gitignore (contrib/terraform-testing-infrastructure/.gitignore) but the error that im seeing comes from the apache-rat-plugin. There is probably a way to have contrib/terraform-testing-infrastructure/modules/config-files/conf/ ignored by the plugin too.

@ctubbsii
Copy link
Member

Generated files for maven builds should be in the target/ directory, or elsewhere outside the source tree for most Maven plugins to ignore them. apache-rat-plugin won't automatically ignore them simply because they're in a folder's .gitignore, since it doesn't read those files There's no reason for apache-rat-plugin to expect you to be running in a git clone, regardless of whether it sees a .gitignore file or not, or to know that .gitignore'd files aren't going to be included in whatever assembly is being prepared but whether or not they are ignored by the SCM. Rat's job is to check for improperly licensed files anywhere in the source tree.

We can add ignore rules for these, but really, generated files shouldn't be polluting the source tree in the first place. We used to do that with a lib directory in the main accumulo repo's source tree, and it caused all sorts of problems. We finally stopped doing that, and now put all generated stuff (that we don't check in) in the target directories.

One way this can be solved is by, instead of relying on .gitignore, just copy it to another directory and run terraform there. This copy-and-run-elsewhere behavior could even be scripted for convenience.

@DomGarguilo DomGarguilo added the terraform issues related to terraform label Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug terraform issues related to terraform
Projects
None yet
Development

No branches or pull requests

3 participants