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

adds licensing plugin, reformats licensing, and adds pom metadata #57

Merged
merged 1 commit into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

{{ project }} Copyright (C) {{ year }} {{ organization }}
xpdf-api Copyright (C) 2024 xpdf.io
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
29 changes: 11 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,24 @@

## todo:
- licensing
- what does GPLv3 specify i must do with my code? (just add license and info right?)
- license and "copyright notice" must be included with every distribution? (including jar on maven) https://gist.github.com/kn9ts/cbe95340d29fc1aaeaa5dd5c059d2e60
here's how you can include license in jar with a plugin: https://stackoverflow.com/a/39741925/8784215
...you should go see how other opensource projects do it.
otherwise, maybe you can just add it to the project resources for each individual module, but thats annoying to duplicate https://stackoverflow.com/a/37655114/8784215
see the maven license plugin https://www.mojohaus.org/license-maven-plugin/examples/example-add-license.html
- understand difference between license and copyright, and what that means for this project https://stackoverflow.com/a/13437203/8784215
- replace placeholders in licensing headers (ie, {{ organization }})
maybe go find some examples online in github and see how others do it..
- part of build process is to ensure all of your dependencies are gpl3 compatible.
you should add licensing plugin to help in verification of that https://www.mojohaus.org/license-maven-plugin/
- understand difference between license and copyright, and what that means for this project https://stackoverflow.com/a/13437203/8784215
do i have to reference original Glyph/Cog copyright or anything?
- use this awesome open-source licensing plugin to do the following.. https://oss.carbou.me/license-maven-plugin/
- (TODO) verify that all source files have the correct header (in correct part of lifecycle)
- (TODO) verify in build process that all of your dependencies are gpl3 compatible (in correct part of lifecycle)
- (TODO) add copy of license to package, if possible (in correct part of lifecycle)
- fix maven javadoc plugin to run only during deployment, not during local install...
- create official xpdf.io email address, replace property in license plugin, and rerun formatter
- fix maven license plugin to add copy of license to release package (if it can do that)
- add key metadata to poms. see other open source project for examples (ie lombok has <license>, <issue management>, <developers>, etc)
- clean up SCRIBBLES, or maybe organize into other docs at root that may be needed (ie, CONTRIBUTING https://github.com/spring-projects/spring-boot/blob/main/CONTRIBUTING.adoc)
- figure out process to deploy to maven central repo
- take into consideration repos which provide download statistics: https://blog.sonatype.com/2010/12/now-available-central-download-statistics-for-oss-projects/
- guide: https://maven.apache.org/repository/guide-central-repository-upload.html
- requirements (link from within page above) https://central.sonatype.org/publish/requirements/
- figure out maven-release-plugin, to control versioning and release process to maven central
a good starting point for this would be to find a popular/respected open-source repo using pom configs, and see if they have maven release plugin configured, and how they do it.
- add key metadata to poms. see other open source project for examples (ie lombok has <license>, <issue management>, <developers>, etc)
- "Xpdf" doesn't seem to be copyrighted, but double check this... also, should you copyright "xpdf.io"?
- "Xpdf" doesn't seem to be trademarked, but double check this... should you trademark it "xpdf.io" and create business with that name??
- make xpdf.io repo public
can/should you somehow segregate this repo from your personal github account?
would be nice to have some general xpdf.io repo, with some public open-source stuff (xpdf-api) and some private stuff (xpdf-web)
Expand All @@ -36,8 +34,3 @@
have decided not to host any binaries I didn't compile myself (for
disk space and support reasons)."
- WRITE THIS README!
- javadoc:
- is there a way to generate javadocs for lombok components?
like, for example - Intellij can read sources and interpret everything just fine.
if you download sources for this project from xpdf-web, and inspect PdfTextTool.builder().timeoutSeconds(), you get proper info.
but if you look at javadoc generated for same component, you dont get any of that info (like @implNote)
15 changes: 11 additions & 4 deletions SCRIBBLES
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Release checklist (verify before every release of new package)
- ensure all newly-created classes and poms have the GPL3 license header
- ensure any newly-added dependencies are GPL3 compatible (only those that will be packaged and distributed; not test dependencies)
- verify all classes (and poms) have correct licensing (run maven license plugin)
- verify all dependencies are GPL3 compatible (run maven license plugin)
- ensure all newly-created modules have correct pom structure and metadata
- upgrade major/minor/patch version
- major, if fundamental contract change (ie, we no longer include xpdf libs and instead interface directly with them via JNA)
- minor, if new feature or something relatively significant (ie, add compatibility with PdfImages tool or something)
Expand All @@ -13,6 +14,8 @@
## Change instructions (notes for how to approach changing specific aspects of this codebase)
- if new versions of xpdf binaries added, make sure to also update supporting docs (the Xpdf docs required for GPL3 redistribution, as specified in Xpdf source readme)
- new binaries should be extracted from source archives. project resource structure matches that of source archives, but unrelated files removed (specifically, non-pdftotext bins and docs)
- new classes should have correct license header, java docs, comments, etc (what else? make specific checklist when you formalize these notes)
- new modules/poms should have correct license header, pom metadata, etc

## licensing, helpful links
- another really helpful post https://opensource.stackexchange.com/q/9141
Expand Down Expand Up @@ -54,9 +57,13 @@
Considering that xpdf.io is purely an api for xpdf source code, and considering its whole whose purpose is realized in accessing xpdf functionality, it's pretty obvious that xpdf.io should be considered a "derivative work"
Thus -> we license as GPL3
- This lib includes other open source libraries utilizing Apache 2.0 license, so they are automatically compatible with GPLv3 https://opensource.stackexchange.com/a/8249
- This project includes full LICENSE.txt at the root, and a statement in the header of each source file indicating that it is covered by that license
- This project includes full LICENSE at the root, indicating that it is covered by that license
- https://www.gnu.org/licenses/gpl-faq.en.html#LicenseCopyOnly
- https://github.com/licenses/license-templates/blob/master/templates/gpl3-header.txt
- This lib uses an awesome open source licensing plugin, https://oss.carbou.me/license-maven-plugin/
- adds a license header to source files
- adds a copy of license to release package (todo)
- verifies all files have proper header (todo)
- verifies all dependencies are gpl3 compatible (todo)

## future improvements
- in the future, make PdfTextTool extend Callable so that users of sdk can run asynchronously if they would prefer?
Expand Down
24 changes: 18 additions & 6 deletions common-api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
{{ project }}
Copyright (C) {{ year }} {{ organization }}

Common - A library of common components.
Copyright © 2024 xpdf.io (cfrehr@gmail.com)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
the Free Software Foundation, version 3.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand All @@ -15,19 +15,31 @@

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>common-api</artifactId>

<parent>
<groupId>io.xpdf</groupId>
<artifactId>xpdf-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>common-api</artifactId>

<name>Common</name>
<description>A library of common components.</description>
<url>https://xpdf.io</url>
<licenses>
<license>
<name>GNU General Public License, v3.0 only</name>
<url>https://www.gnu.org/licenses/gpl-3.0.html</url>
</license>
</licenses>
<inceptionYear>2024</inceptionYear>

<dependencies>
<dependency>
<groupId>commons-io</groupId>
Expand Down
12 changes: 4 additions & 8 deletions common-api/src/main/java/io/xpdf/api/common/XpdfRequest.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* Common - A library of common components.
* Copyright © 2024 xpdf.io (cfrehr@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
Expand All @@ -22,8 +21,5 @@
*
* @since 1.0.0
*/
//todo: should we have an abstract options class as well?
// and is there something we could/should do with lombok builders for this situation?
//todo: should this be abstract in the first place? or just be some non-abstract parent?
public abstract class XpdfRequest {
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* Common - A library of common components.
* Copyright © 2024 xpdf.io (cfrehr@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
Expand Down
9 changes: 4 additions & 5 deletions common-api/src/main/java/io/xpdf/api/common/XpdfTool.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* Common - A library of common components.
* Copyright © 2024 xpdf.io (cfrehr@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* Common - A library of common components.
* Copyright © 2024 xpdf.io (cfrehr@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* Common - A library of common components.
* Copyright © 2024 xpdf.io (cfrehr@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* Common - A library of common components.
* Copyright © 2024 xpdf.io (cfrehr@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* Common - A library of common components.
* Copyright © 2024 xpdf.io (cfrehr@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* Common - A library of common components.
* Copyright © 2024 xpdf.io (cfrehr@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* Common - A library of common components.
* Copyright © 2024 xpdf.io (cfrehr@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* Common - A library of common components.
* Copyright © 2024 xpdf.io (cfrehr@gmail.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* {{ project }}
* Copyright (C) {{ year }} {{ organization }}
* xpdf-api
* Copyright (C) 2024 xpdf.io
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
Loading