Just wondering why the controversy. Is it about where to best place the task, or even whether it belongs in maven at all?

On 19 Sep 2005, at 18:38, Jesse McConnell wrote:

hi,

I was the one that cobbled that maven-execute-plugin together in the sandbox
that you are referring too..

there is some discussion on irc around it...

my general feeling on it, and the reason I created it in the first place was
that it was a great (and simple) way to have m2 manage the classpath
automatically for me. the idea behind the maven-execute-plugin might not be the best way about going it really. However, there are a number of ways to
skin this cat..

I am not sure about going too far down this path since some of the m2 devs are _really_ not hot on this idea atm :) The best thing might be to get a bit of further comment on ths subject from kenney and trygvis..and maybe brett if he sees this.. If they have a solution they are happy with then I'll certainly put it together if it doesn't already exist in some form...I use this plugin in its current state all the time for running little one off
programs I don't want to mess about with classpaths for.

btw, execute:jar shouldn't be too bad...though it might be that if this plugin lives on then it ought to be renamed...it doesn't exec perl afterall.

Jesse

On 9/19/05, Kristian Nordal <[EMAIL PROTECTED]> wrote:


On Sep 19, 2005, at 6:55 PM, Kenney Westerhof wrote:


On Mon, 19 Sep 2005, Kristian Nordal wrote:

You could file a JIRA issue for that plugin to request a
'execute:jar' goal that executes the jar if it is an auto-executable
jar (i.e. it's manifest has a Main-Class entry).


Done. http://jira.codehaus.org/browse/MOJO-34


Note that maven2 is a project management/build tool, not a generic
execution environment, so plugins like these don't belong there
(for now,
at least :))


Noted =)

--
Kristian



But I agree it would be easy if jar:execute worked too. ;)



On Sep 19, 2005, at 5:58 PM, Ashley Williams wrote:



Is there currently a java plugin for running regular main() apps?
I've just checked the repository and I couldn't find one. Currently
I define the following plugin in my pom:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>Server</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>

and would like to do something like this to run the app:
m2 java:java

but at the moment I have to do this:
java -jar file://<myrepository>/<myartifact>/myapp.jar

In fact I'd ideally like to run the app immediately after the
install:
m2 install java:java



Hi,

I've been thinking about the same thing. It would be nice to be able
to just run the jar file with the correct dependencies in the
classpath directly.

There's a plugin at org.codehaus.mojo called maven-execute- plugin (in
the sandbox), which does something like this (I don't know if it
currently works). From the docs: "A useful little plugin for
leveraging maven to build the required classpath to
execute the main method on an object." With an example for running it directly (can also be configured in the POM): "m2 execute:resources -
Dexecute.class="com.foo.X" -Dexecute.args="-h bar".

For this you would need an additional plugin (execute), why not just put this functionality into the jar plugin? So no more configuration
is needed. It might be the wrong place for it, I don't know, but it
would be nice to just write "m2 jar:run" =)

--
Regards,
Kristian




Thanks
AW

------------------------------------------------------------------ --
-
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]




--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

-------------------------------------------------------------------- -
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]





--
jesse mcconnell



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

Reply via email to