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 4D37D107E1 for ; Sun, 7 Jul 2013 12:29:50 +0000 (UTC) Received: (qmail 45652 invoked by uid 500); 7 Jul 2013 12:29:46 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 45496 invoked by uid 500); 7 Jul 2013 12:29:40 -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 45487 invoked by uid 99); 7 Jul 2013 12:29:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Jul 2013 12:29:39 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [81.169.146.160] (HELO mo-p00-ob.rzone.de) (81.169.146.160) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Jul 2013 12:29:34 +0000 X-RZG-AUTH: :LX4Be0SIeu16wbNasv8W8RZQEB+YvnQt4cE3HTyWZOEUpLgHJrOusRAu8hhO6B1sMcB/SBA= X-RZG-CLASS-ID: mo00 Received: from mail-wi0-x22f.google.com ([IPv6:2a00:1450:400c:c05::22f]) by smtp.strato.de (joses mo21) (RZmta 31.29 AUTH) with ESMTPA id 6013dap67BkNqI for ; Sun, 7 Jul 2013 14:28:50 +0200 (CEST) Received: by mail-wi0-f175.google.com with SMTP id m6so8279741wiv.8 for ; Sun, 07 Jul 2013 05:28:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=aHo/5ZnpDp5T6gr70djNycV6tiZWqiRHcz+8kl30XtE=; b=VuSxPfprUMslUAgfcXu2BLycbcCfZFez72JPA6CAsqbxpz1eQNFOrXrm+qd+RUD+H2 6wN6AQrGlHHYIGTeKJsuA9zYzguYjA6S7rwvSUGwlDiGAEEsZxaFHxaFJfR1ofXv+M6C TK5MeUNfgRywnptoNtcFZt3g8eUEpLYF784qR13b/PQ1cqN7BGll9lTHBq16l16lrGE8 TsuS0cLlPJp9NftBhx1iuzTsFKDZuCGrzdHWxsj+J6KGO9cQEj2YLsJ5qhtkluNFGRyU Qe4wmXWMZB4vBF70SW7lbTmSipTRcZkqanC+ZMw5soZvioC8kzYhvQ74DBq8RNUrPyU7 oFqw== X-Received: by 10.194.179.129 with SMTP id dg1mr10212777wjc.38.1373200130730; Sun, 07 Jul 2013 05:28:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.86.69 with HTTP; Sun, 7 Jul 2013 05:28:30 -0700 (PDT) From: "Arend v. Reinersdorff" Date: Sun, 7 Jul 2013 14:28:30 +0200 Message-ID: Subject: Problem using project.name as build directory To: users@maven.apache.org Content-Type: multipart/alternative; boundary=089e013d194eff728604e0eb116b X-Virus-Checked: Checked by ClamAV on apache.org --089e013d194eff728604e0eb116b Content-Type: text/plain; charset=ISO-8859-1 Hi, usually when project.name is not set, it defaults to project.artifactId. But when I set ${project.name}, it seems to not use the default in some places. Setup: - project.name is not explicitly set - project.build.directory set to ${project.name} - a Java class under src/main - a unit test under src/test Example project: https://code.google.com/p/outsidedirectorywithname/source/browse/ Reproduce problem: mvn -X clean test Result: Build fails during compilation of unit test: COMPILATION ERROR : [ERROR] \opt\gitrepos\outsidedirectorywithname\src\test\java\com\example\outsidedirectorywithname\GreeterTest.java:[3,43] error: cannot find symbol Complete output: https://code.google.com/p/outsidedirectorywithname/source/browse/output-failed-build.txt When I echo project.name with antrun, it defaults to project.artifactId as expected. When I set project.name in pom.xml, the build succeeds. Complete fixed output: https://code.google.com/p/outsidedirectorywithname/source/browse/output-fixed-by-setting-project-name.txt In the debug output (-X) I see places where "${project.name}" appears, for example [DEBUG] (f) classpathElements = [C:\opt\gitrepos\outsidedirectorywithname\${project.name}\classes] When I set project.name, this works fine: [DEBUG] (f) classpathElements = [C:\opt\gitrepos\outsidedirectorywithname\outsidedirectorywithname\classes] Why doesn't project.name default to project.artifactId in this case? Is this a bug? Or is there a reason why I cannot rely on the default value here? Regards, Arend v. Reinersdorff --089e013d194eff728604e0eb116b--