How to specify the generated jar path in m2e - m2eclipse

I use m2e. I have dynamic web project A, java project B and project A is dependent on project B. I want the JAR file that is generated in the target folder of project B to be moved to the WebContent/lib of project A. What is the simplest way to achieve this?

1) Enter Project B as dependency in the POM of project A. That ist the prerequiste for maven to resolve the dependency from A to B.
2) In the Eclipse project preferences of project A make sure the in the section "maven" the option "Resolve dependencies form Workspace projects" option is enables (should be by default.
Usually, this should do it

Related

How to reference a DLL from a nuget package being restored as part of another project in the solution

Let's say I have a project A that restores a nuget package which includes a specific DLL named D. Another project B in that solution needs to use/reference the D dll that is being restored as part of the nuget pack when project A is compiled. If I simply reference project A from my project B, then the classes in D are not visible within my project B. How I can achieve that, so I use functionality buried in D within my project B (the limitation is I cannot reference that same nuget package from project B)?

How to set Wix OutputName programmatically

We have a Wix bundle project and now need to produce an OEM-branded version of our product. I'd like to use the same bundle project to produce both the base product and branded bundles rather than creating a second bundle project.
I'm familiar the Wix localization functionality (WXL files), and it looks like I could use it for this, but I'm stuck on the OutputName of the bundle EXE which is defined in the WIXPROJ; it needs to have a different name for the branded version. That is, the same bundle project should produce both BrandedBundle.exe and BaseProductBundle.exe.
Is there a way to use the localization functionality to set the OutputName programmatically?
I don't know how to do it with the localization functionality, but there is a nother way to do this.
You can pass in a build parameter to the msbuild...
msbuild WiXInstaller.wixproj /t:Rebuild /p:DesiredName="OEMName"
If your Output name (in the wixproj) is defined as the following:
Application-$(DesiredName)
Then your output will actually be: Application-OEMName.msi
You can then have your build configured to run for a bunch of different OEM's if you need...
msbuild WiXInstaller.wixproj /t:Rebuild /p:DesiredName="OEMOne"
msbuild WiXInstaller.wixproj /t:Rebuild /p:DesiredName="OEMTwo"
msbuild WiXInstaller.wixproj /t:Rebuild /p:DesiredName="OEMThree"
It will run the build three times, and each will have its own output name:
Application-OEMOne.msi
Application-OEMTwo.msi
Application-OEMThree.msi
Best of luck.
Upon further review, I see that the "Cultures to build" field in the bundle's project properties page is disabled, so it appears that localization is not supported for bundles.
I did find some suggestions here: Creating localized WIX 3.6 bootstrappers., but it does not appear that it is possible to do what I wanted to do (change the OutputName) the way I wanted to do it (using localization).

How to use classes from a Test project in another Test Project in VC++?

I normally work with C#. In C# I can have a hierarchy, and they reference each other.
I am trying to do the same in VC++, but I dont know how. I don't have much experience with C++ in general.
I have:
TestProject1
TestProject2: I need to use classes that are in TestProject1 here.
I tried adding TestProject1 as reference of TestProject2:
Right Clikc on the TestProject1-> Properties -> Common Properties -> Framework and References -> Add New Reference -> Selected TestProject2
But this results in an error, because TestProject2 is not built as a lib.
From what I can see only a list of obj files are generated.
What is the correct way to reference TestProject2 in TestProject1 so I can use its classes?
Update: How I solved it
I solved the issues by following SOReader instructions, but I added the lib in a different way:
First I changed the TestProject1 project type as SOReader indicated (Right Click on TestProject1 project -> Properties-> Configuration Properties -> General-> Set Configuration Type to Static library (lib)
Add reference to TestProject1 in TestProject2 -> Right Click on TestProject2 project -> Properties-> Common Properties -> Framework and References -> Add New Reference -> Select TestProject1
It's not so easy as it is in C#.
You must have TestProject1 build as static library if you want to simply include it to another project. After this you go to dependent project properties and add lib file to linker and headers folder for headers lookup.
Assuming Dll has its include .h file in its root folder (which actually should not have) you simply add an entry to Additional Include Directories to point the place where Dll root folder is.
Now you can just write #include <theheaderfile.h> in you cpp file in Main application to reference exported functionality.
Here are few others locations in msdn that might help: import/export, static libraries, hpp vs h

Trying to add mapviewballoons library in project

I am trying to add mapviewballoons library in my project, by right click project > properties > Android > isLibrary but whenever i click on Add button, in Project Selection box i am not getting any option to add library, i have downloaded mapviewballoons library in my downloads folder
Hmm...I did it in few simple steps, If you have Git configured it will be easy just clone Git repository, right click->import project. If mapviewballoons project is not checked as library (checkbox in properties->android is Library) then check it and simply in project in which you want to use balloons properties->android->add library and it will appear in list
I dont have GIT, dont know what it is, nor have time to learn what that is.
Is there no easier way to import this stuff into a library project?
Why is Java always so ... hard!?
I dont want to spend days learning GIT, just to get those balloons!
My project is overtime already.

Common way to add SDK to VC++?

It's the first time that I want to use a downloaded SDK. What is the best way to include its source files, by not adding them to the project folder (external)?
(I'm using VC++ 6.)
You just need to set up your compiler and linker include paths to reference the new headers and libraries that are included in the SDK.
For VC6, right click on your project in the Workspace -> Settings:
C/C++ -> Category 'Preprocessor' ->
Additional include directories
Link-> Category 'Input' -> Additional
library path
For later versions - right click on your project in the Solution Explorer - open Properties.
Configuration Properties-> C/C++ ->
General -> Additional Include
Directories
Configuration Properties-> Linker ->
General -> Additional Library
Directories

Resources