Justin,
I am not sure where the "imported_classes" directory is coming from.
That is not the normal behavior for Maven.
Normally, the setup you describe would result in the sources from
src/main/java being compiled into WEB-INF/classes inside the war file.
However, be aware that I *DON'T* mean src/main/webapp/WEB-INF/classes.
All the files produced during the build (including .class files) end up
inside the "target" dir.
Search your pom.xml file for the string "imported_classes". Perhaps you
adapted your pom.xml from another project and inherited an unwanted setting.
Are you using an IDE? Maybe it is compiling the sources to that location.
Here is a link to the maven-war-plugin documentation, which is very
helpful for setting up a war project in maven (or figuring out why a war
project isn't building the way you expect it to):
http://maven.apache.org/plugins/maven-war-plugin/
src/main/java is the standard location for Java sources in Maven. If you
are asking "why not in src/main/webapp/WEB-INF/src (or similar)?", I
have two responses:
* most projects don't want their source code in the war file structure
* using the Maven standard location means you can use all the Maven
reports, etc. without having to configure a "custom" location
-Max
[EMAIL PROTECTED] wrote:
In my web project, I have the following:
src
----main
--------java
-------------com/my/package/MyServlet
--------webapp
------------*.jsp
------------WEB-INF
In the WAR file that is generated, MyServlet ends up in a folder called
imported_classes. It cannot be reference after I deploy my WAR as it is
not in the classpath. Can anybody please advise how I would go about
making it visible and what the point of having a src/main/java/... path
would be in a web project?
Thanks,
-j
---------------------------------------------------
Justin Fung
[EMAIL PROTECTED]
Consultant, Business Systems
IT Banking Systems, e-Business
HSBC Bank Canada
http://www.hsbc.ca
p: (604) 643-6605
f: (604) 643-6727
***************************************************************
This email may contain confidential information, and is intended only for the
named recipient and may be privileged. Distribution or copying of this email by
anyone other than the named recipient is prohibited. If you are not the named
recipient, please notify us immediately and permanently destroy this email and
all copies of it. Internet email is not private, secure, or reliable. No
member of the HSBC Group is liable for any errors or omissions in the content
or transmission of this email. Any opinions contained in this email are solely
those of the author and, unless clearly indicated otherwise in writing, are not
endorsed by any member of the HSBC Group.
***************************************************************
Ce courriel peut renfermer des renseignements confidentiels et privilégiés et
s'adresse au destinataire désigné seulement. La distribution ou la copie de
ce courriel par toute personne autre que le destinataire désigné est interdite.
Si vous n'êtes pas le destinataire désigné, veuillez nous en aviser
immédiatement et détruire de façon permanente ce courriel ainsi que toute copie
de celui-ci. La transmission de courriel par Internet ne constitue pas un mode
de transmission confidentiel, sécuritaire ou fiable. Aucun membre du Groupe
HSBC ne sera responsable des erreurs ou des omissions relatives au contenu ou à
la transmission de ce courriel. L'auteur de ce courriel est seul responsable
des opinions émises dans ce courriel, lesquelles, à moins d'un avis contraire
fourni par écrit, ne sont pas endossées par aucun membre du Groupe HSBC.
***************************************************************
"SAVE PAPER - THINK BEFORE YOU PRINT!"
"ÉCONOMISEZ LE PAPIER – PENSEZ-Y À DEUX FOIS AVANT D'IMPRIMER!"
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]