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

Issues downloading with maven all dependencies #583

Open
doronbehar opened this issue Apr 14, 2024 · 5 comments
Open

Issues downloading with maven all dependencies #583

doronbehar opened this issue Apr 14, 2024 · 5 comments

Comments

@doronbehar
Copy link

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 :)

@torakiki
Copy link
Owner

At first sight I think you need to install gettext on the building machine

@doronbehar
Copy link
Author

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

@doronbehar
Copy link
Author

However, it did help to use -Dmaven.test.skip in the mvn arguments (I saw that in another maven based package in our repository).

@doronbehar
Copy link
Author

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...

@doronbehar
Copy link
Author

Maybe it'd be helpful to apply one of the solutions here. I'll wait for your reply anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants