Change WAR directory in Eclipse - war

I am using the google-plugin-eclipse add-on and the latest gcloud code. I have the Java version installed. On the old plugin you could change the war directory but on the new one I cannot. I am using Grunt and Bower and inject several dependancies. In the past I had a "dev" directory that I would use grunt build on to minimize the number of files and the files themselves into the "war" directory. While developing locally - I would change the eclipse settings to use the "dev" directory and then before publish I would build and test the war directory and publish from there. Screenshots below of old and new plugin settings. Any ideas how to change so I don't have to play a folder rename game?
Old Plugin Settings Image
New Plugin Settings Image

The new Cloud Tools for Eclipse (CT4E) is based on the Eclipse Web Tools Project (WTP). WTP uses a set of rules called the deployment assembly to assemble a set of source files and directories into a WAR. WTP provides a project properties page for changing the deployment assembly rules. You can have multiple source directories combined into the same location.
So you can adjust your project's deployment assembly to add your war directory and have its contents to be deployed into the WAR root.

Related

.Net Core 3.0 NuGet DLLs

Let's say that we include Nuget Package Microsoft.Extensions.Configuration in a Console .Net Core app, and include the same package in another Console .Net Core app.
When we publish these two apps, each app would publish:
Microsoft.Extensions.Configuration.Abstractions.dll
Microsoft.Extensions.Configuration.dll
in each folder.
If we had 10 console apps using the same package, we would have these dlls in 10 different folders in the application server. If we reference to multiple NuGet packages, the number of dependency dll files would multiply.
Is there a way to consolidate these dlls in one folder in the app server, so when we publish our executable, all we need to do is move the executable and configuration file to the server, and it will find these dlls in a common folder. Sort of setting a dll Path.
In consideration of Trisped's suggestion, I am posting an answer that neither me nor my boss are completely satisfied with. But for the time being to the best of my knowledge, the way to consolidate these DLLs is by writing a utility program to move those DLLs to a designated common DLL folder. And, at the same time update both .deps.json file and .runtimeconfig.json file with the new location path of the common DLL folder and additionalProbingPaths folder path structure, respectively.
We can't do this by hand manually because there would be too many DLLs to move and too tedious to edit .deps.json file, which got wiped out everytime we publish the Console App solution. I have written the utility program. Unfortunately this is company's IP so I can't share the code.
The idea is to enumerate the DLLs in the publish folder and store those filenames in a collection / dictionary, and later on use that dictionary to update the runtime dll paths in .deps.json. For CLI use, I use these options:
-c Release -f netcoreapp3.0 --self-contained false -r --runtime win-x64 -o <publisheFolder>
It would be very helpful if Visual Studio Publish Profile would include a folder that we can specify, where all Third Party and Nuget Package DLLs will reside, in addition to the Publish folder, where only the app executable, app dll, configuration files, deps.json and runtimeconfig.json will reside. Even better if the CLI would allow additional option to specify the DLL folder and, not include the runtime folder when --self-contained false is indicated.
After all, isn't one of the main purpose of DLL to allow applications to share code with each other?

Visual Studio App Center: missing .csproj files

