Charles,

>From one of your earlier messages in this thread, you said you need
the jar to package into a war and/or ear. It sounds like either you
are:

  1. trying to build multiple artifacts in the same project or
  2. using subprojects, but putting your dependencies at the parent
     level.

If #1 is true, you should build each artifact in a separate
subproject. See:

  o the Wiki on building a webapp
    (http://wiki.codehaus.org/maven/CreatingWebApplications)
  o a Maven J2EE tutorial
    (http://www.theserverside.com/resources/article.jsp?l=MavenMagic)
  o the multiproject plugin
    (http://maven.apache.org/reference/plugins/multiproject/)

If #2 is true, move your dependencies down to the appropriate
subproject's project.xml file. At least move dependencies on anything
you create in this project down to the WAR or EAR subproject.

  Jeff

On Wed, 24 Dec 2003, at 14:49:32 [GMT -0500] Charles Tassoni wrote:

> <<Why do you not want the jar in the dependencies?

>     I'm trying to compile a set of source code X that will be packaged into 
> jar X.  If I don't have an old version of jar X in the classpath, no 
> problem.  If I have old jar X in the classpath, then occasionaly source x 
> will not compile.
>     Here's a way to duplicate this problem:  Focus on some classes that your 
> project makes into a jar. In your source tree take one of those classes and 
> move it to a different package.  Make sure that methods of the class are 
> still called elsewhere in your code, although of course you've changed the 
> import statements in your code to reflect the class's new package.
>    Now  maven will be unable to compile your source, even though ant, your 
> ide, and every other compilation method known to man will have no trouble 
> with it.  The reason is that your classpath is befouled with outdated 
> information about your classes.  You now have to work around that, and 
> suddenly your build is far from the automatic whiz-bang you told your 
> project manager about.
>    And right about then you want to know how to reference a jar in maven, 
> and yet not have it be used in the classpath when compiling your code.

> _________________________________________________________________
> Take advantage of our limited-time introductory offer for dial-up Internet 
> access. http://join.msn.com/?page=dept/dialup


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
mailto:[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to