Skip to content

Commit 1410ebb

Browse files
committed
Fix relative paths
1 parent 2f23b4e commit 1410ebb

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

nmcp-tasks/src/main/kotlin/nmcp/internal/task/nmcpPublishFileByFileToMavenLocal.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ internal fun nmcpPublishFileByFileToFileSystem(
2323
logger.info("Nmcp: copying files to $m2AbsolutePath")
2424

2525
File(m2AbsolutePath).mkdirs()
26-
publishFileByFile(FilesystemTransport(m2AbsolutePath), inputFiles, parallelism)
26+
publishFileByFile(FilesystemTransport(m2AbsolutePath, logger), inputFiles, parallelism)
2727
}

nmcp-tasks/src/main/kotlin/nmcp/transport/transport.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,10 @@ fun Content.toRequestBody(): RequestBody {
166166

167167
internal class FilesystemTransport(
168168
private val basePath: String,
169+
private val logger: GLogger,
169170
) : Transport {
170171
override fun get(path: String): BufferedSource? {
172+
logger.info("Nmcp: read '$path'")
171173
val file = File(basePath).resolve(path)
172174
if (!file.exists()) {
173175
return null
@@ -176,6 +178,7 @@ internal class FilesystemTransport(
176178
}
177179

178180
override fun put(path: String, body: Content) {
181+
logger.info("Nmcp: write '$path'")
179182
File(basePath).resolve(path).apply {
180183
parentFile.mkdirs()
181184
sink().buffer().use {

nmcp/src/main/kotlin/nmcp/internal/DefaultNmcpAggregationExtension.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ internal abstract class DefaultNmcpAggregationExtension(private val project: Pro
6060
project.registerNmcpPublishFileByFileToFileSystemTask(
6161
taskName = "nmcpPublishAggregationTo${options.name.get().capitalizeFirstLetter()}Repository",
6262
inputFiles = allFiles,
63-
m2AbsolutePath = project.provider { File(options.path.get()).absolutePath },
63+
m2AbsolutePath = project.provider { project.file(options.path.get()).absolutePath },
6464
parallelism = project.provider { 1 },
6565
)
6666
}
67-
67+
6868
@Deprecated("Use the settings plugin or a convention plugin instead")
6969
override fun publishAllProjectsProbablyBreakingProjectIsolation() {
7070
check(project === project.rootProject) {

0 commit comments

Comments
 (0)