You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by ch...@apache.org on 2004/04/10 13:02:14 UTC

svn commit: rev 9958 - in xml/forrest/trunk: . src/core/targets

Author: cheche
Date: Sat Apr 10 04:02:11 2004
New Revision: 9958

Modified:
   xml/forrest/trunk/src/core/targets/webapp.xml
   xml/forrest/trunk/status.xml
Log:
Stop overwriting skinconf and cocoon.xconf on webapp target,
Libs were not copied 



Modified: xml/forrest/trunk/src/core/targets/webapp.xml
==============================================================================
--- xml/forrest/trunk/src/core/targets/webapp.xml	(original)
+++ xml/forrest/trunk/src/core/targets/webapp.xml	Sat Apr 10 04:02:11 2004
@@ -92,13 +92,22 @@
       <fileset dir="${classes-dir}"/>
     </copy>
   
-    <copy todir="${project.webapp}/WEB-INF">
+    <copy todir="${project.webapp}/WEB-INF/lib">
     <!-- Note: no overwriting, so user's libs and classes get preference -->
-      <fileset dir="${forrest.home}/context/WEB-INF">
-        <include name="lib/**"/>
-        <include name="classes/**"/>
+      <fileset dir="${forrest.home}/lib/core">
+        <include name="**.jar"/>
+      </fileset>
+      <fileset dir="${forrest.home}/lib/optional">
+        <include name="**.jar"/>
+      </fileset>
+      <fileset dir="${forrest.home}/lib/endorsed">
+        <include name="**.jar"/>
       </fileset>
     </copy>
