On Sun, 4 Jan 2015 14:20:53 +0000, sebb wrote:
On 4 January 2015 at 12:58, Gilles <gil...@harfang.homelinux.org>
wrote:
Hello.
On Sun, 04 Jan 2015 12:09:35 +0100, Luc Maisonobe wrote:
Hi all,
Le 04/01/2015 02:07, Gilles a écrit :
It reminded me that I had yet to improve one toy example in the
"src/userguide/java/org/apache/commons/math3/userguide" section
of the repository.
It also occurred to me that I don't know how to compile and run
the applications stored there. :(
Is there a maven incantation to do so?
No as maven does not know about this directory (and should not
IMHO).
I think that we should have some way to
1. automatically compile its content (so that we can ensure that the
source tree does not contain any non-compilable stuff) and
2. run selected classes (so that users easily see CM code at work)
It looks like it should not be too difficult (for an experienced
maven user, which I'm not) to create a profile for doing just that.
[I've seen there is an "exec" plugin that could do (2), but I
couldn't find where one can specifytan alternate source for
compilation.]
Commons NET has an examples/ tree which is compiled and released as a
separate bundle.
Note that this is under src/main/java, not under the userguide, but
it
should be relatively easy to maintain the examples there and copy to
(or link from) the userguide.
The NET examples jar has a feature you might find useful.
It defines the Main-Class and the Class-Path.
This means it can be invoked using
java -jar commons-net-examples.jar ExampleName parameters.
This indeed looks like a easy way to run the code.
This assumes that the user has put the examples and main net jars in
the same directory.
Would everyone agree to move the "userguide" code into the "main"
directory?
[Of course, this would imply that we need to modify the "pom.xml"
in order to exclude the "userguide" code from the CM library JAR.]
Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org