[JET2] Re: JET2: Invalid Java source folder [message #27784] |
Fri, 20 July 2007 10:04  |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Thomas,
JET2 has its own newsgroup, which I have included in this reply. Somebody
there should be able to help you (I can't ;-)
Cheers,
Christian
Thomas Kuhn wrote:
> Hi,
>
> When I run the following template:
>
> <ws:project name="myProject">
> <ws:folder path="src">
> <java:package name="org.example">
> <java:resource name="Messages.properties"
> template="templates/myprops.jet"/>
> </java:package>
> </ws:folder>
> </ws:project>
>
> I get this error:
>
> templates/main.jet(24,5): <java:package name="org.example">
> Error: Invalid Java source folder: 'myProject/src'
>
> Project "myProject" and folder "src" are created. However, they look
> like a standard project with a standard folder, not like a Java project
> with source-folder...
>
> Any ideas?
>
> Thanks,
>
> Tom
>
> (JET-SDK-M200707120943, Eclipse 3.3, emf-sdo-xsd-SDK-M200707111516)
|
|
|
|
|
Re: [JET2] Re: JET2: Invalid Java source folder [message #27988 is a reply to message #27784] |
Mon, 23 July 2007 15:10   |
Eclipse User |
|
|
|
Tom:
Eclipse Java projects are more than just the thing constructed by
<ws:project>. There is extra project meta-data stored in normally hidden
files (.project and .classpath) in the project root. You can see these files
by removing the Package Explorer's file on ".* resources".
The <java:class> and <java:resource> tags need this project meta-data to
work. So, a correct solution would be:
<ws:project name="myProject">
<ws:file template="templates/project.jet" path=".project"/>
<ws:file template="tempaltes/classpath.jet" path=".classpath"/>
<ws:folder path="src">
<java:package name="org.example">
<java:resource name="Messages.properties"
template="templates/myprops.jet"/>
</java:package>
</ws:folder>
</ws:project>
You can seed the project.jet and classpath.jet from a manually constructed
Java project that you use as a reference solution for your code generator..
Incidentally, .project files include the name of the project, so you will
have to set that value accordingly.
Paul
> Thomas Kuhn wrote:
>
>> Hi,
>>
>> When I run the following template:
>>
>> <ws:project name="myProject">
>> <ws:folder path="src">
>> <java:package name="org.example">
>> <java:resource name="Messages.properties"
>> template="templates/myprops.jet"/>
>> </java:package>
>> </ws:folder>
>> </ws:project>
>>
>> I get this error:
>>
>> templates/main.jet(24,5): <java:package name="org.example">
>> Error: Invalid Java source folder: 'myProject/src'
>>
>> Project "myProject" and folder "src" are created. However, they look
>> like a standard project with a standard folder, not like a Java project
>> with source-folder...
>>
>> Any ideas?
>>
>> Thanks,
>>
>> Tom
>>
>> (JET-SDK-M200707120943, Eclipse 3.3, emf-sdo-xsd-SDK-M200707111516)
>
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05574 seconds