You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Michael Wechner <mi...@wyona.com> on 2006/02/28 10:23:12 UTC
possible bug specifying modules within (local.)build.properties
Hi
It seems to me there is a bug re specifying single modules within
(local.)build.properties
If one specifies it as follows:
modules.root.dirs=src/modules
then it works, but
modules.root.dirs=src/modules/jcr
won't work at least re copying of Java classes.
Can anyone confirm this?
Thanks
Michi
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: possible bug specifying modules within (local.)build.properties
Posted by Michael Wechner <mi...@wyona.com>.
Jonathan Addison wrote:
> Andreas Hartmann wrote:
>
>> Oliver Schalch wrote:
>>
>>> On Tue, 28 Feb 2006 10:23:12 +0100
>>> Michael Wechner <mi...@wyona.com> wrote:
>>>
>>>> Hi
>>>>
>>>> It seems to me there is a bug re specifying single modules within
>>>> (local.)build.properties
>>>>
>>>> If one specifies it as follows:
>>>>
>>>> modules.root.dirs=src/modules
>>>>
>>>> then it works, but
>>>>
>>>> modules.root.dirs=src/modules/jcr
>>>>
>>>> won't work at least re copying of Java classes.
>>>>
>>>> Can anyone confirm this?
>>>
>>>
>>>
>>> I can confirm that, but it is because it looks into the given folder if
>>> there are "modules folders", in your case it would go look into
>>> src/modules/jcr and dont find a module folder because it does already
>>> point to it.
>>> I guess that is why its name is "modules.ROOT.dirs"...
>>
>>
>>
>> No, it should work the same way as it does for publications.
>> No idea why copying the Java code fails ...
>> The corresponding line is init-build.xml:115
>>
>> <copyJavaSources pubsrootdirs="${modules.root.dirs}" javadir="java/src"
>> builddir="${build.java.src}" />
>>
>> -- Andreas
>>
> I also experienced this issue last week. The copyDir method works if
> there is a publication.xml, but for modules it always uses
> copyContentOfDir like Oli said.
>
> From CopyTask.java
> if (new File(pubsRootDir, "publication.xml").isFile()) {
> CopyJavaSourcesTask.copyDir(new File(pubsRootDir), new
> File(this.toDir.toString()),
> twoTuple, filter, this);
> } else {
> // FIXME: Look for publications defined by the file
> "publication.xml"
> CopyJavaSourcesTask.copyContentOfDir(new File(pubsRootDir),
> new File(this.toDir.toString()), twoTuple, filter,
> this);
> }
>
> -- Jon
>
Thanks for the pointer. I have fixed it and added a README.txt
Please note that in order to work it needs a file "module.xml" (similar
to publication.xml) in order
to recognize that this is a module and not just an arbitrary directory.
If one specifies the parent dir (e.g. modules) then this file is not
needed, but I would suggest that
we make it mandatory.
Michi
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: possible bug specifying modules within (local.)build.properties
Posted by Michael Wechner <mi...@wyona.com>.
Jonathan Addison wrote:
> Andreas Hartmann wrote:
>
>> Oliver Schalch wrote:
>>
>>> On Tue, 28 Feb 2006 10:23:12 +0100
>>> Michael Wechner <mi...@wyona.com> wrote:
>>>
>>>> Hi
>>>>
>>>> It seems to me there is a bug re specifying single modules within
>>>> (local.)build.properties
>>>>
>>>> If one specifies it as follows:
>>>>
>>>> modules.root.dirs=src/modules
>>>>
>>>> then it works, but
>>>>
>>>> modules.root.dirs=src/modules/jcr
>>>>
>>>> won't work at least re copying of Java classes.
>>>>
>>>> Can anyone confirm this?
>>>
>>>
>>>
>>> I can confirm that, but it is because it looks into the given folder if
>>> there are "modules folders", in your case it would go look into
>>> src/modules/jcr and dont find a module folder because it does already
>>> point to it.
>>> I guess that is why its name is "modules.ROOT.dirs"...
>>
>>
>>
>> No, it should work the same way as it does for publications.
>> No idea why copying the Java code fails ...
>> The corresponding line is init-build.xml:115
>>
>> <copyJavaSources pubsrootdirs="${modules.root.dirs}" javadir="java/src"
>> builddir="${build.java.src}" />
>>
>> -- Andreas
>>
> I also experienced this issue last week. The copyDir method works if
> there is a publication.xml, but for modules it always uses
> copyContentOfDir like Oli said.
>
> From CopyTask.java
> if (new File(pubsRootDir, "publication.xml").isFile()) {
> CopyJavaSourcesTask.copyDir(new File(pubsRootDir), new
> File(this.toDir.toString()),
> twoTuple, filter, this);
else if (new File(modulesRootDir, "module.xml").is File()) {
....
should to the trick.
Let me check ... whereas it would make the file module.xml mandatory,
but how else to find out/detect if a directory is a module or a
publication ...
Thanks
Michi
>
> } else {
> // FIXME: Look for publications defined by the file
> "publication.xml"
> CopyJavaSourcesTask.copyContentOfDir(new File(pubsRootDir),
> new File(this.toDir.toString()), twoTuple, filter,
> this);
> }
>
> -- Jon
>
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: possible bug specifying modules within (local.)build.properties
Posted by Jonathan Addison <jo...@wyona.com>.
Andreas Hartmann wrote:
> Oliver Schalch wrote:
>
>> On Tue, 28 Feb 2006 10:23:12 +0100
>> Michael Wechner <mi...@wyona.com> wrote:
>>
>>> Hi
>>>
>>> It seems to me there is a bug re specifying single modules within
>>> (local.)build.properties
>>>
>>> If one specifies it as follows:
>>>
>>> modules.root.dirs=src/modules
>>>
>>> then it works, but
>>>
>>> modules.root.dirs=src/modules/jcr
>>>
>>> won't work at least re copying of Java classes.
>>>
>>> Can anyone confirm this?
>>
>>
>> I can confirm that, but it is because it looks into the given folder if
>> there are "modules folders", in your case it would go look into
>> src/modules/jcr and dont find a module folder because it does already
>> point to it.
>> I guess that is why its name is "modules.ROOT.dirs"...
>
>
> No, it should work the same way as it does for publications.
> No idea why copying the Java code fails ...
> The corresponding line is init-build.xml:115
>
> <copyJavaSources pubsrootdirs="${modules.root.dirs}" javadir="java/src"
> builddir="${build.java.src}" />
>
> -- Andreas
>
I also experienced this issue last week. The copyDir method works if
there is a publication.xml, but for modules it always uses
copyContentOfDir like Oli said.
From CopyTask.java
if (new File(pubsRootDir, "publication.xml").isFile()) {
CopyJavaSourcesTask.copyDir(new File(pubsRootDir), new
File(this.toDir.toString()),
twoTuple, filter, this);
} else {
// FIXME: Look for publications defined by the file
"publication.xml"
CopyJavaSourcesTask.copyContentOfDir(new File(pubsRootDir),
new File(this.toDir.toString()), twoTuple, filter,
this);
}
-- Jon
--
Jonathan Addison jon<at>wyona.com
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: possible bug specifying modules within (local.)build.properties
Posted by Andreas Hartmann <an...@apache.org>.
Oliver Schalch wrote:
> On Tue, 28 Feb 2006 10:23:12 +0100
> Michael Wechner <mi...@wyona.com> wrote:
>
>> Hi
>>
>> It seems to me there is a bug re specifying single modules within
>> (local.)build.properties
>>
>> If one specifies it as follows:
>>
>> modules.root.dirs=src/modules
>>
>> then it works, but
>>
>> modules.root.dirs=src/modules/jcr
>>
>> won't work at least re copying of Java classes.
>>
>> Can anyone confirm this?
>
> I can confirm that, but it is because it looks into the given folder if
> there are "modules folders", in your case it would go look into
> src/modules/jcr and dont find a module folder because it does already
> point to it.
> I guess that is why its name is "modules.ROOT.dirs"...
No, it should work the same way as it does for publications.
No idea why copying the Java code fails ...
The corresponding line is init-build.xml:115
<copyJavaSources pubsrootdirs="${modules.root.dirs}" javadir="java/src"
builddir="${build.java.src}" />
-- Andreas
--
Andreas Hartmann
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
andreas.hartmann@wyona.com andreas@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: possible bug specifying modules within (local.)build.properties
Posted by Oliver Schalch <ol...@wyona.com>.
On Tue, 28 Feb 2006 10:23:12 +0100
Michael Wechner <mi...@wyona.com> wrote:
> Hi
>
> It seems to me there is a bug re specifying single modules within
> (local.)build.properties
>
> If one specifies it as follows:
>
> modules.root.dirs=src/modules
>
> then it works, but
>
> modules.root.dirs=src/modules/jcr
>
> won't work at least re copying of Java classes.
>
> Can anyone confirm this?
I can confirm that, but it is because it looks into the given folder if
there are "modules folders", in your case it would go look into
src/modules/jcr and dont find a module folder because it does already
point to it.
I guess that is why its name is "modules.ROOT.dirs"...
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org