If you are not planning on developing/contributing code to OpenMRS-Core or any other module, I would suggest trying to build and use a released version like 1.10.2 or 1.11.2 (using git checkout). As I believe, the code is changing each moment for .x(1.10.x or 1.11.x and so on) branches having chances of bad code, and in this case there might be some files without license headers and giving the build errors.
@Maurya: Thanks for your suggestion. As I plan to build the module on the OpenMRS platform, I would still need to compile and run the openmrs-core. This would also enable to run the openmrs-webapp on a local server to actually install and manage the modules, if required later.
I would do what @wyclif mentioned as it would help find out which files have the problem.
Secondly, I might have wrongly implied that you had to deploy the war from the downloads. I asked to to git checkout that code and build and deploy them, that way you still can debug and run it in the local.
@wyclif: Thank you for your suggestion. I have created new files for the edtriage module using maven archetype and have not added any files to the OpenMRS core. As I am building the module on the OpenMRS platform which is 1.10x (suggested by mentor), I was trying to run openmrs webapp to install the module. The openmrs version in the current pom file is 1.10.3 .
Can you give some details how do I know the problematic files listed by plugin.
Am certainly sure that the module archetype is still generating files with the incorrect header, we need to update it to have the new license. Sorry but you have to manually replace the headers in your java classes to this:
Great to see @manikam that you were able to resolve this issue.
I am trying to build openmrs core 1.12.x using JDK 1.8 and running into the same issue. I just cloned the repository today and got the same error on doing a ‘mvn clean install’.
I randomly checked a dozen java files in different packages of openmrs-core but all of them had already implemented the MPL license.
@manikam, could you share some more details on where did you update the license?
Hi @maany. As mentioned in the previous replies by other developers, there are changes happening to the openmrs-core code base. Please try to clone openmrs-core or pull the latest changes and additionally, you may also check the jdk version to see if it is compatible with the openmrs branch you are trying to build. This might help to get the license for the files.
Just a heads up. The issue still hasn’t been fixed and I’m facing the exact same issue in 1.10.x. The license header one. I reset back to commits in February and they seemed to work I believe. So if anyone is looking to work on this branch, you might want to consider doing the same