Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 473F2FDEF for ; Mon, 13 May 2013 22:59:05 +0000 (UTC) Received: (qmail 87143 invoked by uid 500); 13 May 2013 22:59:03 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 87073 invoked by uid 500); 13 May 2013 22:59:03 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 26710 invoked by uid 99); 13 May 2013 14:54:18 -0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of corin.lawson@gmail.com designates 209.85.192.180 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=XZRw3BNsJsfjPgxjUhCqqELvugnr8+3vD1iYpa/66wI=; b=yyfDFTvR2VYJdYI+j/px5IWRtPLp6SIiplDOBWOgd1G+GlO4gaRrBXcsesbp1De19V MgVcR31F0Y4uKS5H4CEYBDcsxqQm3KHkZz2tNpDKhiKpUkSAMqHU/tzpiQWRgUiWTm5P BiZSr66MCplWIGgCdbNkOok5ak2CU0psIVjYb4WjnN6PdLtiDts/EEgF6VegFoXLDpTG gjVOo2VkDRzZKpw22MXJWXEVtCX0AlydW6MM8Ac0GxyueA4dNrCeuiK5P5KoNy4R1BBA aKpNMdgEWdtc2tsy23oY8+9e/y+fxU0j25wYJGgbnSRoPPLKN6c0//UpzLCdmdFEuAg0 Jhlw== MIME-Version: 1.0 X-Received: by 10.66.254.131 with SMTP id ai3mr14919446pad.54.1368456830280; Mon, 13 May 2013 07:53:50 -0700 (PDT) Date: Tue, 14 May 2013 00:53:50 +1000 Message-ID: Subject: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? From: Corin Lawson To: users@maven.apache.org Content-Type: multipart/alternative; boundary=047d7b111f9f42694a04dc9aaf68 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b111f9f42694a04dc9aaf68 Content-Type: text/plain; charset=ISO-8859-1 Hi, This seems like a pretty simple one and I'm hoping that I'll feel quite dim when I get answer... My environment: $ uname -srm Darwin 12.3.0 x86_64 $ $JAVA_HOME/bin/javac -version javac 1.7.0_21 javac: no source files Usage: javac where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath Specify where to find user class files -cp Specify where to find user class files -sourcepath Specify where to find input source files -bootclasspath Override location of bootstrap class files -extdirs Override location of installed extensions -endorseddirs Override location of endorsed standards path -d Specify where to place generated class files -encoding Specify character encoding used by source files -source Provide source compatibility with specified release -target Generate class files for specific VM version -version Version information -help Print a synopsis of standard options -X Print a synopsis of nonstandard options -J Pass directly to the runtime system $ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home $ mvn --version Apache Maven 3.0.4 (r1232337; 2012-01-17 19:44:56+1100) Maven home: /usr/share/maven Java version: 1.7.0_21, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.8.3", arch: "x86_64", family: "mac" (I note that 'Java home' is not set to my JAVA_HOME variable.) In my pom.xml I have: true org.apache.maven.plugins maven-compiler-plugin 3.1 1.7 1.7 UTF-8 true true ... Running `mvn compile` I encounter this message: [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? In disbelief I try: $ MAVEN_OPTS=-Dmaven.compiler.forceJavacCompilerUse=true mvn compile Only to encounter: [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] javac: invalid flag: -s I tried adding tools.jar to maven's classpath (without using forceJavacCompilerUse) but to no avail. It's almost as if maven-compiler-plugin is expecting tools.jar to be under java.home, but that is beyond belief... But maven-compiler-plugin doesn't seem to support JDK 1.7 (no -s argument)? Please point out the error of my ways :) Cheers, Corin. --047d7b111f9f42694a04dc9aaf68--