Re: maven archiva vs. maven repo
On Fri, Apr 11, 2008 at 12:33 PM, [EMAIL PROTECTED] wrote: This is a very common pitfall Maven users can fall in. You are using a local repository as remote repository. I thought there was some information on the maven site about the differences between remote and local repositories, but the most important one is: A local repository stores snapshots different than a remote one. If you use a local repository as a remote repository, Maven can't tell that a snapshot artifact has changed, so you won't get the newer snapshot. (You can only get the newer one, if you manually remove the snapshot from your own local repository. This can be very tricky) Hth, Nick S. [snip] Maybe the problem is terminology. To me local repository means a repository stored locally; e.g.: if I mirror the central repo on my hard drive, I have a local repository. The ${user.home}/.m2/repository folder should perhaps be referred to as local cache. I don't think anyone would expect a local cache to be shared or used the same way that the central repository is. (my $.02) -trevor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Documentation on profile activation by property
Is there documentation available on the specifics of profile activation? I think I read somewhere that activation property namestage/name value!test/value /property /activation will activate a profile if the stage property does NOT have the value test, but I can't remember where. Thanks -trevor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Documentation on profile activation by property
Thanks. Right after I posted that I found this as well: http://docs.codehaus.org/display/MAVENUSER/Profiles On Fri, Apr 11, 2008 at 3:19 PM, Matt Campbell [EMAIL PROTECTED] wrote: I've found a little documentation and a blog posting that may be of help to you. http://maven.apache.org/guides/introduction/introduction-to-profiles.html http://techpolesen.blogspot.com/2007/08/maven-profiles-activation-by-property.html On 4/11/08, Trevor Torrez [EMAIL PROTECTED] wrote: Is there documentation available on the specifics of profile activation? I think I read somewhere that activation property namestage/name value!test/value /property /activation will activate a profile if the stage property does NOT have the value test, but I can't remember where. Thanks -trevor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cobertura + surefire config
As far as I am aware this is a known issue with no resolution. Perhaps we can get the cobertura plugin to expose a report-only goal and always do instrumentation for the tests. That was the approach I used to use with ant. On Tue, Mar 25, 2008 at 12:13 PM, Brian Relph [EMAIL PROTECTED] wrote: Hello, I was wondering if someone could help me fix my surefire + cobertura config. I only want one unit tests to run ONE time, but when I add the cobertura-maven-plugin to the reporting section, it seems to trigger another surefire:test phase. Any help? Here is my current config: build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId version2.2/version executions execution idsite/id phasepre-site/phase goals goalclean/goal /goals /execution execution idinstrument/id phasesite/phase goals goalinstrument/goal goalcobertura/goal /goals /execution /executions /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.3.1/version configuration forkModeonce/forkMode systemProperties property name net.sourceforge.cobertura.datafile /name value target/cobertura/cobertura.ser /value /property /systemProperties /configuration /plugin /plugins ... /build reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactId maven-project-info-reports-plugin /artifactId version2.0.1/version reportSets reportSet reports reportdependencies/report reportcim/report reportproject-team/report reportsummary/report reportissue-tracking/report reportscm/report reportindex/report /reports /reportSet /reportSets /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId version2.4.2/version reportSets reportSet reports reportreport-only/report /reports /reportSet /reportSets /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId version2.2/version /plugin ... /reporting -- Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cobertura + surefire config
Ok; understood. So the correct course of action is to prominently document why it is a bad idea to run tests solely on instrumented code; I've seen this question come up once or twice. Unfortunately this isn't the list to discuss that, is it? On Tue, Mar 25, 2008 at 3:05 PM, Stephen Connolly [EMAIL PROTECTED] wrote: And while ANT lets you make that mistake, I would encourage you to run the tests twice and you will have greater assurance that your code is correct if it passes instrumented and uninstrumented. (Better assurance still is to run with BEA, IBM and Sun's JVMs on both single core and multi-core machines, with linux and windows as the OS) - You kinda need Hudson's matrix projects to run those boys for you though!) -Stephen On Tue, Mar 25, 2008 at 4:54 PM, Trevor Torrez [EMAIL PROTECTED] wrote: As far as I am aware this is a known issue with no resolution. Perhaps we can get the cobertura plugin to expose a report-only goal and always do instrumentation for the tests. That was the approach I used to use with ant. On Tue, Mar 25, 2008 at 12:13 PM, Brian Relph [EMAIL PROTECTED] wrote: Hello, I was wondering if someone could help me fix my surefire + cobertura config. I only want one unit tests to run ONE time, but when I add the cobertura-maven-plugin to the reporting section, it seems to trigger another surefire:test phase. Any help? Here is my current config: build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId version2.2/version executions execution idsite/id phasepre-site/phase goals goalclean/goal /goals /execution execution idinstrument/id phasesite/phase goals goalinstrument/goal goalcobertura/goal /goals /execution /executions /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.3.1/version configuration forkModeonce/forkMode systemProperties property name net.sourceforge.cobertura.datafile /name value target/cobertura/cobertura.ser /value /property /systemProperties /configuration /plugin /plugins ... /build reporting plugins plugin groupIdorg.apache.maven.plugins/groupId artifactId maven-project-info-reports-plugin /artifactId version2.0.1/version reportSets reportSet reports reportdependencies/report reportcim/report reportproject-team/report reportsummary/report reportissue-tracking/report reportscm/report reportindex/report /reports /reportSet /reportSets /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId version2.4.2/version reportSets reportSet reports reportreport-only/report /reports /reportSet /reportSets /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId version2.2/version /plugin ... /reporting -- Brian - To unsubscribe, e-mail: [EMAIL PROTECTED
Re: [POLL] Why are you not able to use the most recent maven release?
I'm responsible for the technical architecture of many projects at my location. One project in particular (still in active development with code released to production) will likely never upgrade past 2.0.4 because of the changes to dependency resolution. Although these changes are a good thing, problems will not show up in a build, but in the runtime environment; the most problematic ones are class loading issues with WebSphere, but occasionally I have had to deal with invalid class errors because somehow commons-collections 2.0 made it into the war when the project was compiled and tested against 3.2. Anyway, I'm rambling. The project does not want to upgrade because we would likely need to stop all work for at least two days for a complete system test / regression test / fix pom cycle. After spending many weeks overall resolving issues that were deemed to be maven brain damage nobody wants the hassle. I am having success at convincing newer projects to start out using 2.0.8; so I am wondering how to easily maintain two maven versions for us developers on the technical architecture team -- is it as simple as swapping out MAVEN_HOME? Thanks -trevor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ojdbc Dependency Issue
I do want to point out that 14 is not the version of ojdbc. It's the J2SE version that that jar supports; classes12 is for java 1.2, ojdbc14 is for java 1.4, ojdbc5 and ojdbc 6 are for java 5 and 6 respectively. You should probably be referencing the jars as dependency groupIdcom.oracle/groupId artifactIdojdbc14/artifactId version10.2.0.3.0/version /dependency But as mentioned above you will need to deploy the jar to a repository that you control. Short of that is creating a simple batch / shell script that developers can run to install the jar to their local repositories. On Mon, Mar 10, 2008 at 12:12 PM, TJ Greenier [EMAIL PROTECTED] wrote: I am trying to find the Oracle Ojdbc14.jar file in the maven repository so that I can successfully add this as a dependency in my pom.xml. I have searched online and through the archives and all references point to the following: dependency groupIdojdbc/groupId artifactIdojdbc/artifactId version14/version /dependency However, when I browse the repo ( http://repo1.maven.org/maven2/ojdbc/ojdbc/14/) the pom file exists, but not the jar file. Likewise I considered using classes12.jar and found the same problem. The pom file exists but there is no jar file. Am I going about this the right way? Does anyone know of a repository where this file exists? I did use the install plugin to push the file locally, but I want to simplify the process for my development team. Any thoughts would be appreciated. Thanks, TJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: specifying version of Ant to use for maven-ant-run
On Tue, Feb 26, 2008 at 5:07 PM, Marshall Schor [EMAIL PROTECTED] wrote: Dennis Lundberg wrote: ... There is an issue for this in JIRA already: http://jira.codehaus.org/browse/MANTRUN-68http://jira.codehaus.org/browse/MANTRUN-68 I see that issue is more than a year old, and is still open. Until this is fixed, is there a recommended work-around? -Marshall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Would it be possible to add a relocation to the central repo like was done for ehcache (ehcache:ehcache:1.2 - net.sf.ehcache:ehcache:1.2)? It seemed to work transparently in that case. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mvn install/deploy (2.0.4) does not install/deploy sources, tests, or test sources when building a tagged project with release poms
When I run 'mvn install' or 'mvn deploy' from a tag (created with the maven-release-plugin and keeping the release poms) the sources, tests, and test-sources artifacts are not installed or deployed. After I delete the release poms the project builds, installs, and deploys correctly. Is there a way to get maven to deploy these artifacts or do i have to revert and re-tag? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: double build
how do you do this if you need both? do you have to run maven twice, once for each profile? Thanks On Jan 29, 2008 8:24 AM, Erez Nahir [EMAIL PROTECTED] wrote: Hi supareno, Maven profile is your friend in this case, see http://maven.apache.org/guides/introduction/introduction-to-profiles.html search for jdk to see how you can activate a profile based on JDK version. Erez. On Jan 29, 2008 1:50 PM, supareno [EMAIL PROTECTED] wrote: hello, i need to do a double compilation - one for java 6 - one for java 5 (with specifics jars) for the moment, i have two projects with differents POMs. is it possible to do this with single POM file? can i merge them with two 'build' tag?? is anybody has ever done this? regards supareno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: surefire-report-plugin running tests of all dependent modules again?
I would like to second this sentiment. Is there a plugin that can add the current plugin version information to the pom? I also definately think this information should be added to poms processed with the release plugin (if it isn't already). Thanks On Jan 29, 2008 5:49 PM, Joerg Hohwiller [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 | Hi Jörg, Hi Stefan, | | this is also what I see here (see my post about M2 multi-project site | build is broken). | All tests are run for each project in the reactor. I think we could file | an issue for each of the affected plugins, but this seems more like a | maven generic issue. Something was fixed with devastating effects for | a lot of plugins. What maven version are you using? I am using maven 2.0.8 Everything works fine if I explicitly set the version of the surefire-report-plugin to 2.3 and goes wrong if I use 2.4 I did not have the same problem with other plugins. Could you track this down? Though I know that the latest site-plugin is buggy as well as the latest javadoc-plugin. But this are other problems. If you want freedom with maven you need to define the versions of all plugins explicitly in your toplevel pom. That is what I learned in a bloody bad lessen with maven. The plugin developers often do not know the impact of releasing buggy plugins. There are thousands of maven users that suddenly have a broken build and no idea what is wrong. I am using maven from the early days now and switched to maven2 over 2,5 years ago. With maven2 I want to build my code and the project website. The site of a multi-project build was a problem for years and even though patches are attached to jira for fixing related plugins such as cobertura it is still not fixed. Sometimes you need to be patient. However maven2 is excellent already and I have big hopes for maven 2.1 all that is going on with mojo, etc. After a lot of pain with maven1 I am happy to see a product with a design and a concept. Thanks to all the great workers of the maven team! | | Stefan Regards Jörg -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHn62GmPuec2Dcv/8RAtzeAJ92rvs3JmZmkseghuWYW1/N+GsDRQCfXSxI 8P1+VCIkc4HEJIKxZjXnZZs= =SZo2 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Replacement for Ant's FixCRLF
As noted at the end of the antrun plugins' usage page (http://maven.apache.org/plugins/maven-antrun-plugin/usage.html) the resources plugin can be used in lieu of Ant's FixCRLF task. Any example on how to do this when the build takes place on a windows continuous build server and the assembly deployment is to a unix machine (requiring unix line endings for the shell scripts)? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems with mvn2, Spring and Hibernate... anyone could help?
The problem is with the ability of the JVM to enumerate resources in the root of the classpath when these resources are in jars. The mappingJarLocations property would be used to search through jars that are *not* normally on the classpath, so you shouldn't be using that for WEB-INF/lib jars; in some cases you would cause hibernate to read the mapping files twice, once for the jar on the classpath, and once for the jar in the mappingJarLocations -- they just happen to be the same physical jar. The best fix is to create all the hbm.xml files in a subpackage of src/main/resources -- perhaps com/project/domain; then use a resource pattern like classpath*:/com/project/domain/**/*.hbm.xml. On 7/5/07, Marco Mistroni [EMAIL PROTECTED] wrote: Hello Jon actually it has nothing to do with maven, as i discovered later.. since scope=compile will be visible in the test it has to do with Spring classloading actually.. i'll post a solution here as soon as i finish to try some code i found on the web with kindest regards marco On 7/5/07, Jon SlinnHawkins [EMAIL PROTECTED] wrote: I think this may be a problem with Surefire and the way spring uses classloaders : http://jira.codehaus.org/browse/SUREFIRE-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel If you find a solution please post Thanks Marco Mistroni wrote: hi all, i know i should post this to maven list but it is about spring and i am sure someone here is using maven for building its environment I have an app composed of 3 project: - domain OBjects , contains domain objects used by web and backend project - backend project contains hibernate code - webapp contains webwork code that uses hibernate to access database i have been searching for solutions for not hardcoding hibernate mapping files.. i came across mappingJarLocations where you can specify jars where hbm.xml file are located. this is fine, however i am building my project using maven2 and i am setting the dependency scope for domainObjects.jar on my backend project.. if i use scopetest/scope test will fail because spring won't be able to find hbm.xml file (jar is not in classpath) if i use scopecompile/scope jar won't be in test classpath i was wondering if anyone on this forum came across same situation... here's my spring context... bean id=sessionFactory class= org.springframework.orm.hibernate3.LocalSessionFactoryBean property name=dataSource ref bean=dataSource/ /property property name=mappingJarLocations valueclasspath*:domainObjects-1.0-SNAPSHOT.jar/value /property property name=hibernateProperties ref bean=exampleHibernateProperties / /property /bean thanks in advancea nd regards marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Maven, Hibernate and Spring
You should be referencing the hibernate mappings as classpath:/path/to/**/*.hbm.xml. Having a path is imoprtant -- do not just dump the config files for spring or hibernate in the top level of src/main/resources; then in the resource location specify at least one folder in the package structure before using any wildcards; this is to work around a known issue with the JVM and wildcard pattern matching. See the documentation for the pattern matcher (http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/core/io/support/PathMatchingResourcePatternResolver.html). Note in Spring 2.x you should be using classpath*:/etc/etc, not just classpath:. As for leaving the config outside the jar for assemblies, configure the assembly profile as follows: Several tricks are used to achieve the result: * The main resources go to (effectively) target/config * The main classes still go to target/classes * The jar plugin is explicitly told to only include the classes * The surefire plugin is told to skip tests * The assembly plugin is configured as normal. The reason that you cannot run tests is because the normal configs (if your tests rely on them) are no longer in the classapth, and there is no way I can figure to get maven to add an arbitrary folder to the classpath (despite the build being told where the resources are :-/ ). Because this is an abberation, the assembly execution cannot coincide with the normal development execution. Anyway, here's the pom: profile idassembly/id build resources resource directorysrc/main/resources/directory targetPath../config/targetPath /resource /resources plugins plugin artifactIdmaven-jar-plugin/artifactId executions execution goals goaljar/goal /goals configuration classesDirectorytarget/classes/classesDirectory /configuration /execution /executions /plugin plugin artifactIdmaven-surefire-plugin/artifactId configuration skiptrue/skip /configuration /plugin plugin artifactIdmaven-assembly-plugin/artifactId executions execution phasepackage/phase goals goalassembly/goal /goals /execution /executions configuration descriptors descriptorsrc/assembly/dos.xml/descriptor /descriptors outputDirectorytarget/artifacts/outputDirectory workDirectorytarget/assembly/work/workDirectory /configuration /plugin /plugins /build /profile See the documentation on the maven assembly plugin for how to create assemblies. -t. On 4/14/07, Colin Young [EMAIL PROTECTED] wrote: I'm building a project that uses Spring and Hibernate with Maven. So far I've been able to get a jar of just my project or a jar of everything with dependencies (using assembly:assembly). Unfortunately, when I do the with dependencies build, I'm getting errors from Spring trying to find the Hibernate mapping files inside the jar. They are in the same location inside the jar as in the non-dependency jar (and the same as the manually built jars from the pre-Maven builds). I'm using the standard Maven directory structure for my project. Is there something special about the with dependency jars? Is there a special way I need to specify the classpath? Previously I was able to just specify the jar as part of the classpath, but that doesn't seem to be working for the Maven-built jar. Also, the assembly:assembly build is placing my Spring xml configuration and properties files inside the jar. I'm having a bit of trouble figuring out how to configure my pom to achieve that, since the documentation is a bit sparse. Does someone have an example of how to do that? Thanks Colin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Creating a target/lib with all project dependencies
the build-classpath seems to be broken on windows: c:\webarch\.maven-local-repo\aopalliance\aopalliance\1.0\aopalliance-1.0.jar:c:\ webarch\.maven-local-repo\asm\asm\1.5.3\asm-1.5.3.jar:c:\webarch\.maven-local-re Its separating the elements with ':' not ';' -- did someone not use File.PATH_SEPARATOR ? On 4/14/07, Napoleon Esmundo Ramirez [EMAIL PROTECTED] wrote: Hello Craig, You can use the maven-dependency-plugin's copy/copy-dependencies goals for that. But if you just need the classpath, try `mvn dependency:build-classpath'. Please read here http://maven.apache.org/plugins/maven-dependency-plugin Cheers! Nap On 4/14/07, Craig L Russell [EMAIL PROTECTED] wrote: I'm trying to have maven build a target/lib that contains all of the runtime dependencies of the project so I can use lib/*.jar as an ant classpath. Is there a plugin that I can use that packages the dependencies into target/lib? I know that some plugins package this as part of their execution model but can't exactly figure out what I need to do to make this happen outside the plugin. Thanks, Craig Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exclude some classes when package a jar.
How would you post process a jar and what phase would that process be bound to? On 4/11/07, Jerome Lacoste [EMAIL PROTECTED] wrote: On 4/11/07, JesseLiu [EMAIL PROTECTED] wrote: All, I have a jar project. When packaging, I want some specified class excuded from the jar file. How should I do ? Thanks for any suggestions! not sure if this is possible before the packaging. You can always post-process your jar to remove some classes, but I wonder why you need that What kind of classes do you need to remove ? Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
commons-logging dependency
I'm trying to eliminate commons-logging from being transitively passed on to projects that depend on my library and my library uses spring. Spring uses commons-logging but doesn't mark it as optional or scope:provided, however when I try to exclude commons logging from a spring dependency, I no longer get it even though it is declared in my pom. Here's a simple pom which exposes the problem (maven 2.0.4): project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdsome.groupid/groupId artifactIdblah/artifactId packagingjar/packaging version1.0-SNAPSHOT/version nameblah/name urlhttp://maven.apache.org/url dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId version1.1/version scopeprovided/scope exclusions exclusion groupIdavalon-framework/groupId artifactIdavalon-framework/artifactId /exclusion exclusion groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId /exclusion exclusion groupIdlog4j/groupId artifactIdlog4j/artifactId /exclusion exclusion groupIdlogkit/groupId artifactIdlogkit/artifactId /exclusion /exclusions /dependency dependency groupIdorg.springframework/groupId artifactIdspring-dao/artifactId version2.0/version exclusions exclusion groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId /exclusion /exclusions /dependency /dependencies /project Now if you remove the commons-logging exclusion from the spring-dao dependency, commons-logging get correctly pulled down. Also note that this problem does NOT surface if I use spring-context even though the poms appear to be practically identical. Whats going on? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: commons-logging dependency
The problem arises when blah is used as a dependency in a downstream project that is not using commons logging at all (ie, slf4j); since that project will not have commons logging as a dependency it gets resolved and included in the project from the transitive dependency on spring-dao. Since it is not known why this is happening, is the only solution to have every project either exclude it from just about every framework dependency or declare it but never both? Did global transitive dependency exclusions make it into the feature set of maven? On 4/25/07, Wendy Smoak [EMAIL PROTECTED] wrote: On 4/25/07, Trevor Torrez [EMAIL PROTECTED] wrote: I'm trying to eliminate commons-logging from being transitively passed on to projects that depend on my library and my library uses spring. Spring uses commons-logging but doesn't mark it as optional or scope:provided, however when I try to exclude commons logging from a spring dependency, I no longer get it even though it is declared in my pom. You don't need the exclusion. Just declare commons-logging 1.1 and that will override the version coming from Spring. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Creating a target/lib with all project dependencies
Whats the jira url? I think I tried for something but I couldn't even figure out how to register. Thanks On 4/25/07, Brian E. Fox [EMAIL PROTECTED] wrote: Probably. Can you file a jira? -Original Message- From: Trevor Torrez [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 25, 2007 11:39 AM To: Maven Users List Subject: Re: Creating a target/lib with all project dependencies the build-classpath seems to be broken on windows: c:\webarch\.maven-local-repo\aopalliance\aopalliance\1.0\aopalliance-1.0 .jar:c:\ webarch\.maven-local-repo\asm\asm\1.5.3\asm-1.5.3.jar:c:\webarch\.maven- local-re Its separating the elements with ':' not ';' -- did someone not use File.PATH_SEPARATOR ? On 4/14/07, Napoleon Esmundo Ramirez [EMAIL PROTECTED] wrote: Hello Craig, You can use the maven-dependency-plugin's copy/copy-dependencies goals for that. But if you just need the classpath, try `mvn dependency:build-classpath'. Please read here http://maven.apache.org/plugins/maven-dependency-plugin Cheers! Nap On 4/14/07, Craig L Russell [EMAIL PROTECTED] wrote: I'm trying to have maven build a target/lib that contains all of the runtime dependencies of the project so I can use lib/*.jar as an ant classpath. Is there a plugin that I can use that packages the dependencies into target/lib? I know that some plugins package this as part of their execution model but can't exactly figure out what I need to do to make this happen outside the plugin. Thanks, Craig Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] Multiple ear generation
I need a way to load an arbitrary number of the same application EAR to a single websphere instance. The reason behind this is that during the test phases of software development several testers need to run the application cuncurrently without stepping on each other's toes. However, if an attempt is made to deploy the same application to websphere more than once, websphere rejects the duplicate application (probably with good reason ;) ). I'm looking for a best-practice kinda guideline to solve this problem. Ideally I would like to be able to run a single command to generate all the necessary EARs with the application.xml file modified as necessary to prevent websphere from rejecting the duplicate applications. A few of the ideas I have are: 1. Creating a separate profile for each test environment - The problem with this is that if an additional tester gets added to the team a wait cycle is introduced as the pom needs to be updated and the entire project pushed through the build cycle, not to mention the duplication and needless proliferations of nearly identical files and profiles information. 2. Creating a single separate profile for the test build which uses a supplied parameter/property to perform the necessary replacements in the application.xml file - The problem I see with this is that the test application.xml file may diverge from the production file, and profile properties do not override default properties, and command line properties are ignored if the property is specified in the pom / profile. 3. Create a script (probably ant) to generate the production EAR, and for each tester profile, unpack the ear, modify whatever, and repack as a different name. 4. Create a maven profile to do the above - Is this even possible as a single maven profile? Is it possible to run one maven command and perform the same build but using an arbitrary number of conflicting profiles to generate different artifacts? Number 4 would probably be the most ideal, but I'll settle for a standard way of doing number 2 or 3. thanks; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven releases and multiple development streams
What is the standard guidelines or procedures for working with multiple development streams (ie, trunk, product_test, bugfix_on_version_x) and using the release plugin? For streams that are moving through the testing process, do you create the product_test branch and when that is complete do the maven release from the product_test branch then merge the new pom back into trunk? For fixing a bug in an already released version do you branch to bug_fix_... from tags and work with the (released) pom as is? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: any way to read properties file from a POM ?
You can try http://jira.codehaus.org/browse/MOJO-535 -- I havent tried it so your milage may vary. It seems that these operations (reading properties from a file into the maven build and writing the current maven properties to a file) are highly desirable. Is there any reason why maven out-of-the-box lacks these features? On 3/29/07, Wayne Fay [EMAIL PROTECTED] wrote: Another option is to write a plugin which would read your properties file and attach the values to the Project, or perhaps to the SystemProperties somehow. But I don't really know how all that would work, or that it is even possible. I'm not much of a M2 plugin developer at this point. ;-) Wayne On 3/29/07, nicolas de loof [EMAIL PROTECTED] wrote: This would require to modify the dbunit and the sql plugins... I'll have to find another strategy. Thanks anyway. 2007/3/29, Wayne Fay [EMAIL PROTECTED]: Others have asked this previously, and the answer remains the same: this is not possible. Perhaps you could instead modify the dbunit plugin to read from a properties file. Wayne On 3/29/07, nicolas de loof [EMAIL PROTECTED] wrote: Hello, I'm using dbunit mojo to create a clean database before my integration-tests run. My DB configuration is set in the test classes via a properties file ( jdbc.properties) I'd like to avoid duplicating this info in my POM. How to set the POM to read the properties and set them as system properties (to be visible from the dbunit plugin) ? Any suggestion is welcome. Nico. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] Sources not grabbed for test dependencies
Is it possible to have the dependency plugin (or the eclipse plugin? not sure which is responsible for this bit when doing 'eclipse:eclipse') download the sources for dependencies with a classifier of tests? The problem seems to be that deployed test sources ends up with a classifier of test-sources and I think the dependency plugin is looking for tests-sources. Maybe this needs to be fixed with the source plugin? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] Transitive Dependency resolution is degrading the versions of my dependencies (i.e. commons-collections 3.2 down to 2.1)
[snip] Before reading that what did you think something like: version1.0/version meant? I'm actually interested in what general user opinion is here. Jason. I thought it meant 1.0 (period).
jetty plugin claspath issue
I'm developing a fairly large project consisting of many parts and dependencies; when running the web project in the jetty container using the maven-jetty-plugin (6.1-SNAPSHOT) I am getting what appears to be a classloader issue. Specifically I am getting a ClassCastException at TagHandlerPool.get(Class) line 116; I'm not sure where the sources are so I cannot be absolutely certain, but it appears (from using the debugger's variable inspector) that the tagpool is trying to obtain an instance of class org.apache.taglibs.standard.tag.el.core.IfTag and casting it to the Tag interface. This problem has only surfaced after an unrelated dependency (one of the other collaborating projects) was modified. The jsp line it seems to be failing on is: c:if test=${!currentPage}; I've tried changing the dependency on jstl to have a provided scope but mvn -X still shows it being selected for compile. I'm not sure where else to go from here. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
snapshot update policy
Something is wrong with the current snapshot update policy: I have a several projects going on concurrently; the first is intended to be a common components type project for the others, all are in concurrent development. The upstream project SNAPSHOT jars are *never* getting downloaded. I think this is because the upstream parent pom has an older version, so when maven checks for modifications it also checks the upstream parent pom, sees that it is not updated yet, and skips downloading the upstream child even though it is newer. This behaviour is dead wrong especially for an update policy of always. This is also breaking development within the downstream project as the project consists of 6 sub projects, and with one team working on the core subproject and another on the web subproject, this gets frustrating when we have to spend time trying to figure out why the projects are not compiling. Short of periodically deleting the artifacts from the local maven repo is there anything that can be done?
settings.xml and pom.xml repositories
Whats the precedence and overriding behaviour for repositories declared in the global settings.xml and in a pom.xml? Does that change when profiles are used?
eclipse plugin documentation incorrect
The pom.xml configuration documentation is wrong ( http://maven.apache.org/plugins/maven-eclipse-plugin/examples/prevent-module-references.html ); should be useProjectReferences not eclipse.useProjectReferences -- where do doc bug reports go?
Dependency management by license (type)
Is there a way, or are there some features in planning, to manage dependencies based on the license? What I would like is a report of licenses used by all dependencies (transitives included) and perhaps a means to reject (or warn the user about) certain license types, or only allow a build with certain license types. There should also be a means to specify what to do if the license type is invalid or missing; both as a default specification and on a case by case basis. Thanks
maven-ear-plugin not found during cobertura:clean
I have two boxes using the same install of maven and a project which consists of a parent and 4 children: two jars, one war, one ear. On one box everything works fine, on the other, running 'mvn clean' causes the triggered 'cobertura:clean' to fail in the ear-project complaining that it cannot find the maven-ear-plugin or a valid version of it. What could be causing this failure on one box and not the other?
scm plugin with subversion
I've got an automated build on my project and the scm:update fails after a couple of successful builds saying that the working copy is locked. How do i get around this?
Re: multi project interdependencies
Ok; just checking; so what is the point of having the maven-eclipse-plugin generate dependencies on subprojects in eclipse ( http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html#useProjectReferences), since it has to get the artifacts from the repository anyway to successfully run 'mvn eclipse:eclipse'? On 1/4/07, Alan D. Salewski [EMAIL PROTECTED] wrote: On Wed, Jan 03, 2007 at 07:18:17PM -0500, Trevor Torrez spake thus: Is it the suggested / best practice to have a subproject in a multi project setup to declare it's dependencies on the other subprojects in the dependency section? Yes. This leads to requiring some parts of the multi-project to be installed to the local repository before other parts can be developed (using the eclipse:eclipse goal fails if the dependency / subproject is not installed). [...] That's correct. The reason is that maven-2.x is (by design) repository based; when maven needs a dependency, it looks for it in your local repos (regardless of whether it's another subproject within the project that is building, or something else). That's just how it's supposed to work. -Al -- :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: Alan D. Salewski Software Developer Health Market Science, Inc. :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Repository questions
What is the best practice for using and declaring common internal repositories at an organization? Basically the organization has 3 main repositories (central, internal for 3rd party non-redistributables and the base library project 'deploy's, and snapshot for the base library project SNAPSHOT 'deploy's), but projects may want to add additional 'deploy' repositories. How do the repository declarations merge between the settings.xml and pom.xml? Is there a way to quiet the dependency resolver down? Having to see 7 or 10 downloading failed messages for every dependency is masking some resolve errors. And how do you tell maven to not resolve javadocs?
instal:install-file -Dclassifier
Does the classifer property have no effect for the install:install-file goal? Trying to use the classifier to install sources wiped out my existing binary jar in $HOME/.m2/repository.
multi project interdependencies
Is it the suggested / best practice to have a subproject in a multi project setup to declare it's dependencies on the other subprojects in the dependency section? This leads to requiring some parts of the multi-project to be installed to the local repository before other parts can be developed (using the eclipse:eclipse goal fails if the dependency / subproject is not installed). Or is there a better way?
Error reading settings file when triggered from a windows service
Hi all; I have cruise control set up as a windows service (running as LOCAL_SYSTEM) to do maven2 builds (using the mvnscript=/path/to/mvn.bat attribute), and the build fails with Error reading settings.xml: Error reading settings file. Is this because it cannot find the user-specific settings.xml? Shouldn't it use the settings.xml file in MAVEN_HOME? The build runs fine from the command line, and my user account does not have a user-specific settings.xml:-/ -t.
dependency's properties
Is there a way to access a dependency's project properties?
Re: checkstyles
Thanks; I had thought about that, I was hoping there was something simpler and just as transparent. It kinda grates me to create a maven project and repository jar file for one file; using a simple URL is tempting, but anywhere we can stick the file we can stick the jar, and the simple URL idea doesnt let us control changes to it; thanks again -t. On 12/2/06, Robert Reiner [EMAIL PROTECTED] wrote: Trevor Torrez wrote: What is the best way to have all subprojects use the same checkstyles file? Hi Trevor, I do not know what the best way is, but this is how it works for me: I have a parent POM to all POMs of my subprojects. In this I declare my checkstyle configuration as an extension like this: extensions extension groupIdde.smartics.config/groupId artifactIdcheckstyle-config-smartics/artifactId version0.2.1/version /extension /extensions The plugin is defined in the same POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId version2.1/version extensionstrue/extensions inheritedtrue/inherited configuration configLocationcheckstyle.xml/configLocation /configuration /plugin The checkstyle project referenced in the extension section is a project on its own, containing only the checkstyle.xml. So the build section in this project looks like this: build resources resource directorysrc/main/resources/directory /resource /resources /build And in the resources directory I place the checkstyle.xml file. I had some difficulties placing it in a subdir and naming it other than this, but this may have been a fault on my side... Hope this helps. Greetings, Robert -- View this message in context: http://www.nabble.com/checkstyles-tf2734779s177.html#a7652646 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: checkstyles
Yup; i agree; versioning everything associated with the build is a good idea, and currently we do do this; I was hoping to get rid of the duplications from project to project in an elegent manner; c'est la vie. The maven-remote-resources plugin, although it would work, doesn't seem right either. After all, I dont want to package the checkstyles.xml file with anything, it doesnt really get distributed; so thats a no. On 12/4/06, Wendy Smoak [EMAIL PROTECTED] wrote: On 12/4/06, Trevor Torrez [EMAIL PROTECTED] wrote: Thanks; I had thought about that, I was hoping there was something simpler and just as transparent. It kinda grates me to create a maven project and repository jar file for one file; using a simple URL is tempting, but anywhere we can stick the file we can stick the jar, and the simple URL idea doesnt let us control changes to it; Yep... this is one of those times when Maven is (not so) gently encouraging you to do the right thing, (version everything associated with your build) even if it seems a bit over the top to have to release a jar containing a single file. :) -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
checkstyles
What is the best way to have all subprojects use the same checkstyles file?
Maven help plugin
Is there a way to get the help plugin to cough up the goals that a plugin supports? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Specialized test / deploy preparation (RESOLVED)
nevermind -- using the maven dependency plugin and instructions from http://docs.codehaus.org/display/MAVENUSER/Maven+and+Selenium got me where i needed to go. On 11/20/06, Trevor Torrez [EMAIL PROTECTED] wrote: Hi again; In part of our framework we are using BIRT (Business Intelligence Reporting Tool) from eclipse with a servlet front-end. In order for it to run it needs the OSGI platform set up in a known directory (when deploying to a webapp, it has to be in WEB-INF/platform). The current way we are handling this is by resolving the zip file as a dependency, and prior to packaging for deploy or prior to the tests we unzip it to where the running environment expects to find it. How do I go about doing the same thing in maven? What part of the lifecycle would this be a part of?
Re: EhCacheProvider not found with other hibernate classes during test
nope: $ grep -io 'ehcache[^ ]\+' maven.log ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache\ehcache\1.2\ehcache-1.2.jar ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache\ehcache\1.2\ehcache-1.2.jar ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache:ehcache=net.sf.ehcache:ehcache:jar:1.2:compile, ehcache\ehcache\1.2\ehcache-1.2.jar other than the fact that hibernate is specifying org.ehcache, and there is a note that it has moved to net.sf.ehcache, nothing is odd about the output that I can see. Changing the pom to explicitly pull net.sf.ehcache 1.2 has no effect. There is also only one version reference to hibernate: 3.2.0.cr4 Any other ideas? -t. On 11/15/06, Wayne Fay [EMAIL PROTECTED] wrote: Run mvn -X and then grep the output for ehcache... You'll probably see a different version getting pulled in by another dependency somewhere... Wayne On 11/14/06, Trevor Torrez [EMAIL PROTECTED] wrote: Ok; that almost makes sense; what, other than 'Quartz' should I search nabble for? I cant find anything relevent. Answers to any of the following questions would also be appreciated: How do i find out which of the dependencies is requesting the bogus version? The only thing 'maven site' shows in the dependencies is ehcache-1.2, the version that must be used with hibernate-3. The dependency graph shows that ehcache was required by hibernate-3, and no other (dissimilar) reference to ehcache is on the page. I pulled out explicit dependencies on hibernate from my project pom, and likewise the only hibernate listed is 3.2.0.rc4 required by spring-hibernate3. Why is it a class not found exception for a class that is obviously there and correct and not a no-class-def error as would be expected for a bogus version of a dependency (wrong method invocation, exception in initializer, etc)? Why is this error not showing up in eclipse, when as far as i can tell the same jar files are being used. Thanks; much appreciated; -t. On 11/14/06, Lee Meador [EMAIL PROTECTED] wrote: This has been discussed before. You can find it in nabble, I think. The issue has to do with spring wanting one version of hibernate and hibernate wanting a version of ehcache and the versions conflict with each other. In my case, using Quartz which wanted another version of ehcache, it would pick one version of ehcache for one project and another version for another project. You solve it by specifying versions for things in some places and excluding dependencies in others. I forget the details. -- Lee [snip] -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EhCacheProvider not found with other hibernate classes during test (Being Resolved)
Well I have some progress -- the tests are finally failing in eclipse so i can do some debugging. Also, i changed the hibernate config to use the cache provider provided with the ehcache jar -- but the tests are still bombing out because it claims it cannot find the one in the hibernate jar :/ Anyway, thanks for the help. -t. On 11/15/06, Trevor Torrez [EMAIL PROTECTED] wrote: nope: $ grep -io 'ehcache[^ ]\+' maven.log ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache\ehcache\1.2\ehcache-1.2.jar ehcache:ehcache: 1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache\ehcache\1.2\ehcache-1.2.jar ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache:ehcache=net.sf.ehcache:ehcache:jar:1.2:compile, ehcache\ehcache\1.2\ehcache-1.2.jar other than the fact that hibernate is specifying org.ehcache, and there is a note that it has moved to net.sf.ehcache, nothing is odd about the output that I can see. Changing the pom to explicitly pull net.sf.ehcache 1.2 has no effect. There is also only one version reference to hibernate: 3.2.0.cr4 Any other ideas? -t. On 11/15/06, Wayne Fay [EMAIL PROTECTED] wrote: Run mvn -X and then grep the output for ehcache... You'll probably see a different version getting pulled in by another dependency somewhere... Wayne On 11/14/06, Trevor Torrez [EMAIL PROTECTED] wrote: Ok; that almost makes sense; what, other than 'Quartz' should I search nabble for? I cant find anything relevent. Answers to any of the following questions would also be appreciated: How do i find out which of the dependencies is requesting the bogus version? The only thing 'maven site' shows in the dependencies is ehcache-1.2, the version that must be used with hibernate-3. The dependency graph shows that ehcache was required by hibernate-3, and no other (dissimilar) reference to ehcache is on the page. I pulled out explicit dependencies on hibernate from my project pom, and likewise the only hibernate listed is 3.2.0.rc4 required by spring-hibernate3. Why is it a class not found exception for a class that is obviously there and correct and not a no-class-def error as would be expected for a bogus version of a dependency (wrong method invocation, exception in initializer, etc)? Why is this error not showing up in eclipse, when as far as i can tell the same jar files are being used. Thanks; much appreciated; -t. On 11/14/06, Lee Meador [EMAIL PROTECTED] wrote: This has been discussed before. You can find it in nabble, I think. The issue has to do with spring wanting one version of hibernate and hibernate wanting a version of ehcache and the versions conflict with each other. In my case, using Quartz which wanted another version of ehcache, it would pick one version of ehcache for one project and another version for another project. You solve it by specifying versions for things in some places and excluding dependencies in others. I forget the details. -- Lee [snip] -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EhCacheProvider not found with other hibernate classes during test (RESOLVED)
Thanks all; I do appreciate the help. The root cause was (of all things) a space after the class name in hibernate.properties :-/ Now I am back to why this was so hard to diagnose -- the tests, when run from maven (on the command line), is not picking up changes to that file -- but when the tests run in eclipse, the changes are reflected. Why is that? On 11/15/06, Wayne Fay [EMAIL PROTECTED] wrote: Check your Manifest.MF files and web.xml and other configuration files to make sure there's not a reference to the wrong version somewhere. (Don't just use the files in target; you'll need to crack open the packaged JAR/WAR/EAR and all its JAR contents and look at all the config files and Manifests.) I had a situation recently where all my modules were set up to use the log4j version specified by parent dependencyManagement node, but then for some reason my EAR module had a specific version declared, so that's what got bundled into the EAR, and then the Class-Path references in the other modules were incorrect. Just throwing out some ideas. No real clue why this is happening. You might need to provide an excludes in the hibernate dependencies and then manually add ehcache as its own dependency with a specific version, as suggested by Lee. Wayne On 11/15/06, Trevor Torrez [EMAIL PROTECTED] wrote: nope: $ grep -io 'ehcache[^ ]\+' maven.log ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache\ehcache\1.2\ehcache-1.2.jar ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache\ehcache\1.2\ehcache-1.2.jar ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache:ehcache=net.sf.ehcache:ehcache:jar:1.2:compile, ehcache\ehcache\1.2\ehcache-1.2.jar other than the fact that hibernate is specifying org.ehcache, and there is a note that it has moved to net.sf.ehcache, nothing is odd about the output that I can see. Changing the pom to explicitly pull net.sf.ehcache 1.2has no effect. There is also only one version reference to hibernate: 3.2.0.cr4 Any other ideas? -t. On 11/15/06, Wayne Fay [EMAIL PROTECTED] wrote: Run mvn -X and then grep the output for ehcache... You'll probably see a different version getting pulled in by another dependency somewhere... Wayne On 11/14/06, Trevor Torrez [EMAIL PROTECTED] wrote: Ok; that almost makes sense; what, other than 'Quartz' should I search nabble for? I cant find anything relevent. Answers to any of the following questions would also be appreciated: How do i find out which of the dependencies is requesting the bogus version? The only thing 'maven site' shows in the dependencies is ehcache-1.2, the version that must be used with hibernate-3. The dependency graph shows that ehcache was required by hibernate-3, and no other (dissimilar) reference to ehcache is on the page. I pulled out explicit dependencies on hibernate from my project pom, and likewise the only hibernate listed is 3.2.0.rc4 required by spring-hibernate3. Why is it a class not found exception for a class that is obviously there and correct and not a no-class-def error as would be expected for a bogus version of a dependency (wrong method invocation, exception in initializer, etc)? Why is this error not showing up in eclipse, when as far as i can tell the same jar files are being used. Thanks; much appreciated; -t. On 11/14/06, Lee Meador [EMAIL PROTECTED] wrote: This has been discussed before. You can find it in nabble, I think. The issue has to do with spring wanting one version of hibernate and hibernate wanting a version of ehcache and the versions conflict with each other. In my case, using Quartz which wanted another version of ehcache, it would pick one version of ehcache for one project and another version for another project. You solve it by specifying versions for things in some places and excluding dependencies in others. I forget the details. -- Lee [snip] -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EhCacheProvider not found with other hibernate classes during test (RESOLVED)
I wiped it out and rechecked it out from source control; seems to be working fine. Thanks again. On 11/15/06, Wayne Fay [EMAIL PROTECTED] wrote: I don't know why the changed file wasn't detected. Start running mvn clean {your phase here} ie mvn clean package or mvn clean test rather than mvn test directly and Maven will delete target/* before running, which should take care of these kinds of problems. Wayne On 11/15/06, Trevor Torrez [EMAIL PROTECTED] wrote: Thanks all; I do appreciate the help. The root cause was (of all things) a space after the class name in hibernate.properties :-/ Now I am back to why this was so hard to diagnose -- the tests, when run from maven (on the command line), is not picking up changes to that file -- but when the tests run in eclipse, the changes are reflected. Why is that? On 11/15/06, Wayne Fay [EMAIL PROTECTED] wrote: Check your Manifest.MF files and web.xml and other configuration files to make sure there's not a reference to the wrong version somewhere. (Don't just use the files in target; you'll need to crack open the packaged JAR/WAR/EAR and all its JAR contents and look at all the config files and Manifests.) I had a situation recently where all my modules were set up to use the log4j version specified by parent dependencyManagement node, but then for some reason my EAR module had a specific version declared, so that's what got bundled into the EAR, and then the Class-Path references in the other modules were incorrect. Just throwing out some ideas. No real clue why this is happening. You might need to provide an excludes in the hibernate dependencies and then manually add ehcache as its own dependency with a specific version, as suggested by Lee. Wayne On 11/15/06, Trevor Torrez [EMAIL PROTECTED] wrote: nope: $ grep -io 'ehcache[^ ]\+' maven.log ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache\ehcache\1.2\ehcache-1.2.jar ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache\ehcache\1.2\ehcache-1.2.jar ehcache:ehcache:1.2 ehcache:ehcache:1.2. ehcache:ehcache:jar:1.2:compile ehcache\ehcache\1.2\ehcache-1.2.jar, ehcache:ehcache=net.sf.ehcache:ehcache:jar:1.2:compile, ehcache\ehcache\1.2\ehcache-1.2.jar other than the fact that hibernate is specifying org.ehcache, and there is a note that it has moved to net.sf.ehcache, nothing is odd about the output that I can see. Changing the pom to explicitly pull net.sf.ehcache 1.2has no effect. There is also only one version reference to hibernate: 3.2.0.cr4 Any other ideas? -t. On 11/15/06, Wayne Fay [EMAIL PROTECTED] wrote: Run mvn -X and then grep the output for ehcache... You'll probably see a different version getting pulled in by another dependency somewhere... Wayne On 11/14/06, Trevor Torrez [EMAIL PROTECTED] wrote: Ok; that almost makes sense; what, other than 'Quartz' should I search nabble for? I cant find anything relevent. Answers to any of the following questions would also be appreciated: How do i find out which of the dependencies is requesting the bogus version? The only thing 'maven site' shows in the dependencies is ehcache-1.2, the version that must be used with hibernate-3. The dependency graph shows that ehcache was required by hibernate-3, and no other (dissimilar) reference to ehcache is on the page. I pulled out explicit dependencies on hibernate from my project pom, and likewise the only hibernate listed is 3.2.0.rc4 required by spring-hibernate3. Why is it a class not found exception for a class that is obviously there and correct and not a no-class-def error as would be expected for a bogus version of a dependency (wrong method invocation, exception in initializer, etc)? Why is this error not showing up in eclipse, when as far as i can tell the same jar files are being used. Thanks; much appreciated; -t. On 11/14/06, Lee Meador [EMAIL PROTECTED] wrote: This has been discussed before. You can find it in nabble, I think. The issue has to do with spring wanting one version of hibernate and hibernate wanting a version of ehcache and the versions conflict with each other. In my case, using Quartz which wanted another version of ehcache, it would pick one version of ehcache for one project and another version for another project. You solve it by specifying versions for things in some places and excluding dependencies in others. I forget the details. -- Lee [snip] -- -- Lee Meador Sent from gmail
EhCacheProvider not found with other hibernate classes during test
Hi; I am trying to convert our framework over to maven, and am running into a bit of a snag. When trying run the tests, I get a class not found for org.hibernate.cache.EhCacheProvider; but when running from eclipse (using the eclipse maven plugin to setup the libraries) everything works fine. I have tried letting the project just pull the relevent spring 2.0 jars for hibernate and explicitly pulling the hibernate jar files. The class exists in the hibernate-3 jar, the same jar file that contains the HibernateException as the root throwable. [stack trace follows] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mockManager' defined in class path resource [application-context-service-test.xml]: Cannot create inner bean ' org.govgrnds.mock.service.impl.MockManagerImpl#64c34e' while setting bean property 'target'; Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ' org.govgrnds.mock.service.impl.MockManagerImpl#64c34e' defined in class path resource [application-context-service-test.xml]: Cannot resolve reference to bean 'baseHibernateDAO' while setting bean property 'dao'; Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseHibernateDAO' defined in class path resource [application-context-service-test.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in class path resource [application-context-service-test.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [application-context-service-test.xml]: Invocation of init method failed; Caused by: org.hibernate.HibernateException: could not instantiate CacheProvider: org.hibernate.cache.EhCacheProvider at org.hibernate.cfg.SettingsFactory.createCacheProvider( SettingsFactory.java:361) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java :232) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java :1933) at org.hibernate.cfg.Configuration.buildSessionFactory( Configuration.java:1216) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory (LocalSessionFactoryBean.java:807) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory (LocalSessionFactoryBean.java:740) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet (AbstractSessionFactoryBean.java:131) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods (AbstractAutowireCapableBeanFactory.java:1062) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean (AbstractAutowireCapableBeanFactory.java:1029) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:420) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject( AbstractBeanFactory.java:245) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:141) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:242) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:156) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:246) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (BeanDefinitionValueResolver.java:128) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:955) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:729) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:416) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject( AbstractBeanFactory.java:245) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:141) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:242) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:156) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference
Re: EhCacheProvider not found with other hibernate classes during test
Ok; that almost makes sense; what, other than 'Quartz' should I search nabble for? I cant find anything relevent. Answers to any of the following questions would also be appreciated: How do i find out which of the dependencies is requesting the bogus version? The only thing 'maven site' shows in the dependencies is ehcache-1.2, the version that must be used with hibernate-3. The dependency graph shows that ehcache was required by hibernate-3, and no other (dissimilar) reference to ehcache is on the page. I pulled out explicit dependencies on hibernate from my project pom, and likewise the only hibernate listed is 3.2.0.rc4 required by spring-hibernate3. Why is it a class not found exception for a class that is obviously there and correct and not a no-class-def error as would be expected for a bogus version of a dependency (wrong method invocation, exception in initializer, etc)? Why is this error not showing up in eclipse, when as far as i can tell the same jar files are being used. Thanks; much appreciated; -t. On 11/14/06, Lee Meador [EMAIL PROTECTED] wrote: This has been discussed before. You can find it in nabble, I think. The issue has to do with spring wanting one version of hibernate and hibernate wanting a version of ehcache and the versions conflict with each other. In my case, using Quartz which wanted another version of ehcache, it would pick one version of ehcache for one project and another version for another project. You solve it by specifying versions for things in some places and excluding dependencies in others. I forget the details. -- Lee [snip] -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com