This message was deleted.
# community-support
s
This message was deleted.
v
What do you mean by
module.json
? Gradle Module Metadata file? If yes, it's the same as with
pom.xml
. Latter is in the end
artifact-version.pom
, former
artifact-version.module
. All projects deployed with a new enough Gradle version have them on Maven Central.
a
yeah sorry, I'm not using maven-publish to do the actual publish
because i need to sign using another machine
gotcha I can work with
artifact-version.module
v
Maybe just publish to a local directory then, then you have the files exaclty like you need them?
a
ah I was doing a custom copy task to avoid the deep directory structure
and extracting files from the publication
v
Just have the publish task that publishes to a local directory and then a copy task that copies from there and flattens out the files
Well, do it like you want, just I would do it like that, because then I know the publish plugin did its work, whatever that may be.
Without the need to manually replicate the work
a
right
I guess just a followup, what's the right way to query the output directory of the specific local publish task (without reconstructing it manually)?
It seems to also generate the maven-metadata.xml at the parent level
v
If you define a local repository, you also define the path, so you should know it. And yes, it generates the proper Maven repo metadata file, just exclude that from your copy task.
a
oh just flatten from the root and exclude
gotcha
d
I believe it should be possible to publish to flat dir repository directly without needing extra copy task: https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver
j
You don’t need a flat dir repo. Just user a normal maven repo with a folder path as URL. E.g.:
Copy code
publishing {
  repositories.maven("../local-folder-repo")
}
And because the question was about an example of a module file on Central: https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.13.3/