Re: Indirect dependency of sub modules problem.
What version of Maven are you using? Have you tried 3.0.1? Out of a module design perspective, I find your structure strange and I think that you should try to re-arrange. In some sense you do have cyclic dependencies, as utils depends on mid, while mid depends on utils. /Anders On Tue, Jan 4, 2011 at 03:19, Hayarobi Park wrote: > Hello, > > I'm managing maven project of my team, and having truble in module > dependencies.. > > The root project has some sub modules. > A submodule named "utils" has a few submodule; config, logger, json and > etc. > Another submodule "mid" has "manager" submodule, which are pom project and > has core, clientAPI and protocol sub modules. > > The problem is that utils:config depends on mid:manager:clientAPI, > mid:manager:clientAPI depends on utils:logger and utils:json, and the other > modules in mid:manager depend on submodules utils, including config. There > are not cyclic, but twisted dependencies, and maven can't solve the > dependency well. > > I have to do tedius steps to build whole project in the new configuration. > 1. install utils first, maven complains and stop building utils:config > since mid:manager:clientAPI was not installed yet, just after installing > utils pom project. > 2. go to utils:logger and install, and for utils:json respectively. > 3. go to mid directory and install mid, maven will install mid and stop > further install caused by dependeny on utils:config of some other submodules > of mid. > 4. go to mid:manager and install it. > 5. go to mid:manager:clientAPI and install it. > 6. go to utils:config and install it. > 7. Finally, go to top level and install whole modules. > > How to solve this situation? > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Indirect dependency of sub modules problem.
Hello, I'm managing maven project of my team, and having truble in module dependencies.. The root project has some sub modules. A submodule named "utils" has a few submodule; config, logger, json and etc. Another submodule "mid" has "manager" submodule, which are pom project and has core, clientAPI and protocol sub modules. The problem is that utils:config depends on mid:manager:clientAPI, mid:manager:clientAPI depends on utils:logger and utils:json, and the other modules in mid:manager depend on submodules utils, including config. There are not cyclic, but twisted dependencies, and maven can't solve the dependency well. I have to do tedius steps to build whole project in the new configuration. 1. install utils first, maven complains and stop building utils:config since mid:manager:clientAPI was not installed yet, just after installing utils pom project. 2. go to utils:logger and install, and for utils:json respectively. 3. go to mid directory and install mid, maven will install mid and stop further install caused by dependeny on utils:config of some other submodules of mid. 4. go to mid:manager and install it. 5. go to mid:manager:clientAPI and install it. 6. go to utils:config and install it. 7. Finally, go to top level and install whole modules. How to solve this situation? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Cleaning a POM file
You can use dependency:analyze to identify unused dependencies: http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html On Mon, Jan 3, 2011 at 6:39 PM, ping.sumit wrote: > > hi, > I am new to the Maven and trying to clean a POM file. Please let me know > how > can I make sure if any plugins, repositories or dependencies are not in > use. > > Thanks in Advance > -- > View this message in context: > http://maven.40175.n5.nabble.com/Cleaning-a-POM-file-tp3326392p3326392.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Cleaning a POM file
1 Delete everything you are not sure. 2 run the desired goals such as install site 3 add back required stuff until step 2 success -Guo On 3 Jan 2011 23:39, "ping.sumit" wrote: > > hi, > I am new to the Maven and trying to clean a POM file. Please let me know how > can I make sure if any plugins, repositories or dependencies are not in use. > > Thanks in Advance > -- > View this message in context: http://maven.40175.n5.nabble.com/Cleaning-a-POM-file-tp3326392p3326392.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org >
Re: Cleaning a POM file
On 03/01/2011 6:39 PM, ping.sumit wrote: hi, I am new to the Maven and trying to clean a POM file. Please let me know how can I make sure if any plugins, repositories or dependencies are not in use. Thanks in Advance yes 1) You should only have your own repository. Get Nexus or one of the other free repos up and going 2) Plug-ins are used to do something. Look at each one to see where it is used in the pom 3) Dependencies are there to support software that is using imported classes. Can not be determined by looking at the POM. 1 and 2 are easy. 3 is work. Ron - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Cleaning a POM file
hi, I am new to the Maven and trying to clean a POM file. Please let me know how can I make sure if any plugins, repositories or dependencies are not in use. Thanks in Advance -- View this message in context: http://maven.40175.n5.nabble.com/Cleaning-a-POM-file-tp3326392p3326392.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Profile and dependencies not activated
> Thanks for your reply. I've moved the profile to the enterprise pom and > is being activated now. > Still the libraries are not resolved while compiling even when > dependency:tree resolves them just fine with the right versions. Why are you using profiles at all? Can you post a sample of what's not working? Try mvn help:effective-pom to see what Maven "sees" as it is building your project. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Resource-Plugin
Hi all, I was playing around with the resource-plugin to copy several resources around in my project, and found a problem with the plugin. It appears that the parameter 'includeEmptyDirs' is not always (!) being obeyed. From what I can see, it works when I configure several resources and do NOT specify a 'targetPath' on them. The problem is that I don't want all resources in the same location. As a workaround I now define several executions, but I was wondering if this is a known issue and if others may have found another way to accomplish this. If nobody ever noticed, I might create a JIRA and maybe attach a patch for it. Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Profile and dependencies not activated
Thanks for your reply. I've moved the profile to the enterprise pom and is being activated now. Still the libraries are not resolved while compiling even when dependency:tree resolves them just fine with the right versions. -Original Message- From: Justin Edelson To: Maven Users List , iapazm...@sri.gob.ec Subject: Re: Profile and dependencies not activated Date: Thu, 30 Dec 2010 12:27:10 -0500 This is the expected behavior. Profiles are a build-time concern and are not taken into account when in a dependency's pom. There's got to be a lot of discussion in the list archives about this. Justin 2010/12/30 Pazmiño Mazón, Iván Andrés Hello, I've this multimodule project which inherits from an enterprise pom. The structure is as follows, there is an enterprise pom (ep) where I keep some common libraries to every project in the company so every project extends from this one. There's also a multimodule project with some children project, which of course extends the ep. And, there is a third project which only holds some libraries and a profile. The library project doesn't extend from the ep. The library project is added for dependency management inside the ep project. One child of the multimodule project needs the libraries inside the library project and also needs to activate the profile. When I build the dependency tree on the child project I can see every dependency added to the library project, but, when building the artifact it fails because it doesn't find the dependencies in the classpath and the profile is not been activated. I tried putting the the libs versions on the child project but didn't work either. Any ideas? Thanks, IP - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org "Clausula de Confidencialidad: La información contenida en el presente mensaje es confidencial, está dirigida exclusivamente a su destinatario y no puede ser vinculante. El Servicio de Rentas Internas no se responsabiliza por su uso y deja expresa constancia que en los registros de la Institución consta la información originalmente enviada. Este mensaje está protegido por la Ley de Propiedad Intelectual, Ley de Comercio Electrónico, Firmas y Mensajes de datos, reglamentos y acuerdos internacionales relacionados. Si usted no es el destinatario de este mensaje, recomendamos su eliminación inmediata. La distribución o copia del mismo, está prohibida y será sancionada de acuerdo al Código Penal y demás normas aplicables. La transmisión de información por correo electrónico, no garantiza que la misma sea segura o esté libre de error, por consiguiente, se recomienda su verificación.Toda solicitud de información requerida de manera oficial al SRI debe ser ingresada por Secretaría General y dirigida a la máxima autoridad de la Institución, conforme a la Ley y demás normas vigentes." - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Two classes with same name in src/main/java and src/test/java
Hello, You could use jmockit [1] and replace the functionality in MapData. Or you could change the Feature class to accept MapData as contructor arg or with setter and replace it in tests with another implementation of MapData... br, Samuli [1] http://code.google.com/p/jmockit/ On 3.1.2011 10:35, Manuel Doninger wrote: Hi, i have the following constellation: I have a class Feature.java and a class MapData.java in my folder src/main/java. The Feature contains some work to do, and the MapData is contains a HashMap which is populated with data from a database and their methods are called in Feature. Now i want to write unit tests for my class Feature, but i don't want to start a database connection if the MapData is called. So i thought about creating a class MapData in my folder src/test/java, which contains all methods like my real MapData, but with test data in it. If i call "mvn test", i get some strange errors, like NoSuchMethodErrors etc. If i exclude the src/main/java/MapData in my Eclipse Build Path, then the tests run fine. I have now 2 questions: 1. Why does Maven consider my Eclipse build path? I thought, if i run maven from my command line, only the pom.xml applies. 2. How can i solve my problem? Is there a possibility to exclude my src/main/java/MapData in my pom, with the surefire plugin? Thank you for your suggestions, Manuel - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Remion Oy Etävalvontajärjestelmät liiketoiminnan Samuli Saarinen tehostamiseen gsm +358 (0)50 3560075 fax +358 (0)3 2125064 www.remion.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Best practice for integration testing (IT)?
As far as I know, the same. There is no change out of a user's perspective when using Maven 3.0. /Anders On Sun, Jan 2, 2011 at 19:57, Guo Du wrote: > Happy New Year everyone, > > maven-failsafe-plugin was used in [1] to perform IT. Both [1] and [2] > mentioned src/it/java, in 3.X, what's the current recommended way to > do the IT in terms of layout/plugin? > > Thanks! > > -Guo > > [1] > http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing > [2] > http://docs.codehaus.org/display/MAVEN/best+practices+-+testing+strategies > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Two classes with same name in src/main/java and src/test/java
Hi, i have the following constellation: I have a class Feature.java and a class MapData.java in my folder src/main/java. The Feature contains some work to do, and the MapData is contains a HashMap which is populated with data from a database and their methods are called in Feature. Now i want to write unit tests for my class Feature, but i don't want to start a database connection if the MapData is called. So i thought about creating a class MapData in my folder src/test/java, which contains all methods like my real MapData, but with test data in it. If i call "mvn test", i get some strange errors, like NoSuchMethodErrors etc. If i exclude the src/main/java/MapData in my Eclipse Build Path, then the tests run fine. I have now 2 questions: 1. Why does Maven consider my Eclipse build path? I thought, if i run maven from my command line, only the pom.xml applies. 2. How can i solve my problem? Is there a possibility to exclude my src/main/java/MapData in my pom, with the surefire plugin? Thank you for your suggestions, Manuel - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org