Re: Error while compiling : annotations are not supported in -source 1.3
What does your Java home point to? Do you have Java 1.3 installed somewhere? Are you running Maven in an IDE? If you type mvn -version what prints out. Ron On 16/01/2011 1:11 AM, ankured182 wrote: Hi . I'm getting this Error annotations are not supported in -source 1.3 while trying to compile a Java EE project which has a simple entity that uses JPA , from the root file je(which has the pom.xml) . I'm using MAven 2.2.1 . Its obvious that Maven not detecting the JAVA 6. In many forums that I went through that addressed this issue, the problem seemed to have been solved by adding: configuration source1.6/source target1.6/target /configuration My pom.xml has this included already, but I'm still getting that error. : This is the ScreenShot of my command screen: http://maven.40175.n5.nabble.com/file/n3343153/mvn.jpg This is my pom.xml: 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 groupIdorg.beginningee6.book/groupId artifactIdchapters/artifactId version2.0/version packagingpom/packaging nameChapters Parent/name descriptionRoot pom.xml for all the chapters' code/description modules modulechapter02/module /modules properties derby-version10.6.2.1/derby-version eclipselink-version2.1.2/eclipselink-version javax.persistence-version2.0.0/javax.persistence-version glassfish-version3.0.1-b20/glassfish-version grizzly-version1.8.6.3/grizzly-version jaxb-version2.1.10/jaxb-version jaxws-version2.2/jaxws-version jaxrs-version1.1.1/jaxrs-version jersey-version1.2/jersey-version jsf-version2.0/jsf-version junit-version4.8.2/junit-version plugin-jar-version2.3.1/plugin-jar-version plugin-war-version2.1.1/plugin-war-version plugin-maven-processor1.3.5/plugin-maven-processor plugin-maven-compiler2.3.2/plugin-maven-compiler plugin-maven-jaxws1.10/plugin-maven-jaxws xmlunit-version1.2/xmlunit-version project.build.sourceEncodingUTF-8/project.build.sourceEncoding project.reporting.outputEncodingUTF-8/project.reporting.outputEncoding /properties dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version${junit-version}/version scopetest/scope /dependency /dependencies repositories !--repository-- !--idmaven-repository.dev.java.net/id-- !--nameJava.net Repository for Maven 1/name-- !--urlhttp://download.java.net/maven/1/url-- !--layoutlegacy/layout-- !--/repository-- repository idmaven2-repository.dev.java.net/id nameJava.net Repository for Maven 2/name urlhttp://download.java.net/maven/2/url layoutdefault/layout /repository repository idglassfish-maven-repository.dev.java.net/id nameGlassFish Maven Repository/name urlhttp://download.java.net/maven/glassfish/url /repository repository idEclipseLink Repo/id nameEclipse maven repository http://eclipse.ialto.org/rt/eclipselink/maven.repo//name urlhttp://mirror.csclub.uwaterloo.ca/eclipse/rt/eclipselink/maven.repo//url /repository repository idEclipseLink Ialto Repo/id nameEclipse maven http://eclipse.ialto.com/rt/eclipselink/maven.repo//name urlhttp://www.eclipse.org/downloads/download.php?r=1amp;nf=1amp;file=/rt/eclipselink/maven.repo/url /repository !--repository-- !--idApache Repo/id-- !--nameApache repository for Derby/name-- !--urlhttp://people.apache.org/repo/m1-ibiblio-rsync-repository/url-- !--layoutlegacy/layout-- !--/repository-- /repositories pluginRepositories pluginRepository idmaven2-repository.dev.java.net/id urlhttp://download.java.net/maven/2/url /pluginRepository pluginRepository idmaven-annotation-plugin/id urlhttp://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo/url /pluginRepository /pluginRepositories build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version${plugin-maven-compiler}/version inheritedtrue/inherited configuration source1.6/source target1.6/target /configuration /plugin
dependency management multi-module
Hey all, I have a parent module with dependencies listed under the dependencymanagement section. I now have two modules under this parent, which are both pom packaging maven projects. both the sub parent projects have common dependencies along with some specific. If i put a dependencymanagement section under each of the sub parents, then the modules under each isn't able to import those specific dependencies. Is there any way to do this elegantly, or do i have to put all dependencies in the parent (which is not the end of the world). Thanks.
Re: dependency management multi-module
Nevermind, what i described does in fact work :) The error was I receiving was unrelated to having dependencymanagement in the two pom projects. On Sun, Jan 16, 2011 at 11:08 AM, CassUser CassUser cassu...@gmail.comwrote: Hey all, I have a parent module with dependencies listed under the dependencymanagement section. I now have two modules under this parent, which are both pom packaging maven projects. both the sub parent projects have common dependencies along with some specific. If i put a dependencymanagement section under each of the sub parents, then the modules under each isn't able to import those specific dependencies. Is there any way to do this elegantly, or do i have to put all dependencies in the parent (which is not the end of the world). Thanks.
Re: Missing goal eclipse:m2eclipse in version 2.8 of the Maven Eclipse plugin
On 18 December 2010 05:08, Barrie Treloar baerr...@gmail.com wrote: On Thu, Dec 16, 2010 at 9:39 PM, Stefan Eder stefan.e...@ebuconnect.de wrote: Hi, since quite a while I am using Maven and Eclipse together with the Eclipse plugin for Maven and the Maven plugin for Eclipse. And it is just great. But in the version 2.8 of the Eclipse plugin for Maven I am (hardly) missing the goal m2eclipse. How can I tell the version 2.8 of the Eclipse plugin to create .classpath files that refer to MAVEN2_CLASSPATH_CONTAINER and to add Maven nature and build command to the .project files without touching the corresponding poms? You don't, you use m2eclipse directly. If you are using m2eclipse, you *CAN NOT* use maven-eclipse-plugin, hence it being removed in 2.8 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org Just wondering why support for $ mvn eclipse:m2eclipse was dropped from the maven-eclipse-plugin in version 2.8? I don't understand why maven-eclipse-plugin and using m2eclipse are incompatible. What command line should I now be using instead? Or should I just stick with version 2.7? As I don't want to store the eclipse project in source control, or have to manually create the eclipse project. I just want a simple command line to automatically create the project file so I can them just import them, or re-execute and refresh the project. John - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-ear-plugin 2.5-SNAPSHOT has been unstable lately
Without a closer look to your setup, it's hard to tell. There's nothing special in this plugin that should lead to this particular error. Releasing 2.5 is on my todo list for quite some time now, I was mostly waiting from user's feedback. What are you using in 2.5 specifically? S. On Wed, Jan 12, 2011 at 11:12 AM, Viggo Navarsete viggo.navars...@gmail.com wrote: Hi, I'm using maven-ear-plugin 2.5-SNAPSHOT, and for the past week or so, we've had problems downloading it from Maven, output is this: Downloading: http://mavenrepo.pd.tracetracker.com:9998/repo/org/apache/maven/plugins/maven-ear-plugin/2.5-SNAPSHOT/maven-ear-plugin-2.5-20110111.075142-136.pom 7K downloaded Downloading: http://mavenrepo.pd.tracetracker.com:9998/repo/org/apache/maven/plugins/maven-ear-plugin/2.5-SNAPSHOT/maven-ear-plugin-2.5-20110111.075142-136.jar [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.maven.plugins ArtifactId: maven-ear-plugin Version: 2.5-20110111.075142-136 Reason: Unable to locate resource in repository Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-ear-plugin -Dversion=2.5-20110111.075142-136 -Dpackaging=maven-plugin -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-ear-plugin -Dversion=2.5-20110111.075142-136 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] org.apache.maven.plugins:maven-ear-plugin:maven-plugin:2.5-20110111.075142-136 from the specified remote repositories: marplemirror (http://mavenrepo.pd.tracetracker.com:9998/repo) We have artifactory which cache all external dependencies for us, and it seems that sometimes when we delete maven-ear-plugin 2.5-SNAPSHOT from our repo it works, but then a few days later it stops working again. Is this a problem with the metadata for this plugin, or something else? Another question: When will you release a stable version (2.5) of the maven-ear-plugin? I assume that would also help preventing this from happening in the first place. Best regards, Viggo Navarsete
Re: Missing goal eclipse:m2eclipse in version 2.8 of the Maven Eclipse plugin
On Mon, Jan 17, 2011 at 6:22 AM, John Patrick nhoj.patr...@gmail.com wrote: On 18 December 2010 05:08, Barrie Treloar baerr...@gmail.com wrote: On Thu, Dec 16, 2010 at 9:39 PM, Stefan Eder stefan.e...@ebuconnect.de wrote: Hi, since quite a while I am using Maven and Eclipse together with the Eclipse plugin for Maven and the Maven plugin for Eclipse. And it is just great. But in the version 2.8 of the Eclipse plugin for Maven I am (hardly) missing the goal m2eclipse. How can I tell the version 2.8 of the Eclipse plugin to create .classpath files that refer to MAVEN2_CLASSPATH_CONTAINER and to add Maven nature and build command to the .project files without touching the corresponding poms? You don't, you use m2eclipse directly. If you are using m2eclipse, you *CAN NOT* use maven-eclipse-plugin, hence it being removed in 2.8 [del] Just wondering why support for $ mvn eclipse:m2eclipse was dropped from the maven-eclipse-plugin in version 2.8? I don't understand why maven-eclipse-plugin and using m2eclipse are incompatible. m2eclipse is an Eclipse plugin that embed Maven. eclipse:eclipse is a Maven plugin that generates eclipse's files so you can import your Maven projects. Choose one and use it. They are maintained by two different groups and trying to import each others details is too error prone. What command line should I now be using instead? Or should I just stick with version 2.7? If you are using m2eclipse, then there is no need for command line. As I don't want to store the eclipse project in source control, or have to manually create the eclipse project. I just want a simple command line to automatically create the project file so I can them just import them, or re-execute and refresh the project. Neither m2eclipse or eclipse:eclipse require your to place eclipse project files in source control. m2eclipse will auto-generate the files for you. Since I dont use m2eclipse, I can't tell you how. You will need to read the documentation. It's meant to be simple. Probably something like Import... m2eclipse maven project... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: use of plugin and pluginmanagement
Wayne, Thanks for your concise statement. I'm new to maven and have been trying to figure out how to use maven by reading the documentation. What a quagmire. Maven documentation authors - please study Wayne's concise statement below. That is what we need in the Maven documentation. Not the long-winded, stream-of-consciousness that the existing maven docs currently are. --- On Fri, 1/14/11, Wayne Fay wayne...@gmail.com wrote: From: Wayne Fay wayne...@gmail.com Subject: Re: use of plugin and pluginmanagement To: Maven Users List users@maven.apache.org Date: Friday, January 14, 2011, 9:05 AM What extra things pluginManagement provides than using only plugins. PluginManagement does ONE THING ONLY (essentially). It provides a central location for all of your plugin versioning and configuration. THAT'S IT. You still need to declare the plugin in the build section of your various poms (children or parents) where you actually want to USE any of those plugins in your build. POM, why is that ? Because the maven documentationhttp://maven.apache.org/pom.html#Plugin_Managementsays you need to add plugin entry in your child POM to use that plugin (specified in parent POM's pluginManagement section,). I thought I will add that plugin in child pom only if I want to change version. Then you thought wrong. CASE2: if I donot use pluginManagement and only use plugins: --- In this case also I can get everything I want as above. All child pom gets the plugins define in parent pom without adding any entry. OS what's the difference? The plugins declared in the build section of your parent will be inherited (and executed) in all of those children poms. In many cases, you might only want a given plugin to actually be used in a few of those children, or even just one, and frequently not in the parent. So whats the point in going for pluginManagement, Is it only to Enforce to use same version of plugin and provide some clarity to whole application (parent and child) or it is for more than these? That is essentially the only purpose for pluginManagement. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: use of plugin and pluginmanagement
Maven documentation authors - please study Wayne's concise statement below. That is what we need in the Maven documentation. Not the long-winded, stream-of-consciousness that the existing maven docs currently are. Thanks Dean. I was just recently invited to join Maven dev team and I do plan to make some improvements to the documentation. ;-) It won't happen overnight, but hopefully we can make things easier for everyone. Along those lines... any suggestions you may have would be greatly appreciated!! Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Error while compiling : annotations are not supported in -source 1.3
Ron Thanks for the reply. I'm not running it in any IDE . straight from the command shell. No other Java versions running I guess, other than 1.6.0_22. and its Maven 2.2.1. http://maven.40175.n5.nabble.com/file/n3343936/maven2.jpg -- View this message in context: http://maven.40175.n5.nabble.com/Error-while-compiling-annotations-are-not-supported-in-source-1-3-tp3343153p3343936.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: Error while compiling : annotations are not supported in -source 1.3
I'm not running it in any IDE . straight from the command shell. No other Java versions running I guess, other than 1.6.0_22. and its Maven 2.2.1. Check what mvn help:effective-pom says when you run that from your project directory. Perhaps there is another compiler configuration that is being applied and you just don't even realize it? Also, why do you have the plugin-maven-compiler as a property instead of simply putting it directly in the plugin/ node? It seems like a bit of unnecessary indirection. I'd say the same thing about your other plugin versions that are listed as properties. You should use pluginManagement for this purpose. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org