Category Archives: Uncategorized

import maven projects to eclipse

maven has its predefined structure of the project files and there is a simple, easy command to create it 🙂

mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app

and yeah… its from a tutorial… so the structure is ready… the pom.xml is created… but it has no eclipse .project file… ok i could have created the same thing in eclipse, with a maven plugin, which is actually installed on my eclipse… but as i told you before… its a tutorial… and importing to eclipse is easy… with the plugin…

Import… –> Maven –> Existing Maven Project

nuff said…

building in maven

once again… new projects, new concepts and new technologies… this time its maven… the project i am working on, has already set up everything (hopefully)… and my maven knowledge didnt even allow starting the build process… so current reading everything about maven… starting with the wiki page… an building is named packaging… and the console command is:

mvn package

or in eclipse:

right-clicking the project –> Run as –> Mavan Package

moving crm

we needed to move our crm environment… ok it sounds like bad idea and the reason was the server naming convention… ok now you will thick: why the hell didnt they do it correct the first time? actually… we did… but the consultant, how installed the crm, didnt… yeah and its our fault, that he did it wrong, we should have had controlled him better… but on the other hand, its just our test- / dev-enivornment… so it has no impact to our company, when we rename it, reinstall it and so on…

in my opinion, the move is not really importent… ok i am leaving this company next week, but its only a test server… therefore wth? but on the other side, we need to figure out a way, to replicate the data of the productiv environment to test… and i think this will actually be really similar to the move process… therfore, its training 🙂

and with following link pretty easy: http://support.microsoft.com/kb/952934/en-us

now i only have to re-install all our applications and re-configure the iis and re-register the plugins and… meh!

moving ms sql server

we needed to move an sql server… so we looked for space in our virtual environment… there was… but wth? moving is renaming… or isnt it? first it looked like it was, but secondly there were a few problems…

basiclly the sql server instance has the same name as the server… wrong!

sp_dropserver ‘old_name’
GO
sp_addserver ‘new_name’, local
GO

this statements change the instance name… following command returns the current instancename…

select @@SERVERNAME

and thats the history of renaming ms sql servers… funny…

c# unit testing: code coverage

ok unit testing in vs2010 was really easy… setting up code coverage analysis is simple too…

  1. edit the local.testsettings
  2. goto Data and Diagnostics
  3. enable Code Coverage
  4. configure it
  5. add the dll
  6. tada: done

just run the tests again and look at the code coverage…

nant remote start and stop services

i though, stopping and starting services on a remote maschine is almost impossible… but i was mistaken…

<target name=”startService”>
    <exec program=”sc.exe”>
         <arg line=”\\${server} start ${service.name}”/>
    </exec>
</target>

thats it… just run the sc.exe… but i am not really unhappy of the simpleness of this solution 😛