Re: dependency plugin - thoughts on providing a list of classes required at runtime to use with dependency:analyze?
Hi Ryan, Two questions - How do I use the analyzer configuration parameter to swap out the analyzer component (do I just add an artifact to the plugin dependency that contains my analyzer and specify the class in the analyzer configuration? - is there a way for me to have my analyzer take additional configuration parameters?) [I've searched for a while, but haven't found any examples, either for this plugin or for swapping components in general in maven] The component is created by Plexus (a IoC container), have a look at http://plexus.codehaus.org/. This is true for Maven 2.x , I'm not sure if Maven 3 is still using Plexus or has transitioned to Guice already. Basically, you need to bundle your custom dependency analyzer with a components.xml file that describes how to wire your beans and there is also support for some special pre-processed annotations (inside JavaDoc comments) that allow you inject data from the configuration/ section of the plugin. You might want to check out https://github.com/toby1984/maven-dependency-analyzer-spring as a starting point. Tobias For things that are marked as required at runtime but have no artifacts providing them - there should probably be a new category in the reporting for the class itself Classes needed at runtime but are not found in any declared or undeclared dependency: and have it dump out the class names that aren't found in any of the dependencies or transitive dependencies. (Or it could just print error level warnings when it can't find a class in the artifacts anywhere) Ryan - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
build a maven module project - activation of profile in module
Dears, I'm having an issue with profiles in maven. Maven version: 2.2.1 *Situation*: I have the following project structure: main-parent |__ Module project |__ module1 |__ module2 |__ ... *Target*: I have used and written some plug-ins to do some packaging and create a new file in the package: - These plug-ins are executed sequentially. - These plug-ins should be launched while building for some (not all) projects. - These plug-ins should be used by other developers, preferably without doing to much configuration. *Solution*: - The plug-ins are declared in a profile in the parent-pom. - The profile will be activated if a certain condition is met (condition: the existence of some file) *Result* If a module is build where the condition is met for the profile, the profile is activated -- works fine *Problem* If the Module project (see image above) is build, then the profile is not activated in its modules, even if the condition for the profile is met in a module. *Reason* The conditions for the profile to be activated is evaluated in the module project and not evaluated again in its modules. The outcome is inherited in its modules. The profile needs not to be launched in the module project, so the condition is false. Therefor the condition is automatically false in its modules (as it is not evaluated again). This is because maven will only evaluate the profile from the module project where the build is done. *Issue* Ideally, if the build is launch from the module project, even if the condition is not met in the module project, it should still be evaluated again in its modules. Off course, the work around is to copy the plug-ins in the build of the project where these plug-ins should be fired. This is however not what I want, as I would like to automate this process as much as possible. Is it possible to somehow force the profile to be evaluated again in the modules? If yes, what is the approach? Best practices? thanks for any help! -- View this message in context: http://maven.40175.n5.nabble.com/build-a-maven-module-project-activation-of-profile-in-module-tp4868768p4868768.html Sent from the Maven Developers mailing list archive at Nabble.com. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: build a maven module project - activation of profile in module
No, that is not possible. Profiles themselves are not inherited, but simply the result of them are. So, the behavior you're seeing is correct. /Anders (mobile) Den 4 okt 2011 16.25 skrev GlWyBnp glenn.w...@bnpparibasfortis.com: Dears, I'm having an issue with profiles in maven. Maven version: 2.2.1 *Situation*: I have the following project structure: main-parent |__ Module project |__ module1 |__ module2 |__ ... *Target*: I have used and written some plug-ins to do some packaging and create a new file in the package: - These plug-ins are executed sequentially. - These plug-ins should be launched while building for some (not all) projects. - These plug-ins should be used by other developers, preferably without doing to much configuration. *Solution*: - The plug-ins are declared in a profile in the parent-pom. - The profile will be activated if a certain condition is met (condition: the existence of some file) *Result* If a module is build where the condition is met for the profile, the profile is activated -- works fine *Problem* If the Module project (see image above) is build, then the profile is not activated in its modules, even if the condition for the profile is met in a module. *Reason* The conditions for the profile to be activated is evaluated in the module project and not evaluated again in its modules. The outcome is inherited in its modules. The profile needs not to be launched in the module project, so the condition is false. Therefor the condition is automatically false in its modules (as it is not evaluated again). This is because maven will only evaluate the profile from the module project where the build is done. *Issue* Ideally, if the build is launch from the module project, even if the condition is not met in the module project, it should still be evaluated again in its modules. Off course, the work around is to copy the plug-ins in the build of the project where these plug-ins should be fired. This is however not what I want, as I would like to automate this process as much as possible. Is it possible to somehow force the profile to be evaluated again in the modules? If yes, what is the approach? Best practices? thanks for any help! -- View this message in context: http://maven.40175.n5.nabble.com/build-a-maven-module-project-activation-of-profile-in-module-tp4868768p4868768.html Sent from the Maven Developers mailing list archive at Nabble.com. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
unit test
Hi community, This is my first time working with maven, I wanna develop a web application; so i used maven-webapp archetype now i wanna add my unit tests using junit but i'm not finding the src/test/java ,can i create it under Java Resources folder. Thank u in advance -- View this message in context: http://maven.40175.n5.nabble.com/unit-test-tp4869331p4869331.html Sent from the Maven Developers mailing list archive at Nabble.com. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
RE: unit test
Hi, http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Just create any missing folder if you need it. -Robert Date: Tue, 4 Oct 2011 09:23:56 -0700 From: amy...@live.fr To: dev@maven.apache.org Subject: unit test Hi community, This is my first time working with maven, I wanna develop a web application; so i used maven-webapp archetype now i wanna add my unit tests using junit but i'm not finding the src/test/java ,can i create it under Java Resources folder. Thank u in advance -- View this message in context: http://maven.40175.n5.nabble.com/unit-test-tp4869331p4869331.html Sent from the Maven Developers mailing list archive at Nabble.com. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
RE: unit test
Thank u for quick response , i've another question i'll use jpa should i create a submodule for this? Thank u in advance -- View this message in context: http://maven.40175.n5.nabble.com/unit-test-tp4869331p4869564.html Sent from the Maven Developers mailing list archive at Nabble.com. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
RE: unit test
Please don't confuse this mailing list with a superb version of Google. http://lmgtfy.com/?q=maven+jpa probably not. -Robert btw. the dev@ is used for maven development, next time use users@ Date: Tue, 4 Oct 2011 10:15:49 -0700 From: amy...@live.fr To: dev@maven.apache.org Subject: RE: unit test Thank u for quick response , i've another question i'll use jpa should i create a submodule for this? Thank u in advance -- View this message in context: http://maven.40175.n5.nabble.com/unit-test-tp4869331p4869564.html Sent from the Maven Developers mailing list archive at Nabble.com. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org