Hi Celso,
 
you can build ANY type of application (and even for any type of language). 
If you are already familiar with Ant, you know that you simply declare 
tasks (which can be any type: compile, jar, copy, anything) and order Ant 
to execute them. Look at Ant user manual to have an idea the type of tasks 
you can execute : http://ant.apache.org/manual/index.html.

Maven is founded in more or less the same principles. In ealier versions 
of Maven, if you wanted flexibility you had to use ant to invoke maven, 
but with the new versions of maven (at least with rc1) you have a file 
called maven.xml. This file is basically an Ant script.

What you need to do is:
        a) determine the list of tasks you need to accomplish in order to 
build your desktop application:
                Prepare your file system, Compile, Make your jars, 
Generate documentation, and so forth

                Note: Maven already does everything for you without 
creating any maven.xml, however, if you needed further flexibility then, 
you
                  have to write maven.xml. For example, if you need to 
produce two types of jars (internal and external) and two  types of java 
docs (internal and external); copy files to remote repositories, and that 
type of stuffs; you have to write maven.xml to guide maven.

        b) write -in the maven.xml file - as many targets as tasks you 
have determined above
                sample: 
                <target name="prepareFileSystem">
                        <mkdir dir="${logs}" /> 
                        <mkdir dir="${build}" /> 
                        <!-- more lines ... --->
                </target>
                <target name="compile" depends="prepareFileSystem">
                        <!-- for java applications --> 
                        <javac ..... />
                        <!-- or  for c++ applications -->
                        <exec dir="${src}" 
executable="${MicrosoftCompiler}" output="${logs}/compile.log">
                                <arg line="{yourfiles}"/>
                        </exec> 
                </target>

Read this article, and see if it is of any help for you: 
http://www-106.ibm.com/developerworks/library/j-maven/?ca=dnt-414

 I hope this helps

 Regards

  MArcial Rosales






Celso Gomes Barreto Junior <[EMAIL PROTECTED]> 
12/12/2003 16:43
Please respond to
"Maven Users List" <[EMAIL PROTECTED]>


To
"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc

Subject
Desktop






Hello Folks,

I am trying to use maven in a desktop project and I am having some
difficults to write the project.xml
and maven.xml. I've been looking for examples but I found just examples to
web applications. Does
anybody has an example (project.xml and maven.xml) or a tutorial wich
teaches to use maven
with desktop applications?

Thanks,
Celso Jr

------------------------------------------
Celso Gomes Barreto Junior
The One
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
IM: ICQ - 18474229
------------------------------------------
Want a signature like this? <http://www.plaxo.com/signature/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • Desktop Celso Gomes Barreto Junior
    • Marcial . Rosales

Reply via email to