Do you have the 'eclipse-wtp' plugin applied? This will generate the WTP 
attributes for you. The 'eclipse' plugin on its own does not add the WTP 
specific settings to the classpath entries.

On 04/08/2011, at 8:15 PM, Marian Seitner wrote:

> Hi,
> 
> I use the eclipseClasspath task to generate the class path for a dynamic web 
> project. When I use gradle e.g. to create the war file, everything is fine.
> 
> Unfortunately the eclipseClasspath task does not create fully equivalent 
> .classpath entries.
> 
> The following dependency definition causes gradle to put the jar in the 
> classpath _and_ to copy it into the resulting web archive's lib folder, which 
> is perfectly fine.
> 
> // makes it in the classpath and in the resulting war
> compile 'org.springframework:spring-web:3.0.5.RELEASE'
> 
> Using the eclipseClasspath task the following entry is generated (among 
> others):
> 
> <classpathentry sourcepath="/path/to/spring-web-3.0.5.RELEASE-sources.jar" 
> kind="lib" path="/path/to/spring-web-3.0.5.RELEASE.jar" exported="true"/>
> 
> While this puts the jar into the class path, it gets neither exported in 
> Eclipse (using the export to war file wizard) nor published to a server.
> 
> Fixing this problem by changing the project deployment assembly leads to 
> slightly different entries:
> 
> <classpathentry sourcepath="/path/to/spring-web-3.0.5.RELEASE-sources.jar" 
> kind="lib" path="/path/to/spring-web-3.0.5.RELEASE.jar" exported="true">
>       <attributes>
>               <attribute name="org.eclipse.jst.component.dependency" 
> value="/WEB-INF/lib"/>
>       </attributes>
> </classpathentry>
> 
> In my opinion dependencies in the compile configuration should be created in 
> the latter form because they are most likely intended to be shipped.
> 
> Another question: what's the easiest way for the time being to add the 
> missing <attributes> tag to the respective entries?
> 
> 
> Cheers,
> Marian
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to