Sunday, April 3, 2011

How do I send myself by mail a backup of a project using maven?

Before my pet projects become serious enough to deserve real version control (and its headaches) I like to just email myself the sources after I worked for a while. How can this be done easily with maven?

From stackoverflow
  • I don't know why you wouldn't set up version control, it is amazingly simple.

  • You would use an assembly using the src descriptor to accomplish the wrapping up of all the sources and the pom.xml into a nice zip that you could then manually email to yourself. If you wanted to get really fancy, you could use the Maven ant plugin to call the ant task that can send emails.

    The core command you would run from the command line would be:

    mvn assembly:assembly
    

    The assembly plugin usage page gives some great detail on using this plugin to aggregate everything into a bundle (zip).

0 comments:

Post a Comment