You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Qin Ding <qd...@csc.com> on 2005/09/14 21:43:06 UTC

Need Help, Please

I am learning to use Maven.  Following the tutorial on serverside.com 
(http://www.theserverside.com/articles/article.tss?l=MavenMagic), to setup 
the directory structure like the folloing:

c:\sample-maven-project
src/config
                  /myapp.properties
src/java
                /com/myapp/MyApp.java
src/test
               /com/myapp/MyAppTest.java

After I do
maven java:compile

I got:

build:start:

java:prepare-filesystem:

java:compile:
    [echo] Compiling to C:\Sample-Maven-Project/target/classes
    [echo] No java source files to compile.
BUILD SUCCESSFUL
Total time: 3 seconds
Finished at: Wed Sep 14 14:29:47 CDT 2005

In my project.xml, I have build defined like this:
<build>
   <nagEmailAddress>qding@csc.com</nagEmailAddress>
   <sourceDirectory>${basedir}/src/java</sourceDirectory>
   <unitTestSourceDirectory>${basedir}/test/java</unitTestSourceDirectory>
   <unitTest>
      <includes>
         <include>**/*Test.java</include>
      </includes>
   </unitTest>

   <resources>
      <resource>
         <directory>${basedir}/src/conf</directory>
         <includes>
            <include>*.properties</include>
         </includes>
      </resource>
   </resources>
 </build>

Why maven can't find the java source to compile?  Should I or where can I 
define the basedir?

Qin
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.
----------------------------------------------------------------------------------------

Re: Need Help, Please

Posted by John Casey <jd...@commonjava.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

not entirely sure (my maven-1 is a bit rusty...), but try leaving off
the '${basedir}/' prefix for sourceDirectory and unitTestSourceDirectory.

HTH,

john

Qin Ding wrote:
| I am learning to use Maven.  Following the tutorial on serverside.com
| (http://www.theserverside.com/articles/article.tss?l=MavenMagic), to
setup
| the directory structure like the folloing:
|
| c:\sample-maven-project
| src/config
|                   /myapp.properties
| src/java
|                 /com/myapp/MyApp.java
| src/test
|                /com/myapp/MyAppTest.java
|
| After I do
| maven java:compile
|
| I got:
|
| build:start:
|
| java:prepare-filesystem:
|
| java:compile:
|     [echo] Compiling to C:\Sample-Maven-Project/target/classes
|     [echo] No java source files to compile.
| BUILD SUCCESSFUL
| Total time: 3 seconds
| Finished at: Wed Sep 14 14:29:47 CDT 2005
|
| In my project.xml, I have build defined like this:
| <build>
|    <nagEmailAddress>qding@csc.com</nagEmailAddress>
|    <sourceDirectory>${basedir}/src/java</sourceDirectory>
|    <unitTestSourceDirectory>${basedir}/test/java</unitTestSourceDirectory>
|    <unitTest>
|       <includes>
|          <include>**/*Test.java</include>
|       </includes>
|    </unitTest>
|
|    <resources>
|       <resource>
|          <directory>${basedir}/src/conf</directory>
|          <includes>
|             <include>*.properties</include>
|          </includes>
|       </resource>
|    </resources>
|  </build>
|
| Why maven can't find the java source to compile?  Should I or where can I
| define the basedir?
|
| Qin
|
- 
----------------------------------------------------------------------------------------
| This is a PRIVATE message. If you are not the intended recipient, please
| delete without copying and kindly advise us by e-mail of the mistake in
| delivery. NOTE: Regardless of content, this e-mail shall not operate to
| bind CSC to any order or other contract unless pursuant to explicit
| written agreement or government initiative expressly permitting the
use of
| e-mail for such purpose.
|
- 
----------------------------------------------------------------------------------------
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDKINWK3h2CZwO/4URAlkOAJ9fAwdOksY7Cd1XYSnroHlDi9jzmwCgnPp2
KapzhfKpK5msLxFDcrEnhMM=
=cBdG
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org