[GRADLE-1426] Improper .classpath generation prevents WTP from including war's dependencies when no source folders are specified Created: 06/Mar/11  Updated: 04/Jan/13  Resolved: 15/Mar/12

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-1
Fix Version/s: None

Type: Bug
Reporter: Rob Winch Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0

Attachments: Zip Archive war.zip    

 Description   

If there are no source folders, then the war's dependencies are not deployed. I have attached a sample project that demonstrates the issue. Below are the actual and expected .classpath files.

Actual .classpath
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="output" path="bin"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
	<classpathentry kind="lib" path="/home/rwinch/.gradle/cache/org.tuckey/urlrewrite/jars/urlrewrite-2.5.2.jar" exported="true"/>
</classpath>
Expected .classpath
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="output" path="bin"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
	<classpathentry kind="lib" path="/home/rwinch/.gradle/cache/org.tuckey/urlrewrite/jars/urlrewrite-2.5.2.jar" exported="true">
		<attributes>
			<attribute name="org.eclipse.jst.component.dependency" value="../"/>
		</attributes>
	</classpathentry>
</classpath>

One way to work around the issue is to create an empty src/main/java folder.



 Comments   
Comment by Wolfgang Schell [ 17/Jul/11 ]

This is still the case with 1.0-milestone3. I just spent an hour trying to get WTP to behave, but after finding this issue, it created an empty source folder and it works.

Comment by Szczepan Faber [ 15/Mar/12 ]

I cannot reproduce it. Gradle has never generated 'org.eclipse.jst.component.dependency' attribute for web modules. This property is used for projects that the web module depends on. E.g. if you have warProject1 that depends on jarProject1 and both apply the 'eclipse-wtp' plugin then jarProject1 will have it's dependencies decorated with this property.

I'm closing this issue. Please let me know if I'm missing something so that we can reopen it

Comment by Rob Winch [ 15/Mar/12 ]

I can confirm that this issue is no longer valid.

PS: This issue was back in milestone-1 prior to the eclipse-wtp declaration.

Generated at Wed Jun 30 11:55:15 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.