Project

Profile

Help

Maven Plugin » History » Sprint/Milestone 2

bmbouter, 01/30/2018 11:28 AM
Adding in all notes from https://pulp.plan.io/issues/854

1 1 bmbouter
# Maven Plugin
2
3
I think this should actually be a maven plugin, since it needs to download both jar files and pom files which are maven artifacts. With each, there is a sha and md5 signature.
4
5
uniqueness : group_id + artifact_id + version (maybe, the hash???)  
6
types per unit : 1 pom, many jars. 2 sigs per item  
7
attriubtes : updated date (datetime)
8
9
clients: maven  
10
maybe https://pypi.python.org/pypi/jip
11
12 2 bmbouter
### Content
13 1 bmbouter
14
  - Root discovery uses the architype-catalog.xml file  
15
    https://maven.repository.redhat.com/ga/archetype-catalog.xml
16
  - Each archtype has a version metadata  
17
    https://maven.repository.redhat.com/ga/org/apache/ant/ant/maven-metadata.xml
18
19 2 bmbouter
### Discovery
20 1 bmbouter
21
  - It may be nice to have pulling down deps.
22
  - If not, you mirror everything
23
  - Or pull down a single item
24 2 bmbouter
25
# Notes from https://pulp.plan.io/issues/854
26
27
Create an initial framework for supporting syncing & publishing [Maven](https://maven.apache.org/what-is-maven.html) artifacts from within Pulp. This issue is an ok place for planning and gathering comments and information, but that should be broken up into smaller stories if/when implemented.
28
29
## Deliverables
30
31
  - A plugin module for maven artifacts
32
      - The plugin supports creating maven repositories
33
      - As a user, I can provide a URL, and possibly some additional information about how to discover specific content, that Pulp will use to sync a remote repository.
34
      - The plugin supports deleting maven repositories
35
      - As a user syncing from a remote Pulp, I only need to provide a URL to sync. Additional information about how to discover content should not be necessary.
36
      - The plugin supports uploading of maven modules to a repository
37
      - The plugin DOES NOT support lazy loading or syncing content from maven central
38
  - CLI support for creating maven repositories
39
  - CLI support for deleting maven repositories
40
  - CLI support for uploading a maven artifact
41
  - CLI support for deleting a maven artifact
42
43
## Questions
44
45
### archetype-catalog.xml
46
47
Some maven repositories appear to have an index of content named [archetype-catalog.xml](https://repository.jboss.org/nexus/content/repositories/releases/archetype-catalog.xml), and some [do not](http://jcenter.bintray.com/). What are the expectations around that file? When is/should it be present?
48
49
When Pulp does a sync, if that catalog is not present, we will need some other way for a user to specify what content to get. Should they provide a pom.xml file to the importer? Or perhaps csv/json that enumerates the content to get?
50
51
When Pulp does a publish, is it always safe for it to create an archetype-catalog.xml file? It is handy to have so that other Pulp deployments can sync from it and duplicate the exact same content.
52
53
### SNAPSHOT
54
55
Should Pulp support "snapshot" repositories?
56
57
https://blog.packagecloud.io/eng/2017/03/09/how-does-a-maven-repository-work/#snapshot-repositories
58
59
The challenge is that the content with a given unique identifier that includes "-SNAPSHOT" can change from one sync to the next, and there's no way to know if it did. So it would need to be downloaded every time. We would also have to accept that if the content had been promoted into an additional repository, it could get updated in-place without another promote operation.
60
61
### Upload
62
63
Is there a use case for upload? What does that look like? In what format would data get uploaded?
64
65
## References
66
67
  - https://blog.packagecloud.io/eng/2017/03/09/how-does-a-maven-repository-work/
68
69
## Repo in the sky
70
71
It may be worth looking at http://artificer.jboss.org/ just to see if there's any opportunity to integrate with that.