Try adding -X to the maven command. You may want to direct that output
to a file. -X is the debug option. Examine the output carefully. You
should see where Maven is trying to pickup the source from. I suspect
your project.xml file is in the wrong location. It should be in the
parent directory to src and test; which is where you should also be
executing maven from. Also restore ${basedir}. ${basedir} is
equivalent to PWD.
Bill
-----Original Message-----
From: Qin Ding [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 2:33 PM
To: Maven Users List
Subject: RE: Need Help, Please
I removed ${basedir}, which has no positive effect. I double check the
directories
src/java, which has com.myapp.MyApp.java
src/config, which has myapp.properties
test/java, which has com.myapp.MyAppTest.java
project.xml
<build>
<nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory>test/java</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
<resources>
<resource>
<directory>src/config</directory>
<includes>
<include>*.properties</include>
</includes>
</resource>
</resources>
</build>
------------------------------------------------------------------------
----------------
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.
------------------------------------------------------------------------
----------------
"David Jackman" <David.Jackman
@fastsearch.com>
09/14/2005 03:22 PM
Please respond to "Maven Users List"
To: "Maven Users List" <[email protected]>
cc:
Subject: RE: Need Help, Please
It definitely isn't ${basedir}, and I would recommend leaving that in.
>From what I can see, it should work for the source code, but the test
code wouldn't because the paths are different (src/test vs. test/java).
Can you double-check the paths you put in your email to make sure
they're correct for what's actually on your machine?
Also, the Maven standard (as outlined in
http://maven.apache.org/reference/conventions.html) is to put the main
source in src/main/java and the tests in src/test/java. The article
used something different, and what they suggested should work as well as
long as the paths are the same everywhere.
..David..
-----Original Message-----
From: Qin Ding [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 2:09 PM
To: Maven Users List
Subject: RE: Need Help, Please
Tom:
I erased the ${basedir} as you suggested, but I still got "No java
source to compile".
By the way, my Maven version is 1.0.2.
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.
------------------------------------------------------------------------
----------------
"Litton, Tom - CEPM" <Tom.Litton
@cepm-us.com>
09/14/2005 02:54 PM
Please respond to "Maven Users List"
To: "Maven Users List" <[email protected]>
cc:
Subject: RE: Need Help, Please
try droping the ${basedir}/ from the dirs. like:
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory>test/java</unitTestSourceDirectory>
<directory>src/conf</directory>
-----Original Message-----
From: Qin Ding [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 14, 2005 2:43 PM
To: Maven Users List
Subject: 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>[EMAIL PROTECTED]</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.
------------------------------------------------------------------------
----------------
----------------------------------------------------------------------
The information contained in this transmission is intended only for the
personal and confidential use of the designated recipients named herein.
If the reader of this transmission is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you are
hereby notified that you have received this transmission in error, and
that any review, dissemination, distribution, or copying of this
transmission is strictly prohibited.
If you have received this communication in error, please notify the
sender and return and delete the original transmission immediately.
Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]