Author | Message |
---|---|
talisunep
Posts: 140
|
Posted 16:13 Apr 16, 2013 |
I've noticed when backing up a maven project locally as a .war and when we reimport them to eclipse the file directory structure changes... the pom.xml and the src and target folders move to META-inf... does this effect future workings with the project in case we want to export it to svn repository.... is there another proper way export maven projects locally which may maintain the file structure ? |
cysun
Posts: 2935
|
Posted 16:27 Apr 16, 2013 |
WAR is a package format for deploying a Java EE project - it doesn't even include the source code, so you can't use WAR as a backup of your project, and obviously importing it back to Eclipse won't work. You can create a zip file for backup, e.g. something like Export -> General -> Archive File -> Save in zip format, or just use "mvn package" (after you added the assembly goal) to create the zip file. |
talisunep
Posts: 140
|
Posted 16:35 Apr 16, 2013 |
if we use mvn package and want to create a zip file for the full project in the assembly.xml (in homework 2 weve only zipped the source folder and the pom files) do we have to specify all the filesets / files and directories ? is there a compile all project method/command...which can i import this zip(project) to my eclipse ? Last edited by talisunep at
16:36 Apr 16, 2013.
|
cysun
Posts: 2935
|
Posted 16:48 Apr 16, 2013 |
Right now /src + pom.xml is the full project. You don't need class files or Eclipse config files and so on. In the future if you add files outside /src (e.g. README, LICENSE etc.), you can specify them in the assembly descriptor so they will be included in the zip file as well. I'm not familiar with Eclipse's import project function (usually I just check out projects from SVN repositories), but I think you should be able to import the zip file directly: Import -> General -> Archive File or unzip it to a folder, then import the folder as a Maven project: Import -> Maven -> Existing Maven Projects |
talisunep
Posts: 140
|
Posted 17:19 Apr 16, 2013 |
yes youre right...i /src + pom.xml is the full project. ....for recreating i created the the maven project locally, i just created a new maven web app then imported the bvvo-src.zip into the maven project and it works fine... thank you |