redhat-developer / vscode-rsp-ui

A unified UI for all RSP servers and RSP server-providers to integrate with
Eclipse Public License 2.0
38 stars 21 forks source link

Is it possible use in rsp.assembly.json files outside of deployment path? #295

Open jgajdos opened 8 months ago

jgajdos commented 8 months ago

Example: Structure project is: C:/project/demo/base - its maven module C:/project/demo/feature1 - its maven module C:/project/demo/feature2 - its maven module C:/project/demo/server1 - its war - use base and feature1 module C:/project/demo/server2 - its war - use base and feature2 module

So i make two deployments path, because i want to run both war at same time, they communicate: C:/project/demo/server1 C:/project/demo/server2

I want to use rsp.assembly.json which files to deploy. But i cannot copy files, for example from C:/project/demo/base module I try use syntax ../base/files but it throws exception: ERROR o.j.t.r.s.s.p.AbstractFilesystemPublishController:289 - Error publishing module C:\project\demo\server1 to server Tomcat 7.0: error copying mapping C:\project\demo\server1..\base\files to c:\tomcat\webapps\server1\files

Content of rsp.assembly.json: { "mappings": [ { "source-path": "../base/files/", "deploy-path": "/files/" } ] }

Is this possible, to copy files from other modules outside of deployment path?

Thank you

robstryker commented 8 months ago

Sorry. I was on holiday break. I'll look into the limitations here. Could be a simple bug or could be an actual intentional limitation.

robstryker commented 8 months ago

So I've tested this on linux and it seems to work fine? This could be a windows bug, I suppose.

        {
            "source-path": "../rob-hello-resources/",
            "deploy-path": "/"
        }
robstryker commented 8 months ago

I just tested this on windows using both a wildfly server and a tomcat server, and it seems like it works? I was admittedly testing using a CLI version of the tool, but it really shouldn't make much of a difference because I tested various different scenarios.

It's clear by your error message that a trailing slash is missing before the "../" (not in your assembly file, but in the file it's attempting to copy). But I can't get the code to make such a mistake, and I've tried many times already.

Very strange behavior for sure.

robstryker commented 8 months ago

Sorry didn't mean to post that yet. Do you know what version of the tools you're using? Is there any other info about your environment you can share?

Can you 'edit' the tomcat server in the rsp-ui and paste the contents here?