Skip to content

Tracking Eclipse .classpath changes - #146

Merged
smehrbrodt merged 1 commit into
LibreOffice:masterfrom
prrvchr:build.xml.tpl
Feb 13, 2025
Merged

Tracking Eclipse .classpath changes#146
smehrbrodt merged 1 commit into
LibreOffice:masterfrom
prrvchr:build.xml.tpl

Conversation

@prrvchr

@prrvchr prrvchr commented Feb 12, 2025

Copy link
Copy Markdown
Contributor

In order to improve the integration of Ant and javac now changes to the Eclipse .classpath file will produce an update to the build.properties file. This file has a new property uno.java.classpath that allows to provide javac with all the necessary dependencies when compiling.

If in Eclipse a sibling project is declared as a dependency then either its jar archive (if it was produced by a Build.jardesc file) or its bin folder (the folder where Eclipse puts the .class files) will be available in the uno.java.classpath property of the build.properties file.

This allows us to have compilations with javac (ie: Ant) that work just as well as compilation by Eclipse's internal compiler.

Concerning the Java jar archives to be put in the MANIFEST.MF Class-Path of a UNO Java project, there are two ways to do it:

  • Either create a lib or libs folder at the root of the UNO project. In this case all archives put in this folder are put in the Class-Path of the MANIFEST.MF.
  • In the absence of a lib or libs folder, all archives local to the project and declared in the Eclipse build path will be put in the Class-Path of the MANIFEST.MF.

In addition to these changes who solves issue #144, I took the opportunity to correct issue #145.

@prrvchr

prrvchr commented Feb 13, 2025

Copy link
Copy Markdown
Contributor Author

The dependency paths recorded in the uno.java.classpath property of the build.properties file are recorded with paths relative to the Eclipse workspace, this makes this property independent of the exact location of the workspace.

@smehrbrodt

Copy link
Copy Markdown
Contributor

Thanks - but to keep things simple and comprehensible: Can you please do one fix per PR?
So the fix for #145 should be a separate PR.
Also the formatting changes should be a separate PR.
That makes reviewing things easier, and also keeps the git history clean.

You can have multiple local git branches for each problem, and submit a PR for each branch.

@prrvchr

prrvchr commented Feb 13, 2025

Copy link
Copy Markdown
Contributor Author

Hi Samuel, ok I'll do it like this next time, sorry about that one...

@smehrbrodt

Copy link
Copy Markdown
Contributor

Ok I extracted the fix for #145 and will merge the rest now.

@smehrbrodt
smehrbrodt merged commit a3ce0b6 into LibreOffice:master Feb 13, 2025
@prrvchr
prrvchr deleted the build.xml.tpl branch February 15, 2025 13:13
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

Successfully merging this pull request may close these issues.

2 participants