+    
+    <copy toDir="${project.webapp}/WEB-INF/classes">
+      <fileset dir="${forrest.home}/context/WEB-INF/classes"/>
+    </copy>
 
     <!-- Copy XML jars if not running JDK 1.4 (where they're built-in) -->
     <available property="jdk1.4+" classname="java.lang.CharSequence"/>
@@ -225,12 +234,6 @@
       </fileset>
     </copy>
     
-    <!-- copy skinconf -->
-    <copy toDir="${project.webapp}" 
-      overwrite="true"
-      failonerror="false"
-      file="${skinconf}"/>
-    
     <!-- copy Schemas -->
     <copy toDir="${project.webapp}/resources"
       overwrite="true"
@@ -254,10 +257,10 @@
     <filter token="project.images-dir" value="resources/images"/>
     <filter token="local-catalog" value="resources/schema/catalog.xcat"/>
       
-    <copy tofile="${project.webapp}/WEB-INF/cocoon.xconf" 
+    <!--copy tofile="${project.webapp}/WEB-INF/cocoon.xconf" 
       filtering="true" 
       overwrite="true"
-      file="${forrest.home}/context/WEB-INF/cocoon-live.xconf" />
+      file="${forrest.home}/context/WEB-INF/cocoon-live.xconf" -->
     
     <loadfile  property="webapp-generated-message" 
       srcFile="${forrest.home}/var/webapp-generated-message.txt">
@@ -280,4 +283,4 @@
       </fileset>
     </copy>
   </target>
-</project>
\ No newline at end of file
+</project>

Modified: xml/forrest/trunk/status.xml
==============================================================================
--- xml/forrest/trunk/status.xml	(original)
+++ xml/forrest/trunk/status.xml	Sat Apr 10 04:02:11 2004
@@ -44,6 +44,9 @@
 
   <changes>
     <release version="0.6-dev" date="unreleased">
+      <action dev="JJP" type="fix" context="core" >
+	Stop ovewriting skinconf and cocoon.xconf on webapp target
+        Libs were not copied on the webapp target
       <action dev="JJP" type="add" context="core" >
         Move context targets from forrest.build.xml to targets/context
         Use skinconf DTD.

Re: svn commit: rev 9958 - in xml/forrest/trunk: . src/core/targets

Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi escribió:
> 
> NOTE: please check your date, as this mail shows being dated 1/1/2002 
> and goes to the bottom of the mails.

Fixed! it is a problem on my laptop hardware/Linux, everytime I start 
the laptop it reset the time. When the laptop is online the it is 
updated, but it is offline and get online after I have turn it on, like 
today, the time is not been changed. So so sorry.


> The idea is to make Forrest not use cocoon.xconf to get the values it 
> needs but read them from the actual config files.
> 

I think that a xsl file that process cocoon.xconf seems enought, but if 
you got something better, I am all ears!

Cheers,
Cheche


Re: svn commit: rev 9958 - in xml/forrest/trunk: . src/core/targets

Posted by Nicola Ken Barozzi <ni...@apache.org>.
NOTE: please check your date, as this mail shows being dated 1/1/2002 
and goes to the bottom of the mails.

Juan Jose Pablos wrote:
> Ross Gardler escribió:
> 
>> This will prevent the webapp working. The reason for overwriting 
>> cocoon.xconf was that a different setup is required for remotely 
>> distributed webapps. Without this different xconf the distributed 
>> webapp will still be looking in places like src, which is not in that 
>> packaged war file.
> 
> I was not aware of this setup, and It drive me crazy,  I do not want to 
> maintain two similar files.
> 
> I have got a xsl to import cocoon.xconf from the cocoon distribution 
> using a xsl file, maybe we can use something similar to address this issue.

I have the solution for this ready in my head, but have not gotten into 
fixing it for a long time... there are some classes in SVN but not finished.

The idea is to make Forrest not use cocoon.xconf to get the values it 
needs but read them from the actual config files.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: svn commit: rev 9958 - in xml/forrest/trunk: . src/core/targets

Posted by Juan Jose Pablos <ch...@che-che.com>.
Ross Gardler escribió:
> 
> 
> This was always a hack to get things working quickly. A better solution 
> is always welcome once someone has the time. Nicola Ken has done some 
> partial work on this (see his mail).
> 

well instead of having to files, I am happy to write a xsl to modify the 
cocoon.xconf elements for this target.

I will have a look on this one.


> The reason I put in the webapp target was because it is easier to work 
> with in many situations. For example, I am often on slow connections and 
> want to synchronise individual files rather than large war files. So I 
> want to build a webapp not a war.
> 
> Of course, I could always unzip the war after building it, so I won't 
> object to it if you insist.

I would like to review the build setup as a whole to suit most of our 
needs.

what about if we write down the main use cases and then review the build 
process?


Cheers,
Cheche


Re: svn commit: rev 9958 - in xml/forrest/trunk: . src/core/targets

Posted by Ross Gardler <rg...@apache.org>.
Juan Jose Pablos wrote:
> Ross Gardler escribió:
> 
>>
>>
>> This will prevent the webapp working. The reason for overwriting 
>> cocoon.xconf was that a different setup is required for remotely 
>> distributed webapps. Without this different xconf the distributed 
>> webapp will still be looking in places like src, which is not in that 
>> packaged war file.
>>
> 
> I was not aware of this setup, and It drive me crazy,  I do not want to 
> maintain two similar files.

This was always a hack to get things working quickly. A better solution 
is always welcome once someone has the time. Nicola Ken has done some 
partial work on this (see his mail).

>> I suspect this change will make it look like the webapp works if you 
>> test on the build machine, but if you distribute to a remote machine 
>> it will fail. Put the cocoon-live.xconf in and you have a better 
>> chance of it working.
>>
> 
> Can we use this setup just for the war target?

I assume you mean move the extra copying done in the webapp target into 
the war target...

The reason I put in the webapp target was because it is easier to work 
with in many situations. For example, I am often on slow connections and 
want to synchronise individual files rather than large war files. So I 
want to build a webapp not a war.

Of course, I could always unzip the war after building it, so I won't 
object to it if you insist.

Ross


Re: svn commit: rev 9958 - in xml/forrest/trunk: . src/core/targets

Posted by Ross Gardler <rg...@apache.org>.
cheche@apache.org wrote:
> Author: cheche
> Date: Sat Apr 10 04:02:11 2004
> New Revision: 9958
> 
> Modified:
>    xml/forrest/trunk/src/core/targets/webapp.xml
>    xml/forrest/trunk/status.xml
> Log:
> Stop overwriting skinconf and cocoon.xconf on webapp target,


This will prevent the webapp working. The reason for overwriting 
cocoon.xconf was that a different setup is required for remotely 
distributed webapps. Without this different xconf the distributed webapp 
will still be looking in places like src, which is not in that packaged 
war file.

file="${forrest.home}/context/WEB-INF/cocoon-live.xconf" is used for the 
distributable webapp

file="${forrest.home}/context/WEB-INF/cocoon.xconf" is used for the 
webapp generated for "forrest run", which will not work if distributed 
to a different machine.

Once you do this you need to copy skinconf as before so that the webapp 
can find the files it is looking for.

I suspect this change will make it look like the webapp works if you 
test on the build machine, but if you distribute to a remote machine it 
will fail. Put the cocoon-live.xconf in and you have a better chance of 
it working.

 > Libs were not copied

This was certainly a problem.

Ross