Re: Hibernate and Maven
Hi, I am getting the same problem but I am developing maven plugin using java. I am also getting the exception as ClassNotFoundException : oracle.jdbc.driver.OracleDriver I saw in my jar file, class is available in jar file Renuka -- View this message in context: http://maven.40175.n5.nabble.com/Hibernate-and-Maven-tp79242p4267137.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
Starting using the maven 3 parallel building
Hi all, I'm trying to improve my build performance by using the parallel build feature. I executed the mvn -T 10 clean install command on my root directory and I see a lot of warnings according which part of my plug-ins are not thread safe. The build finished after 10 mins (without the -T 10 it took 30 mins), but part of my projects where marked as SKIPPED at the end of the process. I application also doesn't work. My question is: Should upgrade all the plugins in order to use the parallel feature? Why can't I build with part of the plugins thread safe? Thank you for your answer, Sakin -- View this message in context: http://maven.40175.n5.nabble.com/Starting-using-the-maven-3-parallel-building-tp4266155p4266155.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: Starting using the maven 3 parallel building
Please read https://cwiki.apache.org/MAVEN/parallel-builds-in-maven-3.html it is possible to run in parallel with plugins that are not verified thread safe, but there may be problems, therefore the loud warning. Since your build is actually failing you obviously must upgrade your plugins. Kristian Den 27.03.2011 10:16, skrev sakin: Hi all, I'm trying to improve my build performance by using the parallel build feature. I executed the mvn -T 10 clean install command on my root directory and I see a lot of warnings according which part of my plug-ins are not thread safe. The build finished after 10 mins (without the -T 10 it took 30 mins), but part of my projects where marked as SKIPPED at the end of the process. I application also doesn't work. My question is: Should upgrade all the plugins in order to use the parallel feature? Why can't I build with part of the plugins thread safe? Thank you for your answer, Sakin -- View this message in context: http://maven.40175.n5.nabble.com/Starting-using-the-maven-3-parallel-building-tp4266155p4266155.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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Using Custom Developed Checkstyle Checks with packagenames.xml
Hi Dennis, Thank you for your suggestion. I haven't done that yet. It also doesn't work with the command line without using maven: java -classpath checkstyle-5.3-all.jar;C:\Documents and Settings\beyondseeker\.m2\repository\com\objectfanatics\checkstyle\checks\0.0.1-SNAPSHOT\checks-0.0.1-SNAPSHOT.jar com.puppycrawl.tools.checkstyle.Main -f xml -c checkstyle.xml -r src/main/java Unable to create Checker: cannot initialize module TreeWalker - Unable to instantiate MethodLimit com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Unable to instantiate MethodLimit at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184) at com.puppycrawl.tools.checkstyle.Main.createChecker(Main.java:143) at com.puppycrawl.tools.checkstyle.Main.main(Main.java:120) Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate MethodLimit at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:155) at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:161) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184) at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157) ... 3 more Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate MethodLimitCheck at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:98) at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152) ... 6 more Regards, Makoto Sato - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven 3.0 Artefact/Dependency version discussion request
Hi Ron, Maven isn't meant to be enforcing convention. It's meant to work without configuration /if/ convention fits in your particular domain. Where convention doesn't fit it's meant to be configurable. As for best practice... Using maven for version management is /not/ best practice. It's a convention that maven has introduced and which doesn't really work very well. The ability to configure things in this area is critical to maven's success. Final point: ant is not a substitute for maven. They are completely different things used for different purposes should not be directly compared. One is not substitutable for the other. Ant is a build system -- maven is much more than that. Bryan -- View this message in context: http://maven.40175.n5.nabble.com/Re-Maven-3-0-Artefact-Dependency-version-discussion-request-tp83857p4267200.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: Using Custom Developed Checkstyle Checks with packagenames.xml
Hi Lee, As you said I thought something was missing in the maven-checkstyle-plugin tutorial, so I checked the following page: http://checkstyle.sourceforge.net/config.html#Packages It says To specify other packages to apply, create a package names XML document in a file named checkstyle_packages.xml, and provide that file in the root of the .jar containing your custom checks. So I removed the property packageNamesLocation from pom.xml and added checkstyle_packages.xml file in the root of the .jar containing my custom check and it worked. Thanks, Makoto Sato 2011/3/28 Lee Meador l...@leemeador.com: Makoto, Perhaps the tutorial has something missing. Normally, you would put the .xml files in src/main/resources or add the bit to the POM that tells it to copy resources from src/main/java of type xml. You can tell if this is the problem by looking inside the jar that your are building with your custom checks in it. If the package names xml file is missing, this is the problem. Thanks. -- Lee On Sun, Mar 27, 2011 at 10:00 AM, Martin Gainty mgai...@hotmail.com wrote: so instead of 2 levels e.g: FirstLevel SecondLevel java1.class java2.class you want 3 levels deep ?? FirstLevel SecondLevel ThirdLevel java1.class java2.class Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Sun, 27 Mar 2011 11:31:26 +0200 From: denn...@apache.org To: users@maven.apache.org Subject: Re: Using Custom Developed Checkstyle Checks with packagenames.xml On 2011-03-27 01:36, Makoto Sato wrote: Hi, I'm using maven 3.0.2 and trying to follow the maven tutorial Using Custom Developed Checkstyle Checks ( http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/custom-developed-checkstyle.html ). It works with long module name(1) but doesn't work with short module name(2): checkstyle.xml ?xml version=1.0?!DOCTYPE module PUBLIC -//Puppy Crawl//DTD Check Configuration 1.2//EN http://www.puppycrawl.com/dtds/configuration_1_2.dtd; module name=Checker module name=TreeWalker !-- (1) It works. -- module name=com.objectfanatics.checkstyle.checks.MethodLimit / !-- (2) It doesn't work -- module name=MethodLimit / /module /module Does anyone has any idea? Does it work if you run Checkstyle from the command line (i.e. without using Maven) ? Regards, Makoto Sato - error message - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-3:site (default-site) on project mincheckstyleenv: Error during page generation: Error rendering Maven report: Failed during checkstyle configuration: cannot initialize module TreeWalker - Unable to instantiate MethodLimit: Unable to instantiate MethodLimitCheck - [Help 1] - pom.xml - ... plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId version2.6/version dependencies dependency groupIdcom.objectfanatics.checkstyle/groupId artifactIdchecks/artifactId version0.0.1-SNAPSHOT/version /dependency /dependencies /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId version3.0-beta-3/version configuration inputEncodingUTF-8/inputEncoding outputEncodingUTF-8/outputEncoding reportPlugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jxr-plugin/artifactId version2.2/version configuration inputEncodingUTF-8/inputEncoding outputEncodingUTF-8/outputEncoding /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId
Two processes accessing the local repository?
Hi! Is there any synchronization done in maven regarding the local cache ($Home/.m2/repository) ? I mean when downloading plugins and so. Is it safe to run multiple build in parallel on the same machine? Regards, David - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Re-using tests - best practice
Thanks Lee, I think that makes sense. cheers Tim On 28 March 2011 05:23, Lee Meador l...@leemeador.com wrote: Yegor, If you look at the links he put in the 1st message it shows the POM he's talking about. It includes multiple execution sections within the surefire plugin section that run the tests only after building and deploying something (I guess its the code being tested). Each execution of the tests has some properties set so that the tests run somehow differently. Since the test jar is already built maybe its easier than we thought. This is just a hint of an idea though ... Maybe, Tim could create a POM of his own that has that test jar as a dependency of test scope. Then he could use a single AllTest.java in src/test/java somewhere that has a suite() method that tells SureFire about the tests that should be run. Those tests would all be in the test-jar. The only maintenence here is that if the underlying code adds some tests or comes out with a new version with new tests, he would have to find their names and add them to the suite. Tim's new pom would not be a child of the project's pom but would have similar execution sections under the SureFire plugin section. -- Lee On Fri, Mar 25, 2011 at 12:20 PM, Yegor Bugayenko e...@technoparkcorp.comwrote: In such a case (if you still want to reuse tests apart from the SUT they are designed for) your approach with dependency:unpack looks correct. But again, I would suggest to analyze the reason behind this operation and do everything you can to avoid this artificial separation of the SUT (system under testing) and its tests. — Yegor Bugayenko, PMP®, SCEA On Fri, Mar 25, 2011 at 11:02 AM, Tim Pizey tim.pi...@gmail.com wrote: Thanks for your comments Yegor, however you do not address the question, perhaps I did not put it well. What is the best way to re-use tests, given that Surefire will not discover tests in a jar and you cannot extend a non-pom project? I feel that the solution I have come up with is pretty clunky and would welcome a more elegant to the problem of test reuse. cheers Tim On 24 March 2011 08:08, Yegor Bugayenko wrote: What is the point of retesting a library which has already been tested? You need your own tests, that will check the validity of your own application, not a third-party library. If you want to reuse some code from the library - just get their .java files from their repository and add them to your project statically (don't forget to review their license restrictions). — Yegor Bugayenko, PMP®, SCEA On Tue, Mar 22, 2011 at 12:17 PM, Tim Pizey tim.pi...@gmail.com wrote: Hi, Atombeat http://code.google.com/p/atombeat/ has a set of possible configurations with different backends and security policies. atombeat-exist-full atombeat-exist-minimal atombeat-exist-full-secure atombeat-exist-minimal-secure atombeat-orbeon-full atombeat-orbeon-minimal atombeat-orbeon-full-secure atombeat-orbeon-minimal-secure Atombeat has a separate project which contains the tests for all of the above: http://code.google.com/p/atombeat/source/browse/trunk/parent/atombeat-integration-tests/pom.xml As an Atombeat user I want to re-purpose these tests to test a particular Atombeat installation, with a different security mechanism (CAS). Because the Atombeat tests test a set of different configurations some are not applicable - testing security on an unsecured configuration for example - so the tests pom file contains a lot of configuration information. I had hoped to be able to inherit from the Atombeat test pom, ie set it as parent, but parents may only be of type pom. The Atombeat test source is in src/test/java, so currently no jar file is produced. I can fix that by adding plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId executions execution goals goaltest-jar/goal /goals /execution /executions /plugin however the surefire plugin will not run the tests as it does not look inside jars to discover tests. Unpacking the jar into target/test-classes gets the tests discovered by Surefire. I then need to configure my project by duplicating the configuration information in the test POM. Is this the best way to reuse tests? cheers Tim -- Tim Pizey - http://pizey.net/~timp Centre for Genomics and Global Health - http://cggh.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Tim
Re: Two processes accessing the local repository?
We have sometimes problems, if multiple builds on Jenkins use the same local Maven repository and if those builds download new artifacts. Then some artifacts are locked by one Maven process, and the other process fails with an artifact not found error. Manuel On Mon, Mar 28, 2011 at 11:32, David Balažic xerc...@gmail.com wrote: Hi! Is there any synchronization done in maven regarding the local cache ($Home/.m2/repository) ? I mean when downloading plugins and so. Is it safe to run multiple build in parallel on the same machine? Regards, David - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: mvn deploy and site in one go
Your CI should send developers a link to the build failure. Here is an example reason for failure: Foo.java:16: warning: Line is longer than 80 characters. How much more convenient can you get? TeamCity mails look like the following: - Build Maven Tests::maven_test_project #11 failed Agent: srvBuildAgt3 Build results: http://buildserver:8080/viewLog.html?buildId=42805buildTypeId=bt477 this gets you to a web-page with (if I could get it to work) nice formatted HTML reports of all problems (i.e. Findbugs). We even had short messages like 'Findbugs Failed' or 'Checkstyle Failed' in the mail-headers, don't know yet if I'm able to get this tight integration with maven. As this one line: Foo.java:16: warning: Line is longer than 80 characters. is a normal console/log output, TeamCity is not able to catch that line up and highlight it :( Is Hudson really getting this single Findbugs-Failure line into it's email-body without any other clutter from the log around it? I definitely don't want full-logs in my mails - sometimes they are 2MB in our (ant) builds. Looking into the logs we had 5 years ago when still running CruiseControl. Now (from our Ant-Builds) we are used to failing builds where devs click on a single link and can instantly go to the FindBugs report which is nicely formatted. This is much faster and convenient than scanning the logs to find the appropiate error-message. We are talking about hundred developers: trained/untrained/rookies/stubborn/students - I want a system easy and intuitive to understand for everyone. -- View this message in context: http://maven.40175.n5.nabble.com/mvn-deploy-and-site-in-one-go-tp4257014p4267319.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: Two processes accessing the local repository?
Note item 2. http://www.sonatype.com/people/2009/01/maven-continuous-integration-best-practices/ Kristian Den 28.03.2011 12:06, skrev Manuel Doninger: We have sometimes problems, if multiple builds on Jenkins use the same local Maven repository and if those builds download new artifacts. Then some artifacts are locked by one Maven process, and the other process fails with an artifact not found error. Manuel On Mon, Mar 28, 2011 at 11:32, David Balažicxerc...@gmail.com wrote: Hi! Is there any synchronization done in maven regarding the local cache ($Home/.m2/repository) ? I mean when downloading plugins and so. Is it safe to run multiple build in parallel on the same machine? Regards, David - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: mvn deploy and site in one go
Hi Marc, thanks alot for sharing your thoughts. Our buildtimes vary from 30min to 3hour (yeah - big heavy integration tests). This is for 12 products (each having 3-5 build plans for all their maintenance branches) crowding 5 buildagents round the clock. So this is the reason I definitely don't want to run a testsuite twice but had hoped to optimize the builds with maven: a) if it works = deploy b) if it doesn't = don't deploy, but give me nice reports I can send to devs of all age and experience This is what our Ant scripts do right now (i.e. run some reporting tool, just set a variable when it fails, generate reports, fail the build if variable is set). I'm really curious that - given that Maven exists so long already - it seems such an uncommon use case to get a nice HTML failure report in the case of some build error. So from your proposed solutions: #1 is no option (running tests twice) #2 is no option (don't want artefacts of broken builds deployed) #3 ... sound interesting! The most complicated thing here is to share data between two builds. But this might be possible with TeamCity artifact dependencies. Also developers would be informed that a build is broken, but need to wait until the 'report' build gets scheduled. Doesn't sound like any developer would love me for such a solution :) Well guess right now we are just spoiled by our custom ant-scripts and have to accept 'the maven way', whatever that means (probably reading build logs on a daily basis again) Right now I'm thinking of just bundling the missing css files from the target-folder and manually copying them at the start of the build. Then I could at least use Checkstyle and FindBugs HTML report targets (these only seem to fail after creating the report). And as previously said: for JUnit TeamCity picks ups the XML-Reports anyway so I don't need to cope with surefire-report. -- View this message in context: http://maven.40175.n5.nabble.com/mvn-deploy-and-site-in-one-go-tp4257014p4267328.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: Two processes accessing the local repository?
The local repository in Maven is the temporary holding spot for all artifacts downloaded and produced by Maven, and it is not currently setup to be multi-process safe. But that wan written 2 years ago. Is there no news in maven 3 regarding this? David On 28 March 2011 12:14, Kristian Rosenvold kristian.rosenv...@gmail.com wrote: Note item 2. http://www.sonatype.com/people/2009/01/maven-continuous-integration-best-practices/ Kristian Den 28.03.2011 12:06, skrev Manuel Doninger: We have sometimes problems, if multiple builds on Jenkins use the same local Maven repository and if those builds download new artifacts. Then some artifacts are locked by one Maven process, and the other process fails with an artifact not found error. Manuel On Mon, Mar 28, 2011 at 11:32, David Balažicxerc...@gmail.com wrote: Hi! Is there any synchronization done in maven regarding the local cache ($Home/.m2/repository) ? I mean when downloading plugins and so. Is it safe to run multiple build in parallel on the same machine? Regards, David - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
how do i compile an external ant project with maven?
Hi there, I'm trying to port an exiting Ant build project to use Maven instead, this project depends upon another that is also built using Ant. I know in an ideal world it would be best to port both projects to using Maven, sadly that is not an option in this case (the business simply won't allow it). I've done much searching but so far I can't find any documentation to achieve this. Could someone point me in the right direction please? Thanks in advance!! Kind regards, Adam
Re: Two processes accessing the local repository?
I've heard it's more or less planned for M3.1 Jeff On Mon, Mar 28, 2011 at 12:40 PM, David Balažic xerc...@gmail.com wrote: The local repository in Maven is the temporary holding spot for all artifacts downloaded and produced by Maven, and it is not currently setup to be multi-process safe. But that wan written 2 years ago. Is there no news in maven 3 regarding this? David On 28 March 2011 12:14, Kristian Rosenvold kristian.rosenv...@gmail.com wrote: Note item 2. http://www.sonatype.com/people/2009/01/maven-continuous-integration-best-practices/ Kristian Den 28.03.2011 12:06, skrev Manuel Doninger: We have sometimes problems, if multiple builds on Jenkins use the same local Maven repository and if those builds download new artifacts. Then some artifacts are locked by one Maven process, and the other process fails with an artifact not found error. Manuel On Mon, Mar 28, 2011 at 11:32, David Balažicxerc...@gmail.com wrote: Hi! Is there any synchronization done in maven regarding the local cache ($Home/.m2/repository) ? I mean when downloading plugins and so. Is it safe to run multiple build in parallel on the same machine? Regards, David - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Legacy code often differs from its suggested alternative by actually working and scaling. - Bjarne Stroustrup http://www.jeffmaury.com http://riadiscuss.jeffmaury.com http://www.twitter.com/jeffmaury
Re: Is this possible with Maven profiles?
Hi, Lee. Thanks for response. The problem with your suggestion is that I would need to maintain both files, i.e, if I need to change something (e.g. add a new entity´s orm) in the src/main/resources/persistence.xml I would need to remember doing the same changes in the src/test/resources/persistence.xml And that´s what I am trying to avoid. But thanks for sharing your thoughts about this. Regards, Rafael Vanderlei. On Mon, Mar 28, 2011 at 12:53 AM, Lee Meador l...@leemeador.com wrote: There are some references here and there that seem to say you can have two persistence.xml files if they have different persistence unit names. If that is so, you could keep one in src/test/resources and one in src/main/resources. Only the main one will go into your jar/war, whatever. Your tests though have to run against an differently named persistence unit so you use that other name when you set up things to run the tests. I know ... its just an idea and I don't really know what I'm talking about very well. But I thought it might help you. -- Lee On Sat, Mar 26, 2011 at 8:18 AM, Rafael Vanderlei rafaelvander...@gmail.com wrote: Wow... I really did not know I could put xml values on a property... unfortunately I'm unable to test ir right now because the code is at work, but on monday, as soon as I test it I'll post the result. If this works, it's gonna be enough for me. If not, I'm gonna have a look on OpenJPA to achieve this. Thanks, Wayne. Regards, Rafael Vanderlei. On Fri, Mar 25, 2011 at 10:36 PM, Wayne Fay wayne...@gmail.com wrote: persistence-unit name=NAME transaction-type=${transtype} ${dbconfig} /persistence Try something along these lines: profile idproduction/production properties transtypeJTA/transtype dbconfig![CDATA[jta-data-sourceJNDI_NAME_FOR_MY_DATASOURCE/jta-data-source]]/dbconfig /properties /profile And yes, you'd need to put the whole property... section in a CDATA node for your unit test version. Having said all that, I think I'd look for another option. Surely OpenJPA would allow you to specify an alternate P-U config file so you could just include both and then instruct OpenJPA which one to use. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com
Re: Generating Config Files for multi-module project
This is a good way to structure the project. Using profiles to select files and modify configuration properties is not a good idea and it seems that most of the time it causes a great deal of frustration and lost time before they are abandoned. You may find it easier to have a project for each configuration and just have a batch script that builds all of the configurations once you have the core tested. Profiles seem to be very single-minded and do not take well to bending, folding or other forms of mutilation that people try to do to put environment specific stuff into deliverables. Don't spend a lot of time tweaking profiles and trying to make them work before asking questions. I lot of people spend days screwing about before giving up because profiles can not be bent to their purpose. Sometimes the old fashioned approach that seems inelegant is better that the latest technology misapplied to the problem. Maven does work from the command line. Ron On 28/03/2011 12:57 AM, Lee Meador wrote: Maybe it could work this way: The parent project has the normal modules section saying to build all the jars, the war, the config files the installer results and several others for each Zip file created. I'm going to assume you want to create a zip file with the war, the installer and the config files in it. Make that zip file's project depend on the war project, the installer project and a config project. The parent pom will use profiles to set values for properties that are used in the config project to filter and/or transform to create the right versions of the config files. The config project will hold the template xml files used to create the config files. I think it will be a pom artifact. It will use a bit of ant (or some other plugin) to do the xslt part. The result files can be filtered by the assembly plugin if you like. The resulting artifacts can go independently in the same spot in the local repo if you use the plugin that allows setting multiple result artifacts (like a single pom cat send a jar, test-jar, javadocs and source jars all in one install. Then the zip file project will use the assembly plugin to collect the war file, the installer file and the already created config files and zip them up. I'm not sure how you tell it to collect all those files from the local repo. If all else fails you can put them all as compile dependencies and use the property maven creates with the names of all the dependencies in it. That's sort of a unnatural act though, so be careful. Of course, it could be I'm misunderstanding your question. I understand it to say that you build a set of artifacts (zip files, war files, install files, etc) that correspond to one scenario when you run mvn one time. That means that some properties can be set inside profiles in the parent pom as the build starts and those properties can be used during the build to control which optional stuff happens. -- Lee On Sun, Mar 27, 2011 at 10:02 AM, Adam Retteradam.ret...@googlemail.comwrote: Is there a way to do this without using settings.xml, I really want to make this as easy as possible for our other developers i.e. have everything in the pom.xml or project files. On 27 March 2011 16:33, Martin Gaintymgai...@hotmail.com wrote: the output of the xslt transform will generate filter.properties which identifyies the transformed files to be read in by each child module then setup peofiles in each child (module) pom react to profiles to set the exact location_of_filter parameter %USER_HOME%/.m2/settings.xml settings ... profiles profile idlocation_of_filter1/id properties location_of_filter/src/assemble/filter.properties/location_of_filter /properties /profile profile idlocation_of_filter2/id properties location_of_filter/src/assemble/filter2.properties/location_of_filter /properties /profile profile /profiles activeProfiles activeProfilelocation_of_filter1/activeProfile /activeProfiles ... /settings http://maven.apache.org/guides/introduction/introduction-to-profiles.html !-- then your local pom.xml will have profiles which will detect the location_of_filter property -- profiles profile idlocation_of_filter1/id build plugins plugin artifactIdmaven-assembly-plugin/artifactId version2.2.1/version executions execution phasepackage/phase goals goalrun/goal /goals configuration filters filter${location_of_filter}/filter.properties/filter /filters configuration /configuration /plugin /plugins /profile profile /profile /profiles http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/filtering-some-distribution-files.html Martin __ Verzicht
Re: Is this possible with Maven profiles?
Wayne, I configured the property using CDATA and it worked. Thanks. Regards, Rafael. On Mon, Mar 28, 2011 at 8:53 AM, Rafael Vanderlei rafaelvander...@gmail.com wrote: Hi, Lee. Thanks for response. The problem with your suggestion is that I would need to maintain both files, i.e, if I need to change something (e.g. add a new entity´s orm) in the src/main/resources/persistence.xml I would need to remember doing the same changes in the src/test/resources/persistence.xml And that´s what I am trying to avoid. But thanks for sharing your thoughts about this. Regards, Rafael Vanderlei. On Mon, Mar 28, 2011 at 12:53 AM, Lee Meador l...@leemeador.com wrote: There are some references here and there that seem to say you can have two persistence.xml files if they have different persistence unit names. If that is so, you could keep one in src/test/resources and one in src/main/resources. Only the main one will go into your jar/war, whatever. Your tests though have to run against an differently named persistence unit so you use that other name when you set up things to run the tests. I know ... its just an idea and I don't really know what I'm talking about very well. But I thought it might help you. -- Lee On Sat, Mar 26, 2011 at 8:18 AM, Rafael Vanderlei rafaelvander...@gmail.com wrote: Wow... I really did not know I could put xml values on a property... unfortunately I'm unable to test ir right now because the code is at work, but on monday, as soon as I test it I'll post the result. If this works, it's gonna be enough for me. If not, I'm gonna have a look on OpenJPA to achieve this. Thanks, Wayne. Regards, Rafael Vanderlei. On Fri, Mar 25, 2011 at 10:36 PM, Wayne Fay wayne...@gmail.com wrote: persistence-unit name=NAME transaction-type=${transtype} ${dbconfig} /persistence Try something along these lines: profile idproduction/production properties transtypeJTA/transtype dbconfig![CDATA[jta-data-sourceJNDI_NAME_FOR_MY_DATASOURCE/jta-data-source]]/dbconfig /properties /profile And yes, you'd need to put the whole property... section in a CDATA node for your unit test version. Having said all that, I think I'd look for another option. Surely OpenJPA would allow you to specify an alternate P-U config file so you could just include both and then instruct OpenJPA which one to use. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com
Re: mvn deploy and site in one go
Hi Stefan, another idea could be to call Maven with the --fail-at-end (-fae) option. But this doesn't seem to work with Maven 3 anymore. Maybe it could be worth it for You filing a regression report for Maven 3 at [1]. #3 ... sound interesting! The most complicated thing here is to share data between two builds. But this might be possible with TeamCity artifact dependencies. I think this should work fine. I did something similar for a customer with TeamCity: A main build created the deployable archives using Maven and another build was tiggered when the main build finished (successfully) and used Ant to deploy the archives. I remember that I configured die 'Artifact Paths' in 'General Settings' to (sort of) published the relevant files, so that they can be accessed by the subsequent build (using the 'artifact dependencies' configuration?) Also developers would be informed that a build is broken, but need to wait until the 'report' build gets scheduled. I'd say they wouldn't need to wait much more time than they had/have to when using Your Ant builds. The 'report' build would be triggered immediately after the other one has finished (using the 'Finish Build trigger'). [1] http://jira.codehaus.org/browse/MNG - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
how to deploy a nonbuild maven war in tomcat with maven2
Hello, I have started using maven2. I want to deploy a non-build maven war in local installed tomcat with maven. After long search, I have found this: 4.0.0 deploy_war DeplyWarTomcat 1.0-SNAPSHOT war DeplyWarTomcat http://maven.apache.org /home/user/tomcat-6/apache-tomcat-6.0.29 org.codehaus.cargo cargo-maven2-plugin true tomcat6x installed ${catalina.home} existing ${catalina.home} installed com.dpillay.oworld oworld-webapp war verify-deploy install deployer-deploy start clean-undeploy pre-clean stop If I try it, there is no error indicated but it did nothing. I don't understand this part com.dpillay.oworld oworld-webapp war So how can I use it to answer to my need. Really I need your help please -- View this message in context: http://maven.40175.n5.nabble.com/how-to-deploy-a-nonbuild-maven-war-in-tomcat-with-maven2-tp4267525p4267525.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: Maven 3.0 Artefact/Dependency version discussion request
On 28/03/2011 4:30 AM, bryan.dollery wrote: Hi Ron, Maven isn't meant to be enforcing convention. It's meant to work without configuration /if/ convention fits in your particular domain. Where convention doesn't fit it's meant to be configurable. To a certain extent that is true but as you can see in the forum, there are limits As for best practice... Using maven for version management is /not/ best practice. It's a convention that maven has introduced and which doesn't really work very well. The ability to configure things in this area is critical to maven's success. Again, you can disagree with Maven's functionality and philosophy but it is very successful as it is. Final point: ant is not a substitute for maven. They are completely different things used for different purposes should not be directly compared. One is not substitutable for the other. Ant is a build system -- maven is much more than that. Some people want to do things in a very particular way. Ant is a very flexible system and can do anything that you want. Maven is a very powerful tool that supports a particular way of doing things. Ron Bryan -- View this message in context: http://maven.40175.n5.nabble.com/Re-Maven-3-0-Artefact-Dependency-version-discussion-request-tp83857p4267200.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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[Ann] castor-maven-plugin 2.1 Released
Hi, The Mojo team is pleased to announce the release of the castor-maven-plugin version 2.1. The Castor plugin is a Maven plugin that provides the functionality of Castor XML's code generator for generating Java beans and associated descriptor classes (required for marshalling to and unmarshalling from XML documents) from XML Schema files. http://mojo.codehaus.org/castor-maven-plugin/ To get this update, simply specify the version in your project's plugin configuration: plugin groupIdorg.codehaus.mojo/groupId artifactIdcastor-maven-plugin/artifactId version2.1/version /plugin Release Notes http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11191version=15486 Enjoy, The Mojo team. Werner Guttmann - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: embedded maven engine
Hello, I was wondering how this changed for the 3.x releases. Is it easier to embed the maven engine now or is better idea writing a plexus implementation? All I need is to have a resolver as a dependency in a project and make it able to load the dependencies to the classpath. Thanks in advance, ip On 10-Apr-08, at 12:16 PM, Jan Torben Heuer wrote: Hi, Is it possible to embed the maven engine in a java program? Yes, but it is based on the trunk work. So many changes have been made in 2.1 to better enable embedding that it's not possible to easily backport it to the current release branch. I think of using it as plugin management for an application. You don't need Maven specifically for this as Maven is one implementation of the system based on Plexus and Maven Artifact. The best working example of this in my opinion is the Jetty Run plugin. It has the logic to grab dependencies, and create classpaths if you need something right now. I want to define an artifact (my pointing to a pom or giving an group:artifact:version string. Then I want maven to resolve, download and add the artifact+dependencies to my classpath at runtime. Has anyone tried it, yet? If not, will it be worth a try? Thanks! Jan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Thanks, Jason 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
Antwort: Re: mvn deploy and site in one go
another idea could be to call Maven with the --fail-at-end (-fae) option. But this doesn't seem to work with Maven 3 anymore. Even if 'fail-at-end' was working: wouldn't the artifacts still be deployed, when running 'mvn deploy' ? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: how to deploy a nonbuild maven war in tomcat with maven2
I have started using maven2. I want to deploy a non-build maven war in local installed tomcat with maven. After long search, I have found this: 4.0.0 deploy_war DeplyWarTomcat 1.0-SNAPSHOT war As you can see, your email client stripped the XML. Go post this at pastebin.org and send a link to it, or find a different email client and resend. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: embedded maven engine
I was wondering how this changed for the 3.x releases. Is it easier to embed the maven engine now or is better idea writing a plexus implementation? All I need is to have a resolver as a dependency in a project and make it able to load the dependencies to the classpath. If that is all you need, then you can probably just use Aether directly. http://www.sonatype.com/people/2010/08/introducing-aether/ http://aether.sonatype.org/ Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: enforcer plugin rules to prevent circular dependencies
Thanks for the detailed reply Philip, Comments inline On Sat, Mar 26, 2011 at 3:43 AM, Phillip Hellewell ssh...@gmail.com wrote: On Fri, Mar 25, 2011 at 8:45 AM, Wendy Smoak wsm...@gmail.com wrote: On Fri, Mar 25, 2011 at 5:55 AM, Caoilte O'Connor caoi...@gmail.com wrote: Hi, I've just discovered the enforcer plugin and would like to use it to reduce our dependency conflicts but a bigger problem for us when it does turn up are circular dependencies. The Dependency Tree plugin spots these, but does anyone have any rules for the enforcer plugin to fail the build if it occurs? I wrote a plugin to do it. It uses org.apache.maven.shared.dependency.tree.DependencyTreeBuilder to get the list of DependencyNode. Then it cycles through each one calling getArtifact() and compares it to see if it is the same as the main project's Artifact (same group id and artifact id). In other words, if any of my dependencies are myself, then it throws an exception. Were you able to release this anywhere or is it something I could re-develop easily enough with the DependencyTreeBuilder. In what situation does the build get far enough to use a plugin to detect this? I thought Maven would just stop with an error if it encountered a cycle. I have heard that it will catch a cycle in a reactor build, but otherwise no, it won't catch it. That's why I submitted this bug a couple months ago: http://jira.codehaus.org/browse/MNG-4999 I don't think it is really possible to introduce a cycle when using releases, but it is definitely possible with snapshots (just follow the steps in the bug). I think we were able to introduce this bug by having Version 2 of Project A depending on version 1 of Project B which depends on version 1 of Project A. Regards Caoilte
Re: Using Custom Developed Checkstyle Checks with packagenames.xml
On 2011-03-28 09:54, Makoto Sato wrote: Hi Dennis, Thank you for your suggestion. I haven't done that yet. It also doesn't work with the command line without using maven: This is usually a great way to see if your problem is with the tool itself, Checkstyle in your case, or with the Maven plugin. java -classpath checkstyle-5.3-all.jar;C:\Documents and Settings\beyondseeker\.m2\repository\com\objectfanatics\checkstyle\checks\0.0.1-SNAPSHOT\checks-0.0.1-SNAPSHOT.jar com.puppycrawl.tools.checkstyle.Main -f xml -c checkstyle.xml -r src/main/java Unable to create Checker: cannot initialize module TreeWalker - Unable to instantiate MethodLimit com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Unable to instantiate MethodLimit at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184) at com.puppycrawl.tools.checkstyle.Main.createChecker(Main.java:143) at com.puppycrawl.tools.checkstyle.Main.main(Main.java:120) Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate MethodLimit at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:155) at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:161) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184) at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157) ... 3 more Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate MethodLimitCheck at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:98) at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152) ... 6 more Regards, Makoto Sato - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Dennis Lundberg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: how do i compile an external ant project with maven?
I'm trying to port an exiting Ant build project to use Maven instead, this project depends upon another that is also built using Ant. I know in an ideal world it would be best to port both projects to using Maven, sadly that is not an option in this case (the business simply won't allow it). I've done much searching but so far I can't find any documentation to achieve this. Could someone point me in the right direction please? I know Googling is can be tough but please try maven build ant plugin and then pick the very first result to read the documentation you have been unable to find. I'd be curious to know what other search terms you were using when you did much searching and found nothing so the documentation can be improved and more easily found in the future. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: how to deploy a nonbuild maven war in tomcat with maven2
Sorry I can not understand what do you ask me to do -- View this message in context: http://maven.40175.n5.nabble.com/how-to-deploy-a-nonbuild-maven-war-in-tomcat-with-maven2-tp4267525p4268138.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: maven-metadata-local.xml localCopy
We're struggling with this as well! Our team has 5 inter-dependent projects (not circularly) and a dozen developers. Once any of the projects are 'mvn install'ed for any reason, they become locally managed and FORGET about getting any updates from Nexus ever again! While working on that project, it works like it should, i.e. I don't want Nexus stomping my work. But, once I'm done i want to turn control back over to Nexus (switch from locally managed to remotely managed). Now, I know we could edit localCopy to be false, but is that really a feature or a hassle? I would think using -U should do this. But, alas it does not. Instead of surgically altering our artifacts' metadata in the repository, It's just easier to delete the local repository (which is what we all do). Has this never come up in Maven-land? What do you maven-ites do in this situation? I did find the following bug: http://jira.codehaus.org/browse/MNG-4142 But, I haven't tried the patch because building/running a custom build of maven seems too hack-ish. Let's vote this up and get it fixed! Thanks, Mike Halvor Platou wrote: Thanks for the answers! We are using version 2.2.1. Remember that you need to build the artifact at your computer for the maven-metadata-local.xml to be written to your local repository with the lt;localCopygt; tag. I now also see that there are two maven-metadata-local.xml. One in the root folder of the artifact in the repository and one inside the x.x-SNAPSHOT folder. It is only the one inside the x.x-SNAPSHOT folder that has this content. Here is an example: lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt; lt;metadatagt; lt;groupIdgt;com.mycomplt;/groupIdgt; lt;artifactIdgt;testlt;/artifactIdgt; lt;versiongt;1.0-SNAPSHOTlt;/versiongt; lt;versioninggt; lt;snapshotgt; lt;localCopygt;truelt;/localCopygt; lt;/snapshotgt; lt;lastUpdatedgt;20100422213001lt;/lastUpdatedgt; lt;/versioninggt; lt;/metadatagt; Halvor On Apr22, 2010, at 8:23 PM, Ron Wheeler wrote: gt; What version of Maven? gt; gt; I do not see that tag in my local repo. I only checked a few Artifacts gt; but none of them had that line. gt; I am using Maven 2.2.1 under Eclipse but I am not sure that this would gt; make any difference. gt; gt; Sorry that I am not more help but perhaps one of the smart guys might gt; know what is happening. gt; gt; Ron gt; gt; On 22/04/2010 2:13 PM, Halvor Platou wrote: gt;gt; Yes, these are all SNAPSHOT versions. Earlier this has not bee a problem, but now it seems to be very consistent behavior. We have tried this with several computers and they all show the same problem. We have also tried with several remote repositories. Does anyone know the meaning of thelt;localCopygt; in maven-metadata.xml? gt;gt; gt;gt; Halvor gt;gt; gt;gt; gt;gt; On Apr22, 2010, at 8:01 PM, Ron Wheeler wrote: gt;gt; gt;gt; gt;gt;gt; On 22/04/2010 11:00 AM, Halvor Platou wrote: gt;gt;gt; gt;gt;gt;gt; Hello gt;gt;gt;gt; gt;gt;gt;gt; We have a problem concerning building of maven snapshot artifacts that seems very odd. gt;gt;gt;gt; gt;gt;gt;gt; Let's say we have artifact: quot;Aquot; and artifact: quot;Bquot;. gt;gt;gt;gt; quot;Aquot; depends on quot;Bquot;. gt;gt;gt;gt; If we build both of these on one computer, everything seems fine. gt;gt;gt;gt; gt;gt;gt;gt; If then artifact quot;Bquot; is built and deployed(Nexus) on a different computer, quot;mvn install -Uquot; on artifact quot;Aquot; on the first computer will not get the new artifact quot;Bquot;, but use the one in the local repository. gt;gt;gt;gt; gt;gt;gt;gt; It seems that when we build locally the file quot;maven-metadata-local.xmlquot; is created in the local repository containinglt;localCopygt;truelt;/localCopygt;. As long as this is set to true it will not get any new artifacts from the remote repository(Nexus) even if they are newer and we specify -U. Removing the localCopy line or changing it to false will make it download the new artifact. gt;gt;gt;gt; gt;gt;gt;gt; Is it supposed to be like this? And has it always been like this? gt;gt;gt;gt; gt;gt;gt;gt; Halvor gt;gt;gt;gt; gt;gt;gt;gt; gt;gt;gt; Since you are deploying multiple times, you should be using SNAPSHOTS gt;gt;gt; and you should always get the latest from the Nexus. gt;gt;gt; gt;gt;gt; If they are releases, then it should not matter whether you get it from gt;gt;gt; your local repo or somewhere else since releases are immutable and all gt;gt;gt; copies of the same release versions are supposed to be identical. gt;gt;gt; gt;gt;gt; If you make a mistake in a release, you have to delete the bad copy from gt;gt;gt; everywhere that has the wrong release. gt;gt;gt; gt;gt;gt; gt;gt;gt; Ron gt;gt;gt; gt;gt;gt; gt;gt;gt; gt;gt;gt; - gt;gt;gt; To unsubscribe, e-mail:
Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2)
Hi, I have a small problem with some dependency. First a word about my environment : Eclipse Helios Maven with the M2Eclipse plugin Maven 3.0.2 jdk 1.6 Windows 7 My project is made of 1 parent project and 2 other projects (modules). First i had a problem with the ojdbc14 library. It was complaining that it could not find the ojdbc14.jar : com.oracle:ojdbc14:jar:10.2.0.2.0 So I fixed it with the following command : mvn install:install-file -Dfile=D:\Dev\oracle\oracleexpress\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar -Dpackaging=jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 I added it to the local repository. But then i get another error when i run mvn install from Eclipse, using the M2eclipse plugin : [ERROR] Failed to execute goal on project projet.core: Could not resolve dependencies for project fr.celinio.gwt:projet.core:jar:0.0.1-SNAPSHOT: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) - [Help 1] So I installed the jta:jar in my local repository, like i did for the ojdbc.jar library : mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=D:\Temp\jta-1_1-classes.jar But why does it keep looking into the central repository (http://repo1.maven.org/maven2) ? Shouldn't Maven look first in the local repository, find the library and then skip looking in the central repository ? Here is the pom.xml of my parent project : 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/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdfr.celinio.gwt/groupId artifactIdprojet.parent/artifactId version0.0.1-SNAPSHOT/version packagingpom/packaging nameprojet.parent/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies modules moduleprojet.core/module module../projet.gwt/module /modules /project Here is the pom.xml of the projet.core module (the project with the ojdbc14.jar dependency) : ?xml version=1.0? project xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; modelVersion4.0.0/modelVersion parent artifactIdprojet.parent/artifactId groupIdfr.celinio.gwt/groupId version0.0.1-SNAPSHOT/version /parent groupIdfr.celinio.gwt/groupId artifactIdprojet.core/artifactId version0.0.1-SNAPSHOT/version nameprojet.core/name packagingjar/packaging build resources resource directorysrc/main/java/directory includes include**/*.java/include /includes /resource !-- resource -- !-- directorysrc/main/resources/directory -- !-- includes -- !-- include**/*.*xml/include -- !-- include**/*.*properties/include -- !-- /includes -- !-- /resource -- /resources testResources testResource directorysrc/test/java/directory includes include**/*.*/include /includes /testResource /testResources /build urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties !-- repositories -- !-- repository -- !-- idjava.net/id -- !-- nameThe Java.net Maven repository/name -- !-- urlhttp://download.java.net/maven/2/url -- !-- /repository -- !-- /repositories -- dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version3.2.6.ga/version /dependency dependency groupIdorg.springframework/groupId artifactIdspring/artifactId version2.5.6/version /dependency dependency groupIdcom.oracle/groupId artifactIdojdbc14/artifactId version10.2.0.1.0/version /dependency /dependencies /project And here is the pom.xml of the other module : ?xml version=1.0 encoding=UTF-8? 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; !-- POM file generated with GWT webAppCreator --
Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2)
I would like to add more information : 1) C:\Users\userbob\.m2\ does not have a settings.xml file. 2) Rebuilding the index of the local repository in Eclipse (Repositories view) did not change anything Does anyone have an idea ? Thanks. --- On Mon, 3/28/11, Celinio Fernandes cel...@yahoo.com wrote: From: Celinio Fernandes cel...@yahoo.com Subject: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) To: Maven Users List users@maven.apache.org Date: Monday, March 28, 2011, 1:07 PM Hi, I have a small problem with some dependency. First a word about my environment : Eclipse Helios Maven with the M2Eclipse plugin Maven 3.0.2 jdk 1.6 Windows 7 My project is made of 1 parent project and 2 other projects (modules). First i had a problem with the ojdbc14 library. It was complaining that it could not find the ojdbc14.jar : com.oracle:ojdbc14:jar:10.2.0.2.0 So I fixed it with the following command : mvn install:install-file -Dfile=D:\Dev\oracle\oracleexpress\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar -Dpackaging=jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 I added it to the local repository. But then i get another error when i run mvn install from Eclipse, using the M2eclipse plugin : [ERROR] Failed to execute goal on project projet.core: Could not resolve dependencies for project fr.celinio.gwt:projet.core:jar:0.0.1-SNAPSHOT: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) - [Help 1] So I installed the jta:jar in my local repository, like i did for the ojdbc.jar library : mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=D:\Temp\jta-1_1-classes.jar But why does it keep looking into the central repository (http://repo1.maven.org/maven2) ? Shouldn't Maven look first in the local repository, find the library and then skip looking in the central repository ? Here is the pom.xml of my parent project : 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/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdfr.celinio.gwt/groupId artifactIdprojet.parent/artifactId version0.0.1-SNAPSHOT/version packagingpom/packaging nameprojet.parent/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies modules moduleprojet.core/module module../projet.gwt/module /modules /project Here is the pom.xml of the projet.core module (the project with the ojdbc14.jar dependency) : ?xml version=1.0? project xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; modelVersion4.0.0/modelVersion parent artifactIdprojet.parent/artifactId groupIdfr.celinio.gwt/groupId version0.0.1-SNAPSHOT/version /parent groupIdfr.celinio.gwt/groupId artifactIdprojet.core/artifactId version0.0.1-SNAPSHOT/version nameprojet.core/name packagingjar/packaging build resources resource directorysrc/main/java/directory includes include**/*.java/include /includes /resource !-- resource -- !-- directorysrc/main/resources/directory -- !-- includes -- !-- include**/*.*xml/include -- !-- include**/*.*properties/include -- !-- /includes -- !-- /resource -- /resources testResources testResource directorysrc/test/java/directory includes include**/*.*/include /includes /testResource /testResources /build urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties !-- repositories -- !-- repository -- !-- idjava.net/id -- !-- nameThe Java.net Maven repository/name -- !-- urlhttp://download.java.net/maven/2/url -- !-- /repository -- !-- /repositories -- dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version3.2.6.ga/version /dependency dependency groupIdorg.springframework/groupId artifactIdspring/artifactId
Re: how to deploy a nonbuild maven war in tomcat with maven2
Sorry I can not understand what do you ask me to do Look here to see how your email looks to the rest of the email list: http://mail-archives.apache.org/mod_mbox/maven-users/201103.mbox/%3c1301316001204-4267525.p...@n5.nabble.com%3e There are no XML tags in the email body, just the tag values, so it doesn't make any sense. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2)
Install both files again, and this time add the parameter -DgeneratePom=true along with the others. mvn install:install-file -Dfile=...\lib\ojdbc14.jar -Dpackaging=jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 -DgeneratePom=true mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=D:\Temp\jta-1_1-classes.jar -DgeneratePom=true That should resolve the issues you're seeing. This defaults to true in recent releases but I have no idea what version you're running. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2)
It appears that you are not running a repository. You might find Nexus (or one of the other free Maven repos) as a good solution for your problem. Really a big help in working with Maven. Ron On 28/03/2011 4:07 PM, Celinio Fernandes wrote: Hi, I have a small problem with some dependency. First a word about my environment : Eclipse Helios Maven with the M2Eclipse plugin Maven 3.0.2 jdk 1.6 Windows 7 My project is made of 1 parent project and 2 other projects (modules). First i had a problem with the ojdbc14 library. It was complaining that it could not find the ojdbc14.jar : com.oracle:ojdbc14:jar:10.2.0.2.0 So I fixed it with the following command : mvn install:install-file -Dfile=D:\Dev\oracle\oracleexpress\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar -Dpackaging=jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 I added it to the local repository. But then i get another error when i run mvn install from Eclipse, using the M2eclipse plugin : [ERROR] Failed to execute goal on project projet.core: Could not resolve dependencies for project fr.celinio.gwt:projet.core:jar:0.0.1-SNAPSHOT: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) - [Help 1] So I installed the jta:jar in my local repository, like i did for the ojdbc.jar library : mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=D:\Temp\jta-1_1-classes.jar But why does it keep looking into the central repository (http://repo1.maven.org/maven2) ? Shouldn't Maven look first in the local repository, find the library and then skip looking in the central repository ? Here is the pom.xml of my parent project : 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/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdfr.celinio.gwt/groupId artifactIdprojet.parent/artifactId version0.0.1-SNAPSHOT/version packagingpom/packaging nameprojet.parent/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies modules moduleprojet.core/module module../projet.gwt/module /modules /project Here is the pom.xml of the projet.core module (the project with the ojdbc14.jar dependency) : ?xml version=1.0? project xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; modelVersion4.0.0/modelVersion parent artifactIdprojet.parent/artifactId groupIdfr.celinio.gwt/groupId version0.0.1-SNAPSHOT/version /parent groupIdfr.celinio.gwt/groupId artifactIdprojet.core/artifactId version0.0.1-SNAPSHOT/version nameprojet.core/name packagingjar/packaging build resources resource directorysrc/main/java/directory includes include**/*.java/include /includes /resource !--resource -- !--directorysrc/main/resources/directory -- !--includes -- !--include**/*.*xml/include -- !--include**/*.*properties/include -- !--/includes -- !--/resource -- /resources testResources testResource directorysrc/test/java/directory includes include**/*.*/include /includes /testResource /testResources /build urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties !--repositories -- !--repository -- !--idjava.net/id -- !--nameThe Java.net Maven repository/name -- !--urlhttp://download.java.net/maven/2/url -- !--/repository -- !--/repositories -- dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version3.2.6.ga/version /dependency dependency groupIdorg.springframework/groupId artifactIdspring/artifactId version2.5.6/version /dependency dependency groupIdcom.oracle/groupId artifactIdojdbc14/artifactId version10.2.0.1.0/version /dependency /dependencies /project And here is the pom.xml of the other module : ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0;
Re: how to deploy a nonbuild maven war in tomcat with maven2
You are right. I will attach my pom.xml with this post. That is it http://maven.40175.n5.nabble.com/file/n4268650/pom.xml pom.xml I don't nderstant how to define the path to the war generated by a non build maven. thank you very much for any help -- View this message in context: http://maven.40175.n5.nabble.com/how-to-deploy-a-nonbuild-maven-war-in-tomcat-with-maven2-tp4267525p4268650.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: how to deploy a nonbuild maven war in tomcat with maven2
Sorry again. Now this is the right link to the pom.xml: http://pastebin.com/9yZri8Xm http://pastebin.com/9yZri8Xm -- View this message in context: http://maven.40175.n5.nabble.com/how-to-deploy-a-nonbuild-maven-war-in-tomcat-with-maven2-tp4267525p4268660.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: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2)
Thanks but i am running a recent version (Maven 3.0.2, I mentionned it in my previous post) so that -DgeneratePom option already defaults to true. However i did try again and added this option to install again the missing libraries. The result is the same, I still get that error. If anyone else has an idea, please let me know. Thanks. --- On Mon, 3/28/11, Wayne Fay wayne...@gmail.com wrote: From: Wayne Fay wayne...@gmail.com Subject: Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) To: Maven Users List users@maven.apache.org Date: Monday, March 28, 2011, 2:20 PM Install both files again, and this time add the parameter -DgeneratePom=true along with the others. mvn install:install-file -Dfile=...\lib\ojdbc14.jar -Dpackaging=jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 -DgeneratePom=true mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=D:\Temp\jta-1_1-classes.jar -DgeneratePom=true That should resolve the issues you're seeing. This defaults to true in recent releases but I have no idea what version you're running. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2)
Thanks but I do not need to run my own repository at this stage. I am just trying to develop some small and personal projects. I hope there is another way to fix this problem anyways. Does anyone else have an idea ? Thanks. --- On Mon, 3/28/11, Ron Wheeler rwhee...@artifact-software.com wrote: From: Ron Wheeler rwhee...@artifact-software.com Subject: Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) To: users@maven.apache.org Date: Monday, March 28, 2011, 6:48 PM It appears that you are not running a repository. You might find Nexus (or one of the other free Maven repos) as a good solution for your problem. Really a big help in working with Maven. Ron On 28/03/2011 4:07 PM, Celinio Fernandes wrote: Hi, I have a small problem with some dependency. First a word about my environment : Eclipse Helios Maven with the M2Eclipse plugin Maven 3.0.2 jdk 1.6 Windows 7 My project is made of 1 parent project and 2 other projects (modules). First i had a problem with the ojdbc14 library. It was complaining that it could not find the ojdbc14.jar : com.oracle:ojdbc14:jar:10.2.0.2.0 So I fixed it with the following command : mvn install:install-file -Dfile=D:\Dev\oracle\oracleexpress\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar -Dpackaging=jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 I added it to the local repository. But then i get another error when i run mvn install from Eclipse, using the M2eclipse plugin : [ERROR] Failed to execute goal on project projet.core: Could not resolve dependencies for project fr.celinio.gwt:projet.core:jar:0.0.1-SNAPSHOT: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) - [Help 1] So I installed the jta:jar in my local repository, like i did for the ojdbc.jar library : mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=D:\Temp\jta-1_1-classes.jar But why does it keep looking into the central repository (http://repo1.maven.org/maven2) ? Shouldn't Maven look first in the local repository, find the library and then skip looking in the central repository ? Here is the pom.xml of my parent project : 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/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdfr.celinio.gwt/groupId artifactIdprojet.parent/artifactId version0.0.1-SNAPSHOT/version packagingpom/packaging nameprojet.parent/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies modules moduleprojet.core/module module../projet.gwt/module /modules /project Here is the pom.xml of the projet.core module (the project with the ojdbc14.jar dependency) : ?xml version=1.0? project xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; modelVersion4.0.0/modelVersion parent artifactIdprojet.parent/artifactId groupIdfr.celinio.gwt/groupId version0.0.1-SNAPSHOT/version /parent groupIdfr.celinio.gwt/groupId artifactIdprojet.core/artifactId version0.0.1-SNAPSHOT/version nameprojet.core/name packagingjar/packaging build resources resource directorysrc/main/java/directory includes include**/*.java/include /includes /resource !--resource -- !--directorysrc/main/resources/directory -- !--includes -- !--include**/*.*xml/include -- !--include**/*.*properties/include -- !--/includes -- !--/resource -- /resources testResources testResource directorysrc/test/java/directory includes include**/*.*/include /includes /testResource /testResources /build urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties !--repositories -- !--repository -- !--idjava.net/id -- !--nameThe Java.net Maven repository/name -- !--urlhttp://download.java.net/maven/2/url -- !--/repository -- !--/repositories -- dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version
Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2)
I fixed my problem by adding the following repository in the project.core/pom.xml file : repositories repository idmaven2-repository.dev.java.net/id nameJava.net Repository for Maven/name urlhttp://download.java.net/maven/2/ /url layoutdefault/layout snapshots enabledfalse/enabled /snapshots releases enabledtrue/enabled /releases /repository /repositories /repository However, I would like to know / understand why installing the indirectly referenced jta-1.0.1B.jar library in my local repository did not work. It keeps looking in the global repository. Isn't Maven supposed to first check the libraries that are available in the local repository and then eventually check the global repository (or any other repository) ? Thanks. --- On Mon, 3/28/11, Celinio Fernandes cel...@yahoo.com wrote: From: Celinio Fernandes cel...@yahoo.com Subject: Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) To: Maven Users List users@maven.apache.org Date: Monday, March 28, 2011, 1:13 PM I would like to add more information : 1) C:\Users\userbob\.m2\ does not have a settings.xml file. 2) Rebuilding the index of the local repository in Eclipse (Repositories view) did not change anything Does anyone have an idea ? Thanks. --- On Mon, 3/28/11, Celinio Fernandes cel...@yahoo.com wrote: From: Celinio Fernandes cel...@yahoo.com Subject: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) To: Maven Users List users@maven.apache.org Date: Monday, March 28, 2011, 1:07 PM Hi, I have a small problem with some dependency. First a word about my environment : Eclipse Helios Maven with the M2Eclipse plugin Maven 3.0.2 jdk 1.6 Windows 7 My project is made of 1 parent project and 2 other projects (modules). First i had a problem with the ojdbc14 library. It was complaining that it could not find the ojdbc14.jar : com.oracle:ojdbc14:jar:10.2.0.2.0 So I fixed it with the following command : mvn install:install-file -Dfile=D:\Dev\oracle\oracleexpress\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar -Dpackaging=jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 I added it to the local repository. But then i get another error when i run mvn install from Eclipse, using the M2eclipse plugin : [ERROR] Failed to execute goal on project projet.core: Could not resolve dependencies for project fr.celinio.gwt:projet.core:jar:0.0.1-SNAPSHOT: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) - [Help 1] So I installed the jta:jar in my local repository, like i did for the ojdbc.jar library : mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=D:\Temp\jta-1_1-classes.jar But why does it keep looking into the central repository (http://repo1.maven.org/maven2) ? Shouldn't Maven look first in the local repository, find the library and then skip looking in the central repository ? Here is the pom.xml of my parent project : 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/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdfr.celinio.gwt/groupId artifactIdprojet.parent/artifactId version0.0.1-SNAPSHOT/version packagingpom/packaging nameprojet.parent/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies modules moduleprojet.core/module module../projet.gwt/module /modules /project Here is the pom.xml of the projet.core module (the project with the ojdbc14.jar dependency) : ?xml version=1.0? project xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; modelVersion4.0.0/modelVersion parent artifactIdprojet.parent/artifactId groupIdfr.celinio.gwt/groupId version0.0.1-SNAPSHOT/version /parent groupIdfr.celinio.gwt/groupId artifactIdprojet.core/artifactId version0.0.1-SNAPSHOT/version nameprojet.core/name packagingjar/packaging build resources resource directorysrc/main/java/directory includes include**/*.java/include /includes /resource !-- resource -- !-- directorysrc/main/resources/directory -- !-- includes -- !--
Re: how to deploy a nonbuild maven war in tomcat with maven2
I don't nderstant how to define the path to the war generated by a non build maven. I don't understand your question. Tell us in the simplest possible terms what you have, what you are trying to get, and what you have tried that has failed. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2)
First i had a problem with the ojdbc14 library. It was complaining that it could not find the ojdbc14.jar : com.oracle:ojdbc14:jar:10.2.0.2.0 So I fixed it with the following command : mvn install:install-file -Dfile=D:\Dev\oracle\oracleexpress\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar -Dpackaging=jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 I expect your problems are related to version issues 10.2.0.2.0 in the error vs the 10.2.0.1.0 in your install-file line. Probably you had similar problems with the jta artifact and just didn't even realize it until you added the Java.net repo and Maven was able to download the missing files. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: myfaces-sample pom.xml + web.xml change
I am trying to use myfaces-example-simple20-1.1.10.war pom.xml file that comes with the application But when I try to recreate a new war I get the following error : You should ask this question on the MyFaces Usre list and see if they can help. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2)
Good point but actually i later changed the version of the oracle driver in the pom.xml file : 10.2.0.2.0 to 10.2.0.1.0 I copy-pasted the previous error message (that i had saved somewhere), before i changed the version and before I manually added the oracle driver (10.2.0.1.0) in my local repository. So i suppose the problem is elsewhere. Thanks. --- On Mon, 3/28/11, Wayne Fay wayne...@gmail.com wrote: From: Wayne Fay wayne...@gmail.com Subject: Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) To: Maven Users List users@maven.apache.org Date: Monday, March 28, 2011, 8:30 PM First i had a problem with the ojdbc14 library. It was complaining that it could not find the ojdbc14.jar : com.oracle:ojdbc14:jar:10.2.0.2.0 So I fixed it with the following command : mvn install:install-file -Dfile=D:\Dev\oracle\oracleexpress\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar -Dpackaging=jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 I expect your problems are related to version issues 10.2.0.2.0 in the error vs the 10.2.0.1.0 in your install-file line. Probably you had similar problems with the jta artifact and just didn't even realize it until you added the Java.net repo and Maven was able to download the missing files. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2)
On 28/03/2011 10:41 PM, Celinio Fernandes wrote: Thanks but I do not need to run my own repository at this stage. I am just trying to develop some small and personal projects. I hope there is another way to fix this problem anyways. If you had installed a free repo, you would have had this fixed in an hour rather than 2 days. Ron Does anyone else have an idea ? Thanks. --- On Mon, 3/28/11, Ron Wheelerrwhee...@artifact-software.com wrote: From: Ron Wheelerrwhee...@artifact-software.com Subject: Re: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) To: users@maven.apache.org Date: Monday, March 28, 2011, 6:48 PM It appears that you are not running a repository. You might find Nexus (or one of the other free Maven repos) as a good solution for your problem. Really a big help in working with Maven. Ron On 28/03/2011 4:07 PM, Celinio Fernandes wrote: Hi, I have a small problem with some dependency. First a word about my environment : Eclipse Helios Maven with the M2Eclipse plugin Maven 3.0.2 jdk 1.6 Windows 7 My project is made of 1 parent project and 2 other projects (modules). First i had a problem with the ojdbc14 library. It was complaining that it could not find the ojdbc14.jar : com.oracle:ojdbc14:jar:10.2.0.2.0 So I fixed it with the following command : mvn install:install-file -Dfile=D:\Dev\oracle\oracleexpress\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar -Dpackaging=jar -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 I added it to the local repository. But then i get another error when i run mvn install from Eclipse, using the M2eclipse plugin : [ERROR] Failed to execute goal on project projet.core: Could not resolve dependencies for project fr.celinio.gwt:projet.core:jar:0.0.1-SNAPSHOT: Could not find artifact javax.transaction:jta:jar:1.0.1B in central (http://repo1.maven.org/maven2) - [Help 1] So I installed the jta:jar in my local repository, like i did for the ojdbc.jar library : mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=D:\Temp\jta-1_1-classes.jar But why does it keep looking into the central repository (http://repo1.maven.org/maven2) ? Shouldn't Maven look first in the local repository, find the library and then skip looking in the central repository ? Here is the pom.xml of my parent project : 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/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdfr.celinio.gwt/groupId artifactIdprojet.parent/artifactId version0.0.1-SNAPSHOT/version packagingpom/packaging nameprojet.parent/name urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies modules moduleprojet.core/module module../projet.gwt/module /modules /project Here is the pom.xml of the projet.core module (the project with the ojdbc14.jar dependency) : ?xml version=1.0? project xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; modelVersion4.0.0/modelVersion parent artifactIdprojet.parent/artifactId groupIdfr.celinio.gwt/groupId version0.0.1-SNAPSHOT/version /parent groupIdfr.celinio.gwt/groupId artifactIdprojet.core/artifactId version0.0.1-SNAPSHOT/version nameprojet.core/name packagingjar/packaging build resources resource directorysrc/main/java/directory includes include**/*.java/include /includes /resource !--resource -- !--directorysrc/main/resources/directory -- !--includes -- !--include**/*.*xml/include -- !--include**/*.*properties/include -- !--/includes -- !--/resource -- /resources testResources testResource directorysrc/test/java/directory includes include**/*.*/include /includes /testResource /testResources /build urlhttp://maven.apache.org/url properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties !--repositories -- !--repository -- !--idjava.net/id -- !--nameThe Java.net Maven repository/name -- !--urlhttp://download.java.net/maven/2/url -- !--/repository
Re: how to deploy a nonbuild maven war in tomcat with maven2
I have a war generated by a non build maven. this war is placed in /home/usr/ws/myapp/target/app.war I want to create a maven project that can deploy this war into installed tomcat (/usr/home/tomcat-6), launch it. The next step is to run some selenium tests on this war. I have created a maven project with the pom linked but it does not work. there is no error displayed and it does nothing ( no war deployed). I hope that this clarify my need. Thank you very much for your help -- View this message in context: http://maven.40175.n5.nabble.com/how-to-deploy-a-nonbuild-maven-war-in-tomcat-with-maven2-tp4267525p4268820.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