I agree.

Maven has many options for J2EE apps: deploy war, ejb, ear etc.
But a normal J2SE app seems to be set behind:
1) a genap template for a library jar (besides for wars, ears, ...), but not
for an application jar
2) You can ask to put other libraries in the jars ClassPath, but they aren't
copied into the target directory.
3) Debugging

But Maven rocks, even despite these.
It could be that I have been missing some features. Is there good
documentation about a J2SE app in Maven? There is a great article about a
J2EE app
Its also quite unclear to me how to combine Maven with IDEA efficiently.

Currently I making a multiproject J2SE app in Maven, calling jar:install (is
this the correct target?).

wkr,
Geoffrey

"Volkmann, Mark" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> -----Original Message-----
> From: Jesper Linvald [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 12:52 PM
> To: [EMAIL PROTECTED]
> Subject: How to run java ?
>
> Hello gurus,
>
> Is there a goal similar to ants java goal (<java classname="xxx... )?
>
> Can�t seem to find any such goal :(

Surprisingly no.  I really think this should be built-in.
Here's what I do to get around the lack of a predefined goal.

First, I create a maven.xml file with the following contents.

<project default="run"
  xmlns:ant="jelly:ant"
  xmlns:j="jelly:core"
  xmlns:maven="jelly:maven">

  <!-- Runs the Java application specified by the mainClass property. -->
  <goal name="run">
    <attainGoal name="java:compile"/>
    <path id="cp">
      <pathelement location="${maven.build.dest}"/>
      <path refid="maven.dependency.classpath"/>
    </path>
    <java classname="${mainClass}" classpathref="cp" fork="true"/>
  </goal>

</project>

Second, I add the following to my project.properties file.

mainClass=com.ociweb.sample.App




----------------------------------------------------------------------------
---------
A.G. Edwards & Sons' outgoing and incoming e-mails are electronically
archived and subject to review and/or disclosure to someone other
than the recipient.

----------------------------------------------------------------------------
---------





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

Reply via email to