Re: Is there a way to make mvn default to Java 8?
That means making every new project a module of that parent. Ugh. On Fri, Jan 13, 2017 at 9:54 AM, Bernd Eckenfels <e...@zusammenkunft.net> wrote: > Sorry when this answer is an over-simplification, but you can just > configure it in a common parent. This is a quite typical case why you want > shared company/team/product/buildenv parents. > > Gruss > Bernd > -- > http://bernd.eckenfels.net > > > > > On Fri, Jan 13, 2017 at 5:51 PM +0100, "Dean Schulze" < > dean.w.schu...@gmail.com> wrote: > > > > > > > > > > > I would like to avoid having to add > > > 1.8 > 1.8 > > > to every pom.xml. Is there a global setting I can set in mvn to make Java > 8 the default so I don't have to add this to every pom.xml? > > > > > >
Is there a way to make mvn default to Java 8?
I would like to avoid having to add 1.8 1.8 to every pom.xml. Is there a global setting I can set in mvn to make Java 8 the default so I don't have to add this to every pom.xml?
Declaring a dependency for tools.jar
The FAQ shows the profile below to declare a dependency for tools.jar. This seems to be a problem waiting to happen now that Oracle is the vendor for the official JVM. (A recent update to JDK 1.6 caused problems for Eclipse because Eclipse was expecting a property setting of Sun Microsystems instead of Oracle). If you need tools.jar in the system path shouldn't the profile be activated automatically? What would be the right way to activate this profile all of the time? Thanks. profile iddefault-tools.jar/id activation property namejava.vendor/name valueSun Microsystems Inc./value /property /activation dependencies dependency groupIdcom.sun/groupId artifactIdtools/artifactId version1.5/version scopesystem/scope systemPath${java.home}/../lib/tools.jar/systemPath /dependency /dependencies /profile http://maven.apache.org/general.html#tools-jar-dependency
Re: use of plugin and pluginmanagement
Hi Wayne, Here are my suggestions so far: Descriptions of what the various elements in a pom do (similar to the Ant documentation). Sequence diagrams for maven execution (typical cases) to show how POM elements affect the build. How do phases and goals relate to POM elements? Changes from Maven 2 to Maven 3. Thanks. --- On Sun, 1/16/11, Wayne Fay wayne...@gmail.com wrote: From: Wayne Fay wayne...@gmail.com Subject: Re: use of plugin and pluginmanagement To: Maven Users List users@maven.apache.org Date: Sunday, January 16, 2011, 8:27 PM Maven documentation authors - please study Wayne's concise statement below. That is what we need in the Maven documentation. Not the long-winded, stream-of-consciousness that the existing maven docs currently are. Thanks Dean. I was just recently invited to join Maven dev team and I do plan to make some improvements to the documentation. ;-) It won't happen overnight, but hopefully we can make things easier for everyone. Along those lines... any suggestions you may have would be greatly appreciated!! Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: use of plugin and pluginmanagement
Wayne, Thanks for your concise statement. I'm new to maven and have been trying to figure out how to use maven by reading the documentation. What a quagmire. Maven documentation authors - please study Wayne's concise statement below. That is what we need in the Maven documentation. Not the long-winded, stream-of-consciousness that the existing maven docs currently are. --- On Fri, 1/14/11, Wayne Fay wayne...@gmail.com wrote: From: Wayne Fay wayne...@gmail.com Subject: Re: use of plugin and pluginmanagement To: Maven Users List users@maven.apache.org Date: Friday, January 14, 2011, 9:05 AM What extra things pluginManagement provides than using only plugins. PluginManagement does ONE THING ONLY (essentially). It provides a central location for all of your plugin versioning and configuration. THAT'S IT. You still need to declare the plugin in the build section of your various poms (children or parents) where you actually want to USE any of those plugins in your build. POM, why is that ? Because the maven documentationhttp://maven.apache.org/pom.html#Plugin_Managementsays you need to add plugin entry in your child POM to use that plugin (specified in parent POM's pluginManagement section,). I thought I will add that plugin in child pom only if I want to change version. Then you thought wrong. CASE2: if I donot use pluginManagement and only use plugins: --- In this case also I can get everything I want as above. All child pom gets the plugins define in parent pom without adding any entry. OS what's the difference? The plugins declared in the build section of your parent will be inherited (and executed) in all of those children poms. In many cases, you might only want a given plugin to actually be used in a few of those children, or even just one, and frequently not in the parent. So whats the point in going for pluginManagement, Is it only to Enforce to use same version of plugin and provide some clarity to whole application (parent and child) or it is for more than these? That is essentially the only purpose for pluginManagement. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Using profiles to control execution of a maven build (conditional execution)
Could you elaborate some more on using Maven correctly. I've inherited a large maven build where things apparently done correctly and I don't want to add any more incorrect things to it. --- On Thu, 1/13/11, Brian Topping topp...@codehaus.org wrote: From: Brian Topping topp...@codehaus.org Subject: Re: Using profiles to control execution of a maven build (conditional execution) To: Maven Users List users@maven.apache.org Date: Thursday, January 13, 2011, 3:19 PM You might want to look in the list archives, there was a discussion in which I learned a lot from others on the list about the pros and cons of using profiles versus using separate (nearly identical) POMs. My takeaway was that if one just jumps on profiles as the solution to every conditional situation, the build will grow a second head like a hydra in a bad horror flick and you'll really regret it. The point is that profiles are often an expedient substitute for using Maven correctly. They should always be considered last resort unless you know what you are getting yourself into. In my situation, I wanted to have a whole subtree of sources compiled if they were there, otherwise fetched from Nexus if needed. Profiles work great for that, but I can see exactly where the hydra head fits on the beast now and don't intend on doing anything more with them unless absolutely necessary. $0.02... On Jan 13, 2011, at 5:10 PM, Dean Schulze wrote: I need to modify the maven build for a large project to skip certain steps during typical development builds (i.e. don't build the *-source.jar files). I've searched for conditional execution for maven, but haven't found anything. A dev profile sounds like the intuitive way to do this - but I don't know how intuitive maven is. The docs for profiles show how to set different properties (i.e. database connection parameters) for different profiles. I suppose I could set a property and then test if that property is set in the maven-source-plugin - executions - execution tag. Is this the right way to do conditional execution in maven? What's the right way to do this in maven? Thanks. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Using profiles to control execution of a maven build (conditional execution)
I need to modify the maven build for a large project to skip certain steps during typical development builds (i.e. don't build the *-source.jar files). I've searched for conditional execution for maven, but haven't found anything. A dev profile sounds like the intuitive way to do this - but I don't know how intuitive maven is. The docs for profiles show how to set different properties (i.e. database connection parameters) for different profiles. I suppose I could set a property and then test if that property is set in the maven-source-plugin - executions - execution tag. Is this the right way to do conditional execution in maven? What's the right way to do this in maven? Thanks.