Skip to content

Commit d56c8e5

Browse files
authoredMay 14, 2024
Merge pull request #68 from boozallen/65-project-specific-pypi-repo
#65 ✨ add innate support for downstream projects using a dif…
2 parents 0bd0783 + b448488 commit d56c8e5

File tree

4 files changed

+63
-3
lines changed

4 files changed

+63
-3
lines changed
 

‎DRAFT_RELEASE_NOTES.md

+32
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ The [Maven Build Cache](https://maven.apache.org/extensions/maven-build-cache-ex
6464
Note instructions for adapting to these changes are outlined in the upgrade instructions below.
6565
* The maven property `version.clean.plugin` was changed to `version.maven.clean.plugin` causing the `*-deploy/pom.xml`
6666
to be invalid
67+
* If you were using a private PyPI repository in a prior release, the upgrade instructions below contain a small change
68+
that must be made to continue using that repository.
6769

6870
## DataLineage and ModelLineage Event Changes
6971
To associate the pipeline step's lineage event with the pipeline's, we have created a pipeline level lineage event, and a way
@@ -167,6 +169,36 @@ for publishing and retrieving releases and snapshots. Adjust for your project as
167169
</properties>
168170
```
169171

172+
### Update Habushu to Point to Your Private PyPI Repository
173+
Add the following `property` and `plugin` into your project's root `pom.xml` file with the appropriate PyPI repository URL (Nexus is used
174+
in this example - adjust for your project, as appropriate):
175+
```xml
176+
<properties>
177+
...
178+
<pypi.project.repository.url>https://nexus.yourdomain/repository/your-pypi-repo-name/</pypi.project.repository.url>
179+
</properties>
180+
...
181+
<build>
182+
<pluginManagement>
183+
<plugins>
184+
...
185+
<plugin>
186+
<groupId>org.technologybrewery.habushu</groupId>
187+
<artifactId>habushu-maven-plugin</artifactId>
188+
<configuration>
189+
<!--
190+
Ensure you have configured credentials for this repo, as explained in the following link:
191+
https://github.com/TechnologyBrewery/habushu?tab=readme-ov-file#pypirepoid
192+
-->
193+
<pypiRepoUrl>${pypi.project.repository.url}</pypiRepoUrl>
194+
</configuration>
195+
</plugin>
196+
</plugins>
197+
</pluginManagement>
198+
</build>
199+
200+
```
201+
170202
## Conditional Steps
171203

172204
### Upgrade Steps for Projects Leveraging Data Lineage

‎docs/modules/ROOT/pages/archetype.adoc

+27-3
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,25 @@ mvn archetype:generate \
3636
--
3737
endif::[]
3838

39-
This command will trigger an interactive questionnaire giving you the opportunity to enter the following information contained in the below table.
39+
This command will trigger an interactive questionnaire giving you the opportunity to enter the following information
40+
contained in the below table.
4041

4142
* This information can also be provided without interaction by including ``-D<propertyName>=<propertyValue>`` for each
4243
property you want to manually set when running the ``mvn archetype:generate`` command.
4344
* Some of the information required (such as ``archetypeVersion``) is unavailable in interactive mode. For these
4445
properties, you can use the above Maven command to include them.
4546

4647
.Archetype Options
47-
[cols="1a,2a,3a,2a,5a"]
48+
[cols="2a,3a,3a,2a,1a"]
4849
|===
4950
| Value | Description | Guidance | Example(s) | Interactive
5051

5152
| ``archetypeVersion``
5253
| Use an archetype from a specific aiSSEMBLE release
5354
|
54-
Typically, developers should target the most recently released archetype. In appropriate circumstances, it is possible to target a pre-release https://maven.apache.org/guides/getting-started/index.html#what-is-a-snapshot-version[snapshot version,role=external,window=_blank] by using the -SNAPSHOT suffix.
55+
Typically, developers should target the most recently released archetype. In appropriate circumstances, it is possible
56+
to target a pre-release https://maven.apache.org/guides/getting-started/index.html#what-is-a-snapshot-version[snapshot
57+
version,role=external,window=_blank] by using the -SNAPSHOT suffix.
5558

5659
|
5760
* 0.11.0
@@ -157,6 +160,27 @@ easily and automatically follow this Snapshot pattern as well (where ``-SNAPSHOT
157160

158161
| No
159162

163+
| `pypiProjectRepositoryUrl`
164+
| The name of the custom PyPI repository to use for this project.
165+
| Should be used if you have Python modules and intend to publish your project's PyPI artifacts to a private repository,
166+
such as Nexus or Artifactory. If you plan to use the public https://pypi.org repository, you can explicitly set that
167+
here as well.
168+
169+
Please see https://github.com/TechnologyBrewery/habushu?tab=readme-ov-file#pypirepoid[Habushu's documentation on
170+
repository URLs,role=external,window=_blank], including how to leverage `settings.xml` to pass in credentials
171+
for these repositories. These instructions also cover URL configuration for specific PyPI repository types (e.g.,
172+
upload and download url specialization) as well as how to also configure a separate release and development PyPI URL,
173+
if desired.
174+
175+
If not specified, this will default to `https://pypi-PLACEHOLDER/repository/` and will need to be updated in your root
176+
`pom.xml` file prior to pushing your first PyPI artifacts to a repository.
177+
|
178+
* `https://nexus.mydomain.com/repository/x-pypi`
179+
* `https://artifactory.mydomain.com/repository/y-pypi`
180+
* `https://pypi.org`
181+
182+
| No
183+
160184
|===
161185

162186
Once you enter these values, the archetype will ask you to confirm your entries. You now have a Maven project in which

‎foundation/foundation-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
<requiredProperty key="mavenSnapshotRepositoryUrl">
4343
<defaultValue>https://snapshot-PLACEHOLDER/repository/maven-snapshots</defaultValue>
4444
</requiredProperty>
45+
<requiredProperty key="pypiProjectRepositoryUrl">
46+
<defaultValue>https://pypi-PLACEHOLDER/repository/</defaultValue>
47+
</requiredProperty>
4548
</requiredProperties>
4649

4750
<fileSets>

‎foundation/foundation-archetype/src/main/resources/archetype-resources/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<maven.repo.url>${mavenRepositoryUrl}</maven.repo.url>
4141
<maven.snapshot.repo.id>maven-snapshots</maven.snapshot.repo.id>
4242
<maven.snapshot.repo.url>${mavenSnapshotRepositoryUrl}</maven.snapshot.repo.url>
43+
<pypi.project.repository.url>${pypiProjectRepositoryUrl}</pypi.project.repository.url>
4344
</properties>
4445

4546
<dependencyManagement>

0 commit comments

Comments
 (0)