Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support nexus group and improvements #9

Closed
wants to merge 5 commits into from

Conversation

ieugen
Copy link

@ieugen ieugen commented Oct 26, 2017

  • nexus 3.6 version upgrade
  • build file cleanup
  • using reckon for version inferrence from git
  • upgraded karaf plugin version (funny thing: I was involved a bit with that karaf plugin as well :) )
  • fixes Plugin does not work with groups #8
  • added support for extension and classifier on version endpoint
  • added unit tests for path building

Bucket bucket = tx.findBucket(repository);
log.debug("rundeck download bucket: {}", bucket);

if (null == bucket) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if null, you should continue, found next repository

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what you are asking, please be more explicit.
I also did not look at the code, I just copy pasted and build it. I assumed you checked.

p.s. Downloading content does not work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂 Sorry
I just paste a sample code yesterday.
The key code is

        if (repository.getType() instanceof GroupType) {
            GroupFacet facet = repository.facet(GroupFacet.class);
            return facet.leafMembers();
        }

You need test it.

Copy link
Author

@ieugen ieugen Oct 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just paste a sample code yesterday.
Does this mean I have to go back to original file in git and just change the code snippet from up?

I will test it once I know what code version is ok.

Is there an easier way to doploy a new version?
I tried putting the plugin in deploy folder but it did not pick it up.
The manual way of doing install means that I have to copy files and change some test files. It should be easier than this with karaf.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some tests for version part. Download still doesn't work but it's not really needed since it's easy to build the url from GAV and download with curl:

curl -v -u user_name:password https://nexus.example.scom/repository/my-repo-name/group-id/artifact-id/3.7.3/artifact-id-3.7.3.tar.gz --output artifact-id.tar.gz

String path = groupId.replace(".", "/") + "/" + artifactId + "/" + version + "/" + artifactId + "-" + version + ".jar";
Asset asset = tx.findAssetWithProperty("name", path, bucket);
log.debug("rundeck download asset: {}", asset);
if (null == asset) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Ioan Eugen Stan added 2 commits November 1, 2017 23:27
@Maraumax
Copy link

I tried this PR but i always got errors on nexus 3.14 :

  • blank page on content
  • empty array on version

Any idea ?

@chenz4027
Copy link

I tried this PR but i always got errors on nexus 3.14 :

  • blank page on content
  • empty array on version

Any idea ?

I had the same problem for the first one.
For the second one you need to give all-repo read permission to annoynmous users.

@ieugen ieugen closed this Jul 24, 2020
@ieugen ieugen deleted the maven-group branch July 24, 2020 20:25
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.

Plugin does not work with groups
4 participants