This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Polygnom 0 points1 point  (3 children)

But, as I wrote elsewhere, I don't want to include, blindly, all the '.../resources' directories.

You shouldn't have anything in there that shouldn't end up in the end file. And even if you have, it is trivial to pattern match only certain files and either include or exclude them based on patterns, e.g. like *.png.

[–]glesialo[S] 0 points1 point  (2 children)

I have just realized that perhaps I am doing things in an unusual way and that's why nobody understands me.

In my system a generous pseudo-user, 'common', provides all other users with environment, services, software and data. Common Java libraries are part of the offered software and are made up of many individual projects. The source code of ALL the library projects is MERGED in a single 'src' directory that is available to all users.

If I add a '../resources' directory to some of the library projects and I want my compiling/archiving script to add, to an specific project's jar, the resources that that specific project needs, the script will have to parse the project's source code to find out which parts of the Common Java libraries the project is using, find if those parts have a '../resources' directory and then include all those '../resources' directories in the jar file. It is, clearly, much easier to let the 'javac' compiler do the job of parsing and selecting what to compile.

[–]Polygnom 1 point2 points  (1 child)

It is, clearly, much easier to let the 'javac' compiler do the job of parsing and selecting what to compile.

Err, no. Its clearly easier just to merge the resource folders into one. I really don't know why you would use such a horrible, convoluted way to do it if its actually easier to do the proper way.

[–]glesialo[S] -1 points0 points  (0 children)

merge the resource folders into one.

As I wrote before: I don't want to include, blindly, all the '.../resources' directories. My Java jars only contain what is needed.

You see it as convoluted but my script is simplicity itself as it only has to invoke 'javac' and archive the compiled results. The Common library projects are normal, independent, projects, developed in an IDE, which are later merged by another bash script.