pdfsam
pdfsam copied to clipboard
Issues downloading with maven all dependencies
Hello!
First of all allow me to thank you for sharing this program, it is wonderful.
On NixOS, we currently distribute this program using the prebuilt debian release file. I'd like to make our distribution build it from source, so that we'd be able to support more systems natively.
Since Nix is a purely functional package manager, it disables network access in the build sandbox. For build systems such as Maven, NPM and Go, we use build hooks that allow us to prefetch all dependencies of a project (with internet access available). It works for many Maven based projects we build on our distribution. We basically run this command:
mvn package -Dmaven.repo.local=$PATH_TO_LOCAL_REPO/.m2
Here is the full log of the offline repo generation attempt:
https://gist.github.com/doronbehar/cf3f5699847a48d3bce826dea33fcf8d
I also tried to delete that Hebrew related plugin, using:
diff --git i/pdfsam-i18n/pom.xml w/pdfsam-i18n/pom.xml
index 01b5007b..4dc44324 100644
--- i/pdfsam-i18n/pom.xml
+++ w/pdfsam-i18n/pom.xml
@@ -46,24 +46,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>rename-hebrew-properties</id>
- <phase>process-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <move file="${project.build.outputDirectory}/org/pdfsam/i18n/Messages_iw.properties" tofile="${project.build.outputDirectory}/org/pdfsam/i18n/Messages_he.properties" />
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
And it created a different error...
P.S Ironically, Hebrew is my native language :)
At first sight I think you need to install gettext on the building machine
Thanks! It did seem to help that step, but I encountered other errors afterwards:
Here is the full log (failing tests so it seems):
https://gist.github.com/doronbehar/f61cfe291b5f4a85e2f5b489e069bbe2
However, it did help to use -Dmaven.test.skip in the mvn arguments (I saw that in another maven based package in our repository).
Also since I'm not experienced with mvn, I'm having trouble figuring out how to create the lib directory that includes all of the required jars. I ran a few standard CLI tools to find out that some jars dependencies originate in .m2, and some originate in the pdfsam-* directories...
Maybe it'd be helpful to apply one of the solutions here. I'll wait for your reply anyway.