Skip to content

Commit 7899d8e

Browse files
authored
docs: add instructions on using repo finder (#350)
Signed-off-by: Ben Selwyn-Smith <[email protected]>
1 parent 2062e7e commit 7899d8e

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

docs/source/pages/cli_usage/action_dump_defaults.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.. Copyright (c) 2023 - 2023, Oracle and/or its affiliates. All rights reserved.
22
.. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/.
33
4+
.. _action_dump_defaults:
5+
46
=============
57
Dump Defaults
68
=============

docs/source/pages/using.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,43 @@ With the example above, the generated output reports can be seen here:
110110
- `micronaut-core.html <../_static/examples/micronaut-projects/micronaut-core/analyze_with_sbom/micronaut-core.html>`__
111111
- `micronaut-core.json <../_static/examples/micronaut-projects/micronaut-core/analyze_with_sbom/micronaut-core.json>`__
112112

113+
'''''''''''''''''''''''''''
114+
Analyzing more dependencies
115+
'''''''''''''''''''''''''''
116+
117+
In some cases the dependencies that Macaron discovers lack a direct connection to a repository for it to analyze. To improve results in these instances, the Repository Finding feature can be enabled. This feature makes use of a dependency's identifying information that can be found using the package registries located on the Internet.
118+
119+
.. note:: The Repository Finding feature currently only works for Java projects via SCM meta data found within artifact POM files.
120+
121+
This feature is enabled by default. To disable, or configure its behaviour in other ways, a custom ``defaults.ini`` should be passed to Macaron during execution.
122+
123+
See :ref:`dump-defaults <action_dump_defaults>`, the CLI command to dump the default configurations in ``defaults.ini``. After making changes, see :ref:`analyze <analyze-action-cli>` CLI command for the option to pass the modified ``defaults.ini`` file.
124+
125+
Within the configuration file under the ``repofinder.java`` header, five options exist: ``find_repos``, ``artifact_repositories``, ``repo_pom_paths``, ``find_parents``, ``artifact_ignore_list``. These options behave as follows:
126+
127+
- ``find_repos`` (Values: True or False) - Enables or disables the Repository Finding feature.
128+
- ``artifact_repositories`` (Values: List of URLs) - Determines the remote artifact repositories to attempt to retrieve dependency information from.
129+
- ``repo_pom_paths`` (Values: List of POM tags) - Determines where to search for repository information in the POM files. E.g. scm.url.
130+
- ``find_parents`` (Values: True or False) - When enabled, the Repository Finding feature will also search for repository URLs in parents POM files of the current dependency.
131+
- ``artifact_ignore_list`` (Values: List of GAs) - The Repository Finding feature will skip any artifact in this list. Format is "GroupId":"ArtifactId". E.g. org.apache.maven:maven
132+
133+
.. note:: Finding repositories requires at least one remote call, adding some additional overhead to an analysis run.
134+
135+
An example configuration file for utilising this feature:
136+
137+
.. code-block:: ini
138+
139+
[repofinder.java]
140+
find_repos = True
141+
artifact_repositories = https://repo.maven.apache.org/maven2
142+
repo_pom_paths =
143+
scm.url
144+
scm.connection
145+
scm.developerConnection
146+
find_parents = True
147+
artifact_ignore_list =
148+
org.apache.maven:maven
149+
113150
-------------------------------------
114151
Analyzing a locally cloned repository
115152
-------------------------------------

0 commit comments

Comments
 (0)