Re: snapshot built locally
Hello Chad, I think the behavior is the same, here's what I did: * I built multi-module project with mvn clean install - now all artifact are in my local repository. * I changed directory to the top-level module, which depends on other modules in the project and executed mvn clean install -U - Maven went to the remote repository for maven-metadata.xml. The only thing to check is whether Maven does the same next day without -U option. But I think it's logical that Maven checks for updates even for locally installed snapshots - otherwise, if you installed snapshot locally, it would block updates from remote repository. Regards, htfv (Aliaksei Lahachou) On Fri, Jul 13, 2012 at 10:53 PM, chad.da...@emc.com wrote: I understand that a SNAPSHOT dependency will be pulled from my local repository, and once a day maven will make a check for a newer version in remote repositories known to the build. Is this behavior the same if the SNAPSHOT dependency in local was built and installed from a local build?
Re: jdk version detect error
If you run 'mvn -v' you should see the JDK version used by Maven. The easiest way to change this is to adjust the JAVA_HOME environment variable. -Robert Op Sat, 14 Jul 2012 06:09:24 +0200 schreef larmbr nasa4...@gmail.com: I am running the netty project. when i run mvn clean install It crashed with an error: Detected JDK Version: 1.6.0-24 is not in the allowed range [1.7.0,) I first want to modify the pom file but It comments that: 1.7.0 jdk is needed,or may lead to problem So I update my jdk to 1.7.0 I have checked the java -version .It do be a 1.7.0 version! But maven still complain that the JDK version is 1.6.0. Why? -- View this message in context: http://maven.40175.n5.nabble.com/jdk-version-detect-error-tp5714118.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: unable to install plugin in eclipse IDE(Galileo)
Sir Thanks for your reply as you suggest that galileo is an old version that means it is not capable to install maven plugin??? On Thu, Jul 12, 2012 at 10:48 PM, Jörg Schaible joerg.schai...@gmx.dewrote: Galileo is simply too old. JDT 3.6 is at least Helios. Consider using a newer version of Eclipse. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Regards Rahul Bhalla (9953225211)
Re: Problem with maven and deleting files in a test case
The solution is to use a junit assumption to skip the test, e.g. Assume.assumeThat(Test fails on windows, System.getProperty(file.seperator.char), is(/)); Added to the start of each test method will cause them to be skipped on windows but run elsewhere... Note I am on my phone and memory is imperfect so the syntax will need tweaking Sent from my iPhone On 14 Jul 2012, at 03:42, esyimn...@gmx.de esyimn...@gmx.de wrote: Am 12.07.2012 23:19, schrieb Wayne Fay: With JUnit everthing is perfekt on Linux and Windows. With Maven it What version of JUnit and how are you calling it? works perfekt under Linux, but fails sometimes under Windows 7 64. What is the failure under Windows? Can you add code to trap that error and report the details? Do you have any idea why it fails sometimes but not always? I know there is an issue with file handling on Windows that does not exists on Linux, but wondering that JUnit do the trick and Maven don't do it (sometimes). Does anyone knows a solution, if it is a Maven problem? For good measure, I'd suggest adding config to your pom to specify the Surefire version: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.12/version dependencies dependency groupIdorg.apache.maven.surefire/groupId artifactIdsurefire-junit47/artifactId version2.12/version /dependency /dependencies /plugin /plugins /build Windows is annoying for reasons like this so I try to stay on OSX and Linux whenever possible. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org Damn, you made my day! Now everything works like I expected. Yes, I understand if you don't want to download and execute code like this. It was just a try to bring this thread fast forward. The maven-surefire-plugin-hint above was all I needed. I did the JUnit tests with version 4.8.1 using eclipse and just hit the run button some times with no error. If I do it with mvn clean install using the command prompt with the following pom, I got an error after a few hits on enter. modelVersion4.0.0/modelVersion groupIdtest/groupId artifactIdmaven-file-test/artifactId version0.0.1-SNAPSHOT/version packagingjar/packaging namemaven-file-test/name properties project.build.sourceEncodingUTF-8/project.build.sourceEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.8.1/version scopetest/scope /dependency /dependencies My code is quite simple. A method that writes a file and another one that deletes a file. The first test inside the test class writes the file, the second test case delete it. And I know that it may failed because of the underlying platform like the javadoc told, for example, in FileOutputStream. After I added a third test case with a loop around writing and deleting - which is much as faster as I can do it by pressing the run button inside an IDE ;) - and after I added maven-surefire-plugin to my pom like you told, I saw that both executions (IDE and command prompt) ends with an error. With the IDE after a while also and with the command prompt not as often as before. The different frequency of the error appearance made me mad. The next two questens I have to find out are: 1. What does the maven-surefire-plugin exactly do? It still fails, but not so much like without it. 2. Is there a way to avoid running tests with maven depends on the OS if I reach a level where no independent solution exists like loading a C-lib for example, don't care if it is a good idea? Your hint let my go in the right direction again. Thanks! - 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: Problem with maven and deleting files in a test case
1. What does the maven-surefire-plugin exactly do? It still fails, but not so much like without it. You were already using Surefire, you just had not declared a specific version of the plugin to use, so you were probably using an earlier version that might have had a bug which is resolved in 2.12, or something along those lines. 2. Is there a way to avoid running tests with maven depends on the OS if I reach a level where no independent solution exists like loading a C-lib for example, don't care if it is a good idea? Stephen already answered this one. Add code which tests for the OS and bails (with a warning) if this test cannot be executed in the current OS. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: unable to install plugin in eclipse IDE(Galileo)
as you suggest that galileo is an old version that means it is not capable to install maven plugin??? Yes, this is what he said. Upgrade your Eclipse. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org