Maven war plugin copy resource actually copying the file instead of symLinks - maven

In my web app folder, i have created symLinks for some of the files and folders. When I use mvn war:war plugin they are actually copying the files and folders instead of symlink.
I want symLinks should be copied instead of actual files and folders. Is there any way by which we can achieve the same.

Related

Azure release pipeline to extract files from Artifact folder and copy to a target folder

Copy files from artifacts to a folder
I am using Azure Devops Deployment group job to copy some files to the server
The 2 steps I am following are 1. Stop a Windows service using Powershell and looks OK
Then using CopyFiles task to copy the files from the Artifacts location
The artifcat is a zip file and the location is mapped correctly
I have to unzip the contents of the zip file and move to the target folder
Or move the zip file to the target folder and unzip the file contents after its copied
But the CopyFiles task is not copying any files [ I tried various combinations in Contents property to include zip extension etc but no luck]
Is any of the steps are missing or i am doing wrong? The screen shot of PIpeline is like below
Based on your requirement, you need to unzip the contents of the zip file and copy files.
I suggest that you can use Extract files to unzip the zip file.
In Copy files task, you don't need to specify a specific zip file in the source folder. You just need to specify the folder path where the files are located.
Here is an example: $(system.defaultworkingdirectory)/_Data Cloud Service Live/service

Maven: how to copy a directory cleanly before creating the JAR?

I want to store some additional files in the JAR that gets created. Those files are in a directory that is a subdirectory of a repository which is pulled in via a git submodule.
I want to copy that submodule to my src resources directory before compiling, but I also want to make sure that any old files at that location are removed first.
How can that be achieved best with Maven plugins? I did not find any option to remove any destination files with the copy-resources goal of the maven-resources-plugin and I could not get the maven-clean-plugin to run right before the copy-resources either. So how does one accomplish such a trivial task with Maven?
UPDATE: as mentioned above, the reason why I want to do this is because what is copied should become part of what gets added to the resulting jar (and could potentially be part of what gets compiled). So I need to copy these files into the src directory and NOT the target directory. What should get copied before each build is the input to the build, not an additional output.
There is one flaw in your approach, and it probably explains most of the obstructions you encountered.
During a build, the only directory in which you may write is target. Copying files to src or changing them is strictly discouraged.
The target folder is erased by clean, so no need to tidy up yourself or to manage old files.

Maven Build - copy resource from a directory to another directory

I have a project structure like:
Web Pages
|
|----WEB-INF
|----js
|----css
|----dist
|----other files
I want to remove all the files and folders except the WEB-INF folder and also copy the contents from dist folder directly into the Web Pages and then remove the dist folder as well during the build process.
I have tried maven-war-plugin but I am not able to do it.

Gradle files not recognised in new directory structure?

Previously we made a Gradle project in Intellij and all the gradle files were there under the project. However, we have now moved the files in this project to a sub folder, but the Gradle files aren't being recognised. The picture below is the new folder set up where our code from the original project is now in the server folder (where the Gradle files are). When I mark the src folder (under server) as the Sources Root, that is when the dependencies from Gradle aren't recognised.
I figured out that the correct way to go is actually to separate out the client/server folder into two separate modules.

Copy new (changed) files into repository

I have a magento project that I'm managing under subversion version control.
I want to install a module that I downloaded which modifies some core files that are already under svn.
When I copy the new files over the existing managed ones, the repo becomes 'obstructed':
svn: Directory '/foo/app/.svn' containing working copy admin area is missing
What's the proper way to manage bringing in code from outside the repo?
Just make sure not to delete any .svn directory when you copy the new files into your working copy (unless of course you want to delete the repository containing this .svn directory). A simple way to do that is to keep all the directories as is, and only delete and update files.
Alternatively, use SVN 1.7, which uses a single .svn directory at the root of the project instead of a .svn directory in every directory of the project.

Resources