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

Creating a maven proxy repository returns 404 #28

Closed
c4rlier opened this issue May 6, 2020 · 14 comments
Closed

Creating a maven proxy repository returns 404 #28

c4rlier opened this issue May 6, 2020 · 14 comments
Assignees
Labels
enhancement New feature or request

Comments

@c4rlier
Copy link

c4rlier commented May 6, 2020

Hi,

Trying to create a maven proxy repository returns a 404. I tried to create multiple different maven proxy repositories, but all of them return 404. Below is one example.

resource "nexus_repository" "repo1_proxy" {
  name   = "repo1-proxy"
  format = "maven2"
  type   = "proxy"

  maven {
    version_policy = "RELEASE"
    layout_policy = "STRICT"
  }

  negative_cache {
    enabled = true
    ttl     = 1440
  }

  proxy {
    remote_url  = "https://repo1.maven.org/maven2"
  }

  storage {
    blob_store_name                = nexus_blobstore.s3.name
    strict_content_type_validation = true
  }
}
@Nosmoht Nosmoht added the bug Something isn't working label May 7, 2020
@Nosmoht
Copy link
Contributor

Nosmoht commented May 7, 2020

Hi @c4rlier ,

we already identified the issue and will fix it soon.

@Nosmoht
Copy link
Contributor

Nosmoht commented May 13, 2020

Hi @c4rlier ,

that was an issue within the used go-nexus-client library that is fixed in https://github.com/datadrivers/go-nexus-client/releases/tag/v0.8.2. We will release a new Terraform provider soon, using the new client library. That should fix the issue.

@Nosmoht
Copy link
Contributor

Nosmoht commented May 13, 2020

@Michenux
Copy link

I'm using version 1.6.1 and it is not fixed.

Error: could not create repository 'my-mvn-group': HTTP: 404, 

  on nexus.tf line 56, in resource "nexus_repository" "maven_group":
  56: resource "nexus_repository" "maven_group" {

terraform providers

.
├── provider.aws >= 2.60.0
└── provider.nexus >= 1.6.0

@ruedigerblock
Copy link
Member

Moin @Michenux,
may I ask for the corresponding TF code, thus I can compare ?

@Michenux
Copy link

Yes

resource "nexus_repository" "maven_group" {
  name   = "${var.project_name}-mvn-group"
  format = "maven2"
  type   = "group"
  online = true

  group {
    member_names = [nexus_repository.maven_hosted.name, "maven-public"]
  }

  storage {
    blob_store_name                = nexus_blobstore.aws.name
    strict_content_type_validation = true
  }
}

In fact, there is no endpoint in API to create a maven group.
It is fixed in Nexus 3.24, but not yet released.
https://issues.sonatype.org/browse/NEXUS-23080

@ruedigerblock
Copy link
Member

ruedigerblock commented May 25, 2020

I see it now. Thus, we'll have to wait for 3.24 to come out. :-(

@Michenux
Copy link

Michenux commented Jun 9, 2020

@Nosmoht
Copy link
Contributor

Nosmoht commented Jun 9, 2020

Hi @Michenux ,

thanks for the information. I'll start with the implementation.

@Nosmoht
Copy link
Contributor

Nosmoht commented Jun 9, 2020

Hi @Michenux ,

i've just tested with provider v1.7.0 and it works already. So please use this version.

@fog1985
Copy link

fog1985 commented Jun 9, 2020

Cool. I have just faced this issue as well. I needed to create maven groups. And could not find them implemented. Now I see that it's up to Nexus API. It has not been implemented at all.

@Nosmoht
Copy link
Contributor

Nosmoht commented Jun 9, 2020

It's implemented in Nexus 3.24.0 and supported by provider v1.7.0

@Nosmoht Nosmoht added enhancement New feature or request and removed bug Something isn't working labels Jun 9, 2020
@android-leha
Copy link
Contributor

Probably this can be closed

@Michenux
Copy link

Yes, you can.
Thanks for your work 👍

@Nosmoht Nosmoht closed this as completed Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants