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

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

Open
jgajdos opened this issue Dec 31, 2023 · 4 comments
Open

Comments

@jgajdos
Copy link

jgajdos commented Dec 31, 2023

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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?

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

No branches or pull requests

2 participants