yes but "system.properties" in general in tomee are container properties and not this so sounds misleading to me. However an interesting thing would be to add hooks you could execute before/after ExecRunner#main. Not yet sure which kind of API we need to provide (issue is dependencies handling) but can be something to investigate. Wdyt?
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> 2015-11-02 8:01 GMT-08:00 Alex Soto <[email protected]>: > But what I need is to set the tomcat http port, which this cannot be > configured using tomee.xml but overriding server.xml > > El dl., 2 nov. 2015 a les 16:46, Romain Manni-Bucau (< > [email protected]>) > va escriure: > > > I got it but sounds like very fragile (i rarely run the shade from the > > folder it is in...and thinking to it I think it mainly depends where I am > > when i need to run it ;)). > > > > in TomEE.xml you can import another "tomee.xml" and using > > ~/.openejb/system.properties you keep the ability to configure "local" > > resources. Isnt it enough? Also resources.xml supports placeholder so > > sounds like with everything it is enough. If not a small class @Observes > > ContainerSystemCreated (openejb) to init the properties would do the > trick. > > > > > > Romain Manni-Bucau > > @rmannibucau <https://twitter.com/rmannibucau> | Blog > > <http://rmannibucau.wordpress.com> | Github < > > https://github.com/rmannibucau> | > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber > > <http://www.tomitribe.com> > > > > 2015-11-02 7:18 GMT-08:00 Alex Soto <[email protected]>: > > > > > Well in the code you sent me you need to do: > > > > > > -DadditionalSystemProperties=-Dmyport=1234 -Dmyhost=xxxx > > > > > > but whatI say is that you could put an > > > additionalSystemProperties.properties in the same directory as the uber > > > jar, and if it is there it reads all the properties there, and append > the > > > -D and it concats with additionalArgs as well. > > > > > > El dl., 2 nov. 2015 a les 16:10, Romain Manni-Bucau (< > > > [email protected]>) > > > va escriure: > > > > > > > Wdym by jar there? system.properties is supported and tomee.xml > support > > > > syst props and imports > > > > Le 2 nov. 2015 06:59, "Alex Soto" <[email protected]> a écrit : > > > > > > > > > Ah ok, a bit strange since it is a property inside a property but > > yeah > > > it > > > > > works. I think it would be interesting that if in current jar > > directory > > > > > there is an additionalSystemProperties.properties file then they > are > > > read > > > > > as well. > > > > > > > > > > El dl., 2 nov. 2015 a les 15:56, Romain Manni-Bucau (< > > > > > [email protected]>) > > > > > va escriure: > > > > > > > > > > > Le 2 nov. 2015 06:47, "Alex Soto" <[email protected]> a écrit : > > > > > > > > > > > > > > Cool, two questions, in case of uber jar (maven exec) can I use > > > > > directly > > > > > > > the -D on call java -jar -Dmyport=1234 my.jar or should I > export > > > > > > > CATALINA_OPTS before? And is it possible to set a default value > > > like > > > > > for > > > > > > > example tomee resources? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://github.com/apache/tomee/blob/master/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/runner/ExecRunner.java#L102 > > > > > > is the way to add system props i mentionned. Not directly ln the > > > > process > > > > > > cause it forks. Defaults work then like in a plain tomee using > this > > > > > > particular config. > > > > > > > > > > > > > Alex. > > > > > > > > > > > > > > El dl., 2 nov. 2015 a les 15:26, Romain Manni-Bucau (< > > > > > > [email protected]>) > > > > > > > va escriure: > > > > > > > > > > > > > > > server.xml supports placeholders and exec main supports > > > > > > > > -DadditionalSystemProperties=-Dmyport=1234. Together it does > > the > > > > > trick. > > > > > > > > Le 2 nov. 2015 03:12, "Alex Soto" <[email protected]> a > écrit > > : > > > > > > > > > > > > > > > > > Hi, I have a really quick question, when you execute the > > > > tomee:exec > > > > > > goal, > > > > > > > > > the maven plugin will create a runnable file with > everything > > > > inside > > > > > > > > > (TomEE + Application). > > > > > > > > > > > > > > > > > > My question is if there is a way to set running port from > any > > > > > > property or > > > > > > > > > not. I know that you can create a tomee/config directory > > inside > > > > the > > > > > > > > project > > > > > > > > > with the configuration you want to embed inside the jar, > but > > in > > > > > case > > > > > > you > > > > > > > > > want to use Mesos, the running port is resolved dynamically > > at > > > > > > running > > > > > > > > > time. > > > > > > > > > > > > > > > > > > Alex > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
