I have started using Maven for a J2EE project which I am developing
using Eclipse as my IDE.  I have several questions about how to get this
environment set up correctly.
 
After creating the Eclipse project I created a project.xml and a
project.properties in the project's base directory (I copied and
modified these from a colleague's preexisting non-Eclipse Maven
project).  I have a src/java and src/test subdirectories under the base
directory, as well as a WEB-INF directory.  I ran "maven eclipse" and
everything appears to have gone as expected.  I refreshed the project in
Eclipse and specified the MAVEN_REPO variable so that it can find the
j2ee.jar file specified in the <dependency> element of the project.xml.
It appears to build everything correctly when I save the source files,
in that class files are being put into target/classes subdirectory.
However the Java source editor shows error messages (symbol unresolved)
on every line of my servlet class sources which have a reference to a
class (essentially all javax.servlet.* classes) which should be found in
the j2ee.jar specified as a dependency (this is probably an Eclipse
problem, but I thought I'd mention it in case anyone reading this
recognizes the problem).
 
I don't see how you can specify which files you will include in a WAR
file.  I know how I would do it using Ant (in the build.xml), but I have
yet to locate the documentation which explains how you specify this for
Maven.  Is there a "How To" document which explains this ?  Essentially
I want to package all of the JSP and HTML pages and everything under
WEB-INF directory (web.xml, classes, tlds, etc.) into the WAR file.  Is
this specified in some way in the project.xml file, or in a maven.xml
file, as it would be in the build.xml for Ant ?
 
I have tried using the war goal in order to see what it will do but I
have never been able to get it to work.  I have tried "maven war:webapp:
and "maven war:war", both of which give me the following error message:
 
BUILD FAILED
File...... file:/C:/Documents and
Settings/jadams/.maven/plugins/maven-caller-plugin-1.0/plugin.jelly
Element... attainGoal
Line...... 33
Column.... 39
No goal [java:compile]
Total time: 5 seconds
Finished at: Fri Apr 02 13:57:30 EST 2004
 
Is there some way to get around this, or does the above indicate an
incomplete installation or some other configuration trouble ?
 
Typically web applications put class files into
<webapp>/WEB-INF/classes, but the default target directory using Maven
is target/classes.  Is there some way that I can modify this such that
running "maven eclipse" will make Eclipse put generated classes into the
specified location ?  Again I assume that there is an element which I
could add to project.xml to effect this change, but I don't see where it
is specified in the documentation.
 
How do I configure Eclipse to use maven ?  I assume that I need to set
up Maven as an external tool in Eclipse - can anyone comment on this
process ?
 
I am using Maven 1.0-rc2 and Eclipse 2.1.3.
 
Thanks in advance for any feedback.
 
 
-James

*********************************************************************************************************************************

DISCLAIMER: All email(s) sent to and from Harborside Plus are recorded and archived, 
monitored, and/or disclosed to someone other than the recipient..  The information 
contained in this e-mail is, unless otherwise indicated, confidential and is intended 
solely for the use of the named addressee. Access, copying or re-use of the e-mail or 
any information contained therein by any other person is not authorized. If you are 
not the intended recipient please notify Harborside Plus immediately by returning the 
e-mail to James Adams: [EMAIL PROTECTED]

Reply via email to