EO Build Process: Placed Catalog
As described in this blog post
place
step of EO build process copies compiled files from dependencies’ JARs
into target/classes
folder to have them in classpath during compilation later.
You can check PlaceMojo
class for exact logic of this step.
All copied files are registered within “placed catalog,” which is normally stored as
target/eo/placed.csv
file.
Let’s consider structure of the catalog in more details.
Each entry within the catalog corresponds to a single file that has been copied.
There are two kinds of entries. Entries of kind class
corresponds to a file within JAR.
It can be .class
or .xml
or any other type of file which needs to be within classpath
during compilation.
Another kind, jar
, represents dependency JAR file whose content has been copied.
Placed catalog stores the following attributes for each entry:
-
id
: Forclass
-kind it is absolute path to a copied file in target location. Forjar
-kind it is a JAR dependency reference constructed from Maven artifacts (e.g.org.eolang/eo-strings/-/0.0.4
). -
related
: Forclass
-kind relative path to a file within classpath. Empty forjar
kind. -
dependency
: Forclass
-kind dependency which the file was extracted from. Empty forjar
kind. -
kind
: Type of the entry (see description above). -
hash
: Forclass
-kind stores MD5 hash of the file content. Empty forjar
kind. -
unplaced
: Containstrue
if the file was removed duringunplace
step (seeUnplaceMojo
). Otherwise, it is set tofalse
.
The information from “placed catalog” can be useful when investigating “Class not found”-like issues during compilation. It can show what was added/removed from build’s classpath. It also shows the origins of classes.