[Hawkular-dev] What should -Pdev do?

John Mazzitelli mazz at redhat.com
Thu May 28 14:41:41 EDT 2015


What I care about is that I start the server the same no matter how I build (standalone.sh) when I'm developing.

You can leave it the way you have now, because you are building both production and dev builds in one shot using just "mvn install". You don't need or use -Pdev. So that's fine to me.

But I want to resurrect -Pdev again and just have it copy standalone-itest.xml to standalone.xml so I can start my build the same way I do any other time. This would affect no one other than a developer's local machine since we are the one's building with -Pdev locally (travis isn't building with it so it doesn't affect those builds).

Also, keep in mind that once we have a need to build a dev build that has different content (other than config) than a production build, what you have probably isn't going to work as-is. When would we ever do that? I can tell you in the RHQ case, we did things like build with the Oracle JDBC driver out of box with the -Pdev build, but did NOT have the Oracle JDBC driver in the production build (for licensing reasons, don't ask :)). We also had different .sql scripts that stored additional data in the database (e.g. test users and test security roles) when using -Pdev. So we actually had different dev builds vs. production builds. But RHQ QE always ran integration tests on the production builds, not dev builds (which sounds like we - Hawkular - are not - sounds like our itests are running the "dev" build, which may or may not be what QE wants to do).

So -Pdev (in the future) may not be solely to tweak standalone.xml and why I say having one "uber" build to support both dev and prod environments may not be viable in the future.

----- Original Message -----
> Hi *,
> 
> sorry, for bringing this up so late on this list. I discussed this on
> #hawkular but probably outside US office hours and I totally
> underestimated the amount of emotions some of us are tied by to -Pdev.
> 
> There was a change by me recently that changed a little bit how -Pdev
> behaves.
> 
> Originally, a -Pdev just produced a bundle in which the default
> configuration was changed to suit the dev use case: esp. one had jdoe
> loaded by invoking simply standalone.sh.
> 
> As I worked on fixing the end to end tests in Hawkular, Lucas was fixing
> the REST tests in alerts. We both had the problem that the hawkular
> bundle that maven has downloaded from JBoss Nexus was build without
> -Pdev and as a consequence of that we could not run our integration
> tests by simply taking the bundle. We had to unzip the bundle, do what
> -Pdev does and only after that we could start it.
> 
> Hence, as a solution, I have prepared
> 
>    https://github.com/hawkular/hawkular/pull/134
> 
> which caused that the stuff originally present only in bundles built
> with -Pdev became available by default, but to use that dev stuff,
> wildfly needs to be started with
> 
>    standalone.sh -c standalone-itest.xml
> 
> because standalone-itest.xml is the place where the dev configuration is
> activated.
> 
> With this change, there is only one way to build a hk bundle, hence
> there is only one bundle to distribute and download but you can do both
> dev and prod things with it. Not having jdoe/password by running the
> default config is a good thing from the security PoV.
> 
> The bottom line is that -Pdev in the present master has one small issue
> that I fixed in https://github.com/hawkular/hawkular/pull/148
> 
> Please comment.
> 
> Thanks,
> 
> Peter
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
> 


More information about the hawkular-dev mailing list