I'm trying to configure automatic build of a Xamarin Forms application, for Android and iOS, using Visual Studio App Center, but after choosing the branch in Build App\Project select box I cannot see my projects (.csproj files). Or better, I'm not able to see the .csproj files of projects I have to build (customers' customizations), but I can see the .csproj of my core projects.
Configuring iOS build I was able to select the .sln file, and it worked, but on Android I cannot see neither the .csproj nor the .sln.
My repository structure:
root folder
src
main solution file
Core projects
customers' customizations folder
customer A folder
customer A .sln
customer A iOS, Android and Forms folders, each one with a .csproj file
...
After hours of blasphemies I've found the reason here: https://learn.microsoft.com/en-us/appcenter/build/xamarin/android/
For best performance, the analysis is currently limited to four
directory levels including the root of your repository.
My repository was too deep and .csproj files weren't reachable. I contacted Microsoft to ask if I had to change my repository structure and they said that yes, the only solution to quick solve was to remove a "layer", so I deleted the src folder moving all the content at the top level.

VS2010 not obeying Output Path

I have a VS2010 Web Application Project that's compiled to bin\subdir\ via Output Path and without build events.
There's a few other projects that my main project is referencing but for some reason the dll's for the other projects goes into BOTH bin\subdir\ AND bin! It only applies to other projects - if I reference a dll in my main project and set it to Copy Local it will only go to bin\subdir.
I have checked that all my configurations in the main project are pointing to bin\subdir\ and that none of the other projects are pointing to the bin-folder.
How do I tell VS2010 to ONLY compile to bin\subdir\ and never touch bin\?
Edit: Just tried creating a blank web project, changing output path to a directory in the bin-folder, adding a project to the solution, referencing it and then I compiled: dll's for the referenced project wind up in both bin and the directory from output path. Could this be a VS2010 bug?
Quick fix: Put the files from your bin folder in another folder and put this in your post build event:
del /q "$(ProjectDir)bin\*"
copy "$(ProjectDir)..\lib\Sitecore Bin" "$(ProjectDir)bin"
It's fixed in Visual Studio 2012.

deploy flex application on tomcat server (not localhost) with blazeDS starting in eclipse

I have a locally developed flex application which i would now deploy on a live server. Those are the constraints:
Using blazeDS with java code
Code depends on other project in eclipse
the other project has several dependencies on 3rd party libs.
Using some external flash .swc libs
some web.xml settings are custom
In another post the structure for the exported folder is explained:
What needs to be in a .war file to deploy a Flex application?
In the default usage of Flash Builder i can create a release build and store it somewhere. This will create the release version of all the flex content.
I now want to export the .war file within the export function of eclipse and here comes the problem:
How can i exclude the files not needed in the war file. There is a debug build of the flex app and some other files i do not need.
How can i automatically insert the dependend libs of the imported eclipse project to the web-inf lib folder. When i try to export the release the function sais that the imported eclispe project cannot be created by the release process but it is within the lib folder of web-inf on .war export except the dependencies.
Can somebody point me to the documententation of flashbuilder regarding exportinmg and deployment.
Maybe i need an ANT process to optimize that. What do you think?
Thank you
For everything you just said, there are 2 ways of doing it:
1) Create it manually by copy pasting what you need in your war file into a folder, removing what isn't needed then create said war file using command line.
2) Create an automation script that does it all for you. This could be ANT or Maven (I personally prefer Maven for it's dependency management).
The latter is the enterprise way of doing it because it's easy to run ("mvn clean install war") and you can attach the script to an automation engine (like hudson, bamboo, teamcity, etc) which can then compile/test/deploy everything something is committed to your source control.

Creation of asp.net websites artifacts in Teamcity from SVN repository

I'm using TeamCity Professional Version 4.5.4 (build 9071) at work to build my asp.net web application project.
My solution file consists of several projects (e.g. web application, unit tests, some web service project, etc).
I want to create an artifact consisting of my web application (the others can be ignore for now), so I have the following configuration on teamcity (deviating from the default values):
General Settings
Artifact Paths: trunk\project-src\intranet-webapp***=>WebAppArtifact
Version control settings (SVN)
Automatically checkout on agent
Runner (sln2008)
Targets: Clean Publish
It builds my artifacts just fine, but there is a big problem: The artifact keeps the ".svn" folders and the .cs (C# code-behind) files in it.
I expected that with the "Publish" target in my runner, I would have exactly what the "Publish project" menu in VS 2008 does: copies the compiled project to some location without the code-behind files and no .svn folders.
Could anyone tell me what configuration am I missing?
If you will use checkout on server, there will be no .svn directories.

Resources