See the comments above, it seems like you have files with the old or no license
@manikam, As @darius and @maany mentioned, which files are having the wrong license header? I did a string search through the project but couldn’t figure out which ones. Also, I couldn’t pinpoint anything in the error log either. Thanks
Which project is this?
Last I remember, we were all facing this issue on 1.10.x. Maany was facing it building 1.12.x and so was I. I’m currently on master. Will inform when I switch
But those builds are passing on CI, if they are local build failures, it means you either forgot to add the license to some new files you added as suggested by the error message or you added an invalid license.
Note that OpenMRS expected the license to start with /** instead of /* and your IDE might do this incorrectly (from OpenMRS’s perspective).
I posted about this on talk a month or so ago:
I just ran into this problem on Core 1.10.x, @dkayiwa hinted on IRC that this solves the issue:
git clean -df mvn clean install
Had a similar issue while adding some classes to Fhir2 module. I manually edited the classes and added the Licence headers at the top and build was succesful.(Prior to that no build was successful) Iam just wondering wether this is good practice
In my view, it’s the right thing to do. Automatically checking that the license is present is the only way to ensure it’s in all the appropriate files. That said, you can easily add a license header to new files in the FHIR2 module by running
mvn check-license:format or, of course, you can change your IDE to already include the license header in a newly created file.