Mifos is is licensed under the Apache License, version 2.0. It is important to ensure licensing and copyright information is present and consistent in every source code file for a number of reasons, such as:
- provide a clear message of chosen license to those wishing to make use of Mifos source code in other projects
- protect Mifos intellectual property
How to License Mifos Source Code
Mifos licensing and copyright information must be present in all source code. Source code can usually be found in plain text files with extensions like .java, .xml, .sql, and so forth.
Java source code (.java)
The following block of text should appear at the very top of the file. The text should appear exactly as follows; it should not be a javadoc comment. See org.mifos.config.ProcessFlowRules
for an example.
/* * Copyright (c) 2005-2010 Grameen Foundation USA * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing * permissions and limitations under the License. * * See also http://www.apache.org/licenses/LICENSE-2.0.html for an * explanation of the license and how it is applied. */
Java properties files (.properties)
The following block of text should appear at the very top of the file.
# Copyright (c) 2005-2010 Grameen Foundation USA # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. See the License for the specific language governing # permissions and limitations under the License. # # See also http://www.apache.org/licenses/LICENSE-2.0.html for an # explanation of the license and how it is applied.
XML markup (.xml)
The following block of text must must appear below the document text declaration.
<!-- Copyright (c) 2005-2010 Grameen Foundation USA All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See also http://www.apache.org/licenses/LICENSE-2.0.html for an explanation of the license and how it is applied. -->
Freemarker templates (.ftl)
Freemarker templates do not include license text. This makes freemarker templates more terse and maintainable. Also, all of Mifos (including .ftl files) is covered under the same license; it is unlikely that .ftl files are useful as-is outside Mifos.
Java Server Pages (.jsp)
The following block of text should appear at the very top of the file. The text should appear exactly as follows; it should not be an HTML comment. See CreateSavingsProductPreview.jsp
for an example.
<%-- Copyright (c) 2005-2010 Grameen Foundation USA All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See also http://www.apache.org/licenses/LICENSE-2.0.html for an explanation of the license and how it is applied. --%>
Structured Query Language files (.sql)
The following block of text should appear at the very top of the file.
-- Copyright (c) 2005-2010 Grameen Foundation USA -- All rights reserved. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -- implied. See the License for the specific language governing -- permissions and limitations under the License. -- -- See also http://www.apache.org/licenses/LICENSE-2.0.html for an -- explanation of the license and how it is applied.
JavaScript source code (.js)
Identical to Java source code. Note that these comments are removed during the build process (see Maven POMs), so wasting bandwidth is not an issue.