Re: Logging for dependencies of Maven plugin
Hi Sander, the next line of the documentation should interest you: The following system properties are supported to configure the behavior of this logger: So you can set them programmatically as well or by cmdline, no need to use the simplelogger.properties. If I understand you correctly, you want to specify the loglevel for third party jars. I think that's not up to the plugin developer, but up to the plugin user. I've been thinking about a solution to specify the logging level for a specific plugin execution, because often you're only interested in debug logging of a specific plugin and not in the complete Maven execution. This is a real challenge to solve, especially in a multithreaded environment. thanks, Robert Op Fri, 17 Apr 2015 05:56:03 +0200 schreef Sander Verhagen san...@sanderverhagen.net: Hi all, Thank you, Robert. I understand that you suggest changing a configuration file that is part of the local Maven installation. While that strategy would (possibly) suffice for myself, when debugging this plugin, I would appreciate contributing back a solution for all users of this plugin that worked without changing their local Maven installation. Are there any expectations with the current implementation of Maven, that plugins would be able to extend/override the definitions of $MAVEN_HOME/conf/logging/simplelogger.properties? I had seen your link [1] before and it mentions a class loader resource named simplelogger.properties, but I'm unfamiliar in how that translates to class loading scopes of plugins (although I'd suspect that it would override the entire simplelogger.properties at best, if that already, which would not be extremely helpful). I'd say that HttpClient is using commons-logging. Sander. Sander Verhagen [ san...@sanderverhagen.net ] NOTICE: my e-mail address has changed. You may still e-mail me at verha...@sander.com but you will see me using san...@sanderverhagen.net from now on. Feel free to update your address book. -Original Message- From: Robert Scholte [mailto:rfscho...@apache.org] Sent: Thursday, April 16, 2015 10:08 To: Maven Users List Subject: Re: Logging for dependencies of Maven plugin Hi, This might be possible with Maven-3.1.1+ by changing the apache-maven- 3.x/conf/logging/simplelogger.properties See SimpleLogger[1] for the configuration options. You need to specify a specific logLevel for these packages (org.slf4j.simpleLogger.log.a.b.c) , so it doesn't pick up the defaultLogLevel ( as passed by Maven, e.g. -X will set defaultLogLevel to debug) However, I don't know which logging framework is used by HttpClient. You might need to add a specific SLF4J adapter to the apache-maven-3.x/lib/ext for that. This is how it should work, but I haven't tried it yet. thanks, Robert [1] http://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html Op Thu, 16 Apr 2015 16:54:24 +0200 schreef Endo Alejandro alejandro.e...@grassvalley.com: I've wondered this myself for a while as well. Hope you find an answer -Original Message- From: Sander Verhagen [mailto:san...@sanderverhagen.net] Sent: Thursday, April 16, 2015 02:20 AM To: users@maven.apache.org Subject: Logging for dependencies of Maven plugin Hi group, I already askedhttp://stackoverflow.com/questions/29619125/logging-for- dependen cies-of-maven-plugin this on Stack Overflow, but I think it's a somewhat specialized question, so I wanted to ask here as well. I would like to influence logging of dependencies of a plugin that I'm contributing to, so that when Maven is ran in debug (-X, --debug) I can log some sensible debug information in the context of my plugin, without being flooded with debug logging from my plugin's dependencies. This is the situation: * Building a plugin * The plugin depends on org.apache.httpcomponents:httpclient:4.3.6 and uses HttpClientBuilder to build a CloseableHttpClient * When Maven runs in debug (-X, --debug) also HttpClient kicks into debug mode * While in debug mode, HttpClient logs way, way more than I want How can I configure my plugin so that a certain logger is not set to DEBUG, even though Maven is in debug (-X, --debug)? I have tried various strategies of doing this programmatically, or providing the logging configurations for a few of the common frameworks that I suspect are on my classpath (SLF4J, Commons Logging, Log4j), but all to no avail. Your help much appreciated. Sander Verhagen [ san...@sanderverhagen.netmailto:san...@sanderverhagen.net ] DISCLAIMER: Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business
Re: what are some best practices for maven artifact naming when multiple code branches exist?
I would add a suffix to the version for each branch. For example, if trunk is 1.0.0-SNAPSHOT, feature branch A would get version 1.0.0-featureA-SNAPSHOT. /Anders On Sat, Apr 18, 2015 at 9:10 PM, Nikita Tovstoles nikita.tovsto...@gmail.com wrote: Suppose we have an app that's being developed on trunk and a couple of branches simultaneously - and we'd like to publish artifacts from each dev branch into our maven repo (so that we can run a cluster for each code branch). Currently the 'V' in GAV equals our CI's build plan execution number. What are some approaches for differentiating GAVs between each code branch? I can think of: 1) using different artifact names (ie myapp for trunk, myapp-b1 for branch1 version, etc) 2) reset version numbers so that trunk's starts at 100, branch 1 starts at 10,000, etc (unlikely to collide in our case but seems cheesy) 3) Something else? thanks -nikita
Packaging Maven Core Extensions
Hi, I have just finished a small maven core extension containing an EventSpy. It's working nicely if I include it into my build using Maven 3.3.1 and a .mvn/extensions.xml, but I couldn't get it working by copying the jar to the MAVEN_HOME/lib/ext directory (I even tried a shaded jar). All I am getting are these warnings: [WARNING] Failed to notify spy org.apache.flex.utilities.converter.mavenextension.FlexEventSpy: java.util.NoSuchElementException role: org.apache.maven.execution.MavenSession roleHint: ?What is the difference between the two options? What do I have to change in order to have my extension working in older Maven versions (down to 3.1.1) by installing it into the lib/ext directory? Chris
what are some best practices for maven artifact naming when multiple code branches exist?
Suppose we have an app that's being developed on trunk and a couple of branches simultaneously - and we'd like to publish artifacts from each dev branch into our maven repo (so that we can run a cluster for each code branch). Currently the 'V' in GAV equals our CI's build plan execution number. What are some approaches for differentiating GAVs between each code branch? I can think of: 1) using different artifact names (ie myapp for trunk, myapp-b1 for branch1 version, etc) 2) reset version numbers so that trunk's starts at 100, branch 1 starts at 10,000, etc (unlikely to collide in our case but seems cheesy) 3) Something else? thanks -nikita
Re: Packaging Maven Core Extensions
Where's the code for the extension. They are expected to work in both places, you shouldn't have to do anything special other than making sure your dependencies are correctly marked as provided. On Apr 18, 2015, at 12:26 PM, Christofer Dutz christofer.d...@c-ware.de wrote: Hi, I have just finished a small maven core extension containing an EventSpy. It's working nicely if I include it into my build using Maven 3.3.1 and a .mvn/extensions.xml, but I couldn't get it working by copying the jar to the MAVEN_HOME/lib/ext directory (I even tried a shaded jar). All I am getting are these warnings: [WARNING] Failed to notify spy org.apache.flex.utilities.converter.mavenextension.FlexEventSpy: java.util.NoSuchElementException role: org.apache.maven.execution.MavenSession roleHint: ?What is the difference between the two options? What do I have to change in order to have my extension working in older Maven versions (down to 3.1.1) by installing it into the lib/ext directory? Chris Thanks, Jason -- Jason van Zyl Founder, Takari and Apache Maven http://twitter.com/jvanzyl http://twitter.com/takari_io - The most dangerous risk: spending your life not doing what you want on the bet you can buy yourself freedom to do it later. -- Randy Komisar - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Packaging Maven Core Extensions
Hi, are you running from within Jenkins ? On 4/18/15 6:26 PM, Christofer Dutz wrote: Hi, I have just finished a small maven core extension containing an EventSpy. It's working nicely if I include it into my build using Maven 3.3.1 and a .mvn/extensions.xml, but I couldn't get it working by copying the jar to the MAVEN_HOME/lib/ext directory (I even tried a shaded jar). All I am getting are these warnings: [WARNING] Failed to notify spy org.apache.flex.utilities.converter.mavenextension.FlexEventSpy: java.util.NoSuchElementException role: org.apache.maven.execution.MavenSession roleHint: ?What is the difference between the two options? What do I have to change in order to have my extension working in older Maven versions (down to 3.1.1) by installing it into the lib/ext directory? Chris Kind regards Karl Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
AW: Packaging Maven Core Extensions
Hi, the code is here: https://github.com/apache/flex-utilities/tree/develop/mavenizer/maven-extension The provided scope was the tip that got my fat-jar running in lib/ext for Maven 3.1.1 ... Unfortunately it seems to only run in Maven 3.3.1 ... if I try it in 3.2.2 or 3.1.1 I get errors :-( Chris -Ursprüngliche Nachricht- Von: Karl Heinz Marbaise [mailto:khmarba...@gmx.de] Gesendet: Samstag, 18. April 2015 18:51 An: Maven Users List Betreff: Re: Packaging Maven Core Extensions Hi, are you running from within Jenkins ? On 4/18/15 6:26 PM, Christofer Dutz wrote: Hi, I have just finished a small maven core extension containing an EventSpy. It's working nicely if I include it into my build using Maven 3.3.1 and a .mvn/extensions.xml, but I couldn't get it working by copying the jar to the MAVEN_HOME/lib/ext directory (I even tried a shaded jar). All I am getting are these warnings: [WARNING] Failed to notify spy org.apache.flex.utilities.converter.mavenextension.FlexEventSpy: java.util.NoSuchElementException role: org.apache.maven.execution.MavenSession roleHint: ?What is the difference between the two options? What do I have to change in order to have my extension working in older Maven versions (down to 3.1.1) by installing it into the lib/ext directory? Chris Kind regards Karl Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: what are some best practices for maven artifact naming when multiple code branches exist?
Makes sense - thanks! On Apr 18, 2015 12:43 PM, Sander Verhagen san...@sanderverhagen.net wrote: I've searched a lot about this subject in the past. And we're currently using what Anders described. For completeness sake: you could possibly abuse classifiers for this as well. Sander Verhagen [ san...@sanderverhagen.net ] NOTICE: my e-mail address has changed. You may still e-mail me at verha...@sander.com but you will see me using san...@sanderverhagen.net from now on. Feel free to update your address book. Original message From: Anders Hammar and...@hammar.net Date:18/04/2015 12:35 (GMT-08:00) To: Maven Users List users@maven.apache.org Cc: Subject: Re: what are some best practices for maven artifact naming when multiple code branches exist? I would add a suffix to the version for each branch. For example, if trunk is 1.0.0-SNAPSHOT, feature branch A would get version 1.0.0-featureA-SNAPSHOT. /Anders On Sat, Apr 18, 2015 at 9:10 PM, Nikita Tovstoles nikita.tovsto...@gmail.com wrote: Suppose we have an app that's being developed on trunk and a couple of branches simultaneously - and we'd like to publish artifacts from each dev branch into our maven repo (so that we can run a cluster for each code branch). Currently the 'V' in GAV equals our CI's build plan execution number. What are some approaches for differentiating GAVs between each code branch? I can think of: 1) using different artifact names (ie myapp for trunk, myapp-b1 for branch1 version, etc) 2) reset version numbers so that trunk's starts at 100, branch 1 starts at 10,000, etc (unlikely to collide in our case but seems cheesy) 3) Something else? thanks -nikita
RE: what are some best practices for maven artifact naming when multiple code branches exist?
I've searched a lot about this subject in the past. And we're currently using what Anders described. For completeness sake: you could possibly abuse classifiers for this as well. Sander Verhagen [ san...@sanderverhagen.net ] NOTICE: my e-mail address has changed. You may still e-mail me at verha...@sander.com but you will see me using san...@sanderverhagen.net from now on. Feel free to update your address book. Original message From: Anders Hammar and...@hammar.net Date:18/04/2015 12:35 (GMT-08:00) To: Maven Users List users@maven.apache.org Cc: Subject: Re: what are some best practices for maven artifact naming when multiple code branches exist? I would add a suffix to the version for each branch. For example, if trunk is 1.0.0-SNAPSHOT, feature branch A would get version 1.0.0-featureA-SNAPSHOT. /Anders On Sat, Apr 18, 2015 at 9:10 PM, Nikita Tovstoles nikita.tovsto...@gmail.com wrote: Suppose we have an app that's being developed on trunk and a couple of branches simultaneously - and we'd like to publish artifacts from each dev branch into our maven repo (so that we can run a cluster for each code branch). Currently the 'V' in GAV equals our CI's build plan execution number. What are some approaches for differentiating GAVs between each code branch? I can think of: 1) using different artifact names (ie myapp for trunk, myapp-b1 for branch1 version, etc) 2) reset version numbers so that trunk's starts at 100, branch 1 starts at 10,000, etc (unlikely to collide in our case but seems cheesy) 3) Something else? thanks -nikita
AJ to Java converter plugin?
Good Evening Gentlemen glad you could take a brief respite from eating red-hot texas chili and riding broncing bucks I am seeking a plugin to convert aspectj (aj) files to plain java does such a plugin exist? Enjoy Austin! Martin __