|
|
Re: Problems with java:package [message #51764 is a reply to message #51340] |
Mon, 06 October 2008 14:08 |
Paul Elder Messages: 849 Registered: July 2009 |
Senior Member |
|
|
Timothy:
I'm having trouble reproducing this. But, in general, for the java:* classes
to work correctly, the Java project must be correctly configured. And, if
you are creating the Java project as part of you transformation, you must
create the source folder, and all the configuration files (.project and
..classpath being the minimum) BEFORE you use java:package.
Here's my test case, the works just fine on my machine.
<ws:project name="my.java">
<ws:file path=".project" template="templates/my.java/project.jet"/>
<ws:file path=".classpath" template="templates/my.java/classpath.jet"/>
<ws:folder path="src"/>
</ws:project>
<java:package name="com.ibm" srcFolder="my.java/src">
</java:package>
<java:package name="com.ibm.otherchild" srcFolder="my.java/src">
</java:package>
It works whether or not my.java exists. The contents of the project.jet and
classpath.jet templates are simply renamed versions of the .project and
..classpath files from a hand create project called my.java. In the real
world (where you generated projects whose name is variable), you need to
parameterize the project.jet template with the target project's name. And,
of you want to parameterize the java source folder, its found in the
..classpath file.
How, structurally, does your code differ from my test case?
Paul
|
|
|
Re: Problems with java:package [message #51898 is a reply to message #51764] |
Tue, 07 October 2008 10:06 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Paul,
with the hint to create all meta-information for the project before the
package generation, it works as it should be with any dpeth of the package
hierarchy.
My scenario was similar, in fact, i've created a Java project at first and
generated all the files into the existing project, by using the predefined
variable for the context project name.
Thx
Timothy
"Paul Elder" <pelder@ca.ibm.com> schrieb im Newsbeitrag
news:gcd65a$6be$1@build.eclipse.org...
> Timothy:
>
> I'm having trouble reproducing this. But, in general, for the java:*
> classes to work correctly, the Java project must be correctly configured.
> And, if you are creating the Java project as part of you transformation,
> you must create the source folder, and all the configuration files
> (.project and .classpath being the minimum) BEFORE you use java:package.
>
> Here's my test case, the works just fine on my machine.
>
> <ws:project name="my.java">
> <ws:file path=".project" template="templates/my.java/project.jet"/>
> <ws:file path=".classpath" template="templates/my.java/classpath.jet"/>
> <ws:folder path="src"/>
> </ws:project>
>
> <java:package name="com.ibm" srcFolder="my.java/src">
> </java:package>
> <java:package name="com.ibm.otherchild" srcFolder="my.java/src">
> </java:package>
>
> It works whether or not my.java exists. The contents of the project.jet
> and classpath.jet templates are simply renamed versions of the .project
> and .classpath files from a hand create project called my.java. In the
> real world (where you generated projects whose name is variable), you need
> to parameterize the project.jet template with the target project's name.
> And, of you want to parameterize the java source folder, its found in the
> .classpath file.
>
> How, structurally, does your code differ from my test case?
>
> Paul
>
|
|
|
Powered by
FUDForum. Page generated in 0.03571 seconds