I have a console app that has different config settings based on the environment it will be deployed into. I also have separate .json config files for each of these environments. (appsettings.test.json, appsettings.prod.json, etc) How can I do a rename on these files after I do a publish. Right now I just have a bat file that does the rename. Can I somehow integrate it into the publish step?
Related
I want to try netbeans for web development. I created a new local project. I have my remote server files (javascript, php etc) accessible locally on my computer using sftp in linux, now I just want to add these files to the project but there is no 'add files' possibility. Have Oracle forgotten something so obvious as add existing files? I can't believe it.
To add an external file to your NetBeans project:
Select the file in the file system that you want to add to your NetBeans project using a file manager (such as File Explorer on Windows).
Right-click and select Copy from the popup menu.
Within NetBeans go to your project and position the mouse over the target directory to which you want to copy the file. You can do this in the Projects panel or the Files panel as appropriate.
Right-click and select Paste.
That's all there is to it. This works on Linux and Windows. You can also do drag and drop, though on Linux the file is copied whereas on Windows the file is moved.
There is no menu option in NetBeans such as File -> Import existing file to do this. Just use an external file manager.
Update/clarification:
The instructions above only specify how to copy an existing file into an existing project.
There is no way to include an individual file that is external to the structure of a NetBeans project.
However, it is possible to create a symbolic link (junction) from a NetBeans project directory to an external directory. To do that open a Command Prompt window as an administrator and enter a command similar to this:
mklink /J D:\NetBeansProjects\HTML5DemoCss\nbProject\MyLink2 C:\sftp
That will create a new directory in your NetBeans project named MyLink2 which maps to an external directory named c:\sftp. You can then process files in that external directory C:\sftp as though they were within your project directory MyLink.
I'm quite confused as to how to create a deployment in SSIS 2008 that I can use throughout the various sites we are going to deploy to. I'm using the deployment utility to deploy my ETL packages which are file based and executed using a SQL job.
When I rebuild my solution, the deployment files are created along with their configuration files which I bind my connection strings to. I've discovered that each of the packages are still referencing the configuration files in my project folder, rather than the configuration files in the deployment folder. I thought that when I created a deployment, the paths referencing the configuration files would be relative paths.
Ideally, what I would have liked to have been able to do would be to copy the contents of the deployment folder to a flash drive, plug it in at the site I'm deploying to and edit the configuration file per the customer site, execute the deployment manifest file in the folder and expect everything to work. But this doesn't seem to be the case.
I also notice that the SQL job has an option to specify the configuration files for the packages, but this doesn't seem to have an effect either. I must clearly be doing something wrong here, please could someone assist.
Seems like you are encountering these two issues with SSIS deployment and execution:
Configuration file references are stored with absolute paths (meaning the concrete path used in the development environment when the configuration file reference was created, and in production this is the same path that will be used).
Specifying a different configuration file at runtime in SSIS 2008 cannot override values specified at design time (see Understanding How SSIS Package Configurations Are Applied at Run Time).
To deploy your packages with a simple file copy the way you describe, you must change your packages to use a relative reference to your configuration files:
Right click the package file and select View Source to open the XML view of the package source. Search for your configuration file, which will include the path, and remove the path; keeping only the filename portion. Alternatively, change the absolute path to a relative path to the configuration file. Save and close the XML view of the package.
Now when you deploy the package and the configuration file together, ensuring they have the same relative location to each other, the package will find the config file by the relative path, and work the way you expect.
Note: from this point forward you will need to open the BIDS IDE by double-clicking on the project or solution file. If you launch Visual Studio, and then open the project or solution from within the IDE, the IDE will not be able to find the configuration file when you execute the package (the current directory will be Windows\System32, not your package folder).
I have a lot of similar projects created in PHPStorm and I need the same Run/Debug configuration in all my projects. Right now the Run/Debug configuration is empty when I create a new project.
I have tried exporting and importing settings from the file menu but that does not copy the Run/Debug configuration of project A into project B.
Can someone please tell me how to copy the Run/Debug configuration of one project into another?
Run/Debug Configurations are project-specific and therefore cannot be exported/imported via File | Export/Import Settings... which is for IDE-wide settings only.
By default, all Run/Debug configurations are stored in YourProject/.idea/workspace.xml file together with other developer-specific settings.
In order to be able to share (better say -- copy) between the projects:
Make sure that each of such Run/Debug configurations has "Shared" box ticked.
Such shared run configurations will be stored in separate *.xml files in YourProject/.idea/runConfigurations/ folder which you can include in VCS if necessary.
You can copy these files from one project to another (while project is closed in IDE, of course).
Please help me how to deploy war on openshift app.I have put our war file in webapps folder and push code but my war is not deployed.
after this default page will be open on app url.Please help me.
If you would like to deploy pre compiled java applications to your OpenShift gear, but you don't want to waste space by storing them in your git repository, then these directions are for you!
Create an application on OpenShift and select either the Tomcat 6 (JBoss EWS 1.0) or Tomcat 7 (JBoss EWS 2.0) cartridges.
Use the git clone command to download the source code for your application to your computer.
Remove the src directory and the pom.xml file from your application that you cloned to your computer.
DO NOT place your WAR files into the webapps directory.
Next, you need to do a git commit -am "some message here" to make sure that your changes are committed. Lastly, you need to do a git push to deploy your changes to your OpenShift gear.
Now comes the fun part, you need to use SCP or SFTP (with public key authentication of course) to upload your files to the correct location on your gear.
You need to place your WAR files into this folder: app-root/dependencies/jbossews/webapps on your gear.
If you run rhc tail $appname, shortly after the transfer is done you will see entries appear in the logs showing that your WAR file has been deployed and at what context.
The WAR files that you add into the webapps directory will be deployed at a context that matches the name of the WAR file.
For Example:
If you add a file called mywebsite.war, it will be available at app-domain.rhcloud.com/mywebsite. If there is an application that you would like to be available at app-domain.rhcloud.com/ (also known as the root context) then you should name that file ROOT.war.
If you need to replace them, just upload a new copy, or if you want to remove them, just ssh into your server and delete the file you uploaded and it will be un-deployed.
I am using SSIS 2012 to perform a couple basic tasks. The issue I am having occurs in both a Process Execute task and a Flat File connection. When developing the file is local, but I am using an expression to replace the file directory once deployed. I have the files, which are a CSV and a BAT file in the "Miscellaneous" folder.
I would like to be able to reference the relative path of the files rather than an explicit directory on my computer. This would also prevent other developers from having to stage the files locally before being able to even validate the package.
Try using Project Parameter as your folder path.. and use it in your expression Something like
#[$Project::FileLocation] +#[User::FileName]