List Info

Thread: Nuxeo deployment updated




Nuxeo deployment updated
user name
2006-12-07 20:45:38
Hi all,

I've updated the nuxeo deployment so for now if you update
from SVN you 
*must* deploy the application using the new ant scripts.

Before deploying Nuxeo please *remove* from jboss deploy
directory All 
nuxeo files (including XML JAR EAR WAR SAR files).

To build and deploy the entire application run the target 
"deploy-ecm-all" from Nuxeo/build.xml
To build and deploy only a minimal application (suitable for
remote 
connections but without web interface)
run the target "deploy-ecm-all" from
NXCoreFacade/build.xml
To build and deploy only the module in the project run the
"deploy-ecm" 
target in the  build.xml of the project
To build and deploy only the Nuxeo ECM deployer and
NXRuntime run the 
target "deploy-deployer" from NXJBossRuntime
To build and deploy only the Nuxeo ECM deployer, NXRuntime +
the 
nuxeo.nxp skeleton (template) run the target
"deploy-ecm" from NXJBossRuntime.

So, in general you will use the target deploy-ecm-all from 
Nuxeo/build.xml to deploy the entire application and then
the deploy-ecm 
target for each project you want to update.
 

*Note* that you also need to deploy the custom URLComparator
and 
dependency.order file because these are used by nxthemes
EARs
You need to do this only the first time.

--------------

Some explanations about the deployment:

The Nuxeo deploy-ecm-all target will deploy the following
files:
1. NXCommon.jar in jboss lib directory
2. nuxeo.deployer containing the deployer and NXRuntime in
the deploy 
directory (a JAR archive)
3. A nuxeo.nxp folder in deploy directory
4. several nxthemes JARs and EARs in deploy directory

The nuxeo.nxp folder is a customized EAR archive that
perform a 
preprocessing step before the deployment.
After the preprocessing step is done the deployment is
delegated to the 
original JBoss EAR deployer.
The preprocessing is made to dynamically update or create
the needed 
configuration files as application.xml, web.xml,
faces-config.xml etc
and also to copy, delete, create or unzip files inside the
EAR.

The preprocessing directives are specified by each
deployable module 
using a deployment-feature.xml file.
These files can be deployed as standalone XML files or
inside a JAR in 
the /OSGI-INF directory.

The container (nuxeo.nxp) has a  container descriptor 
OSGI-INF/deployment-container.xml file that specify  some
install 
commands and all configuration template files that can be
updated by 
deployable modules (fragments).

If you look in the nuxeo.nxp folder before starting jboss
(and just 
after running the deploy-ecm-all task) you will see that
there is no 
nuxeo.war file
inside. This will be re-created at the each deploy by the
preprocessor.
Also you don't have the META-INF/application.xml neither the

META-INF/jboss-app.xml
These files will be created by the preprocessor. You can see
their 
templates in the OSGI-INF/templates directory.
For example this is the template used for the
application.xml file:

<?xml version="1.0"
encoding="UTF-8"?>

<application version="1.4" xmlns="http://java.sun
.com/xml/ns/j2ee"
  xmlnssi=&q
uot;http:
//www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/x
ml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/application_1_4.xsd
">

  <display-name>Nuxeo5</display-name>


  %%
 

</application>

it looks like a  common application.xml  but contains a
weird  
%% inside the application tag.
This is a marker (or insertion point) that can be used by
fragment 
descriptors to insert new text (or XML) fragments
at this place.  Fragments can append or prepend new text on
an insertion 
point.
When a fragment insert a new contributions it is referring
the target 
insertion point by using its name (e.g. MODULE)
appended to the name of the template declaring the insertion
point and 
delimited by a #. Ex: application#MODULE
For example the following fragment inserts a new EAR module
named NXCore.jar

<?xml version="1.0"?>

<fragment>

    <require>NXCoreAPI.jar</require>

    <extension target="application#MODULE">

    <module>
        <java>NXCore.jar</java>
    </module>

    </extension>
   
</fragment>


Note that this fragments also declares a <require>
statement. This 
statement is very important since it is used to control the
order of deploying. So the above statement means that the
NXCore.jar 
module (fragment) must be deployed after the NXCoreAPI.jar
was deployed.

Each fragment may contain any number of  contributions
(extension tags) 
and also a suite of install commands like this one:

<?xml version="1.0"?>

<fragment>

    ...

    <extension ...> ... </extension>

    ...

    <install>

        <!--  unzip the war template -->
        <unzip from="nuxeo.jar"
to="/">
            <include>nuxeo.war/**</include>
        </unzip>

    </install>

</fragment>

This install section has only one install command : unzip
the entry 
nuxeo.war from the nuxeo.jar archive inside the EAR root /.

Supported install commands are:

- delete. Example:
    <delete path="/TEMP"/>
- mkdir. Example:
    <mkdir path="/TEMP"/>
- copy. Example:
    <copy from="/OSGI-INF"
to="/TEMP/OSGI-INF-FILTERED">
        <exclude>*-container.xml</exclude>   
    </copy>
- unzip. Example:
    <unzip from="NXCoreAPI.jar"
to="TEMP/unzip-filtered">
       
<include>org/nuxeo/ecm/core/api/impl/*</include>
        <exclude>*.class</exclude>
    </unzip>   


---------------
An exampe of container descriptor file:


<?xml version="1.0"?>

<container>

    <template name="application"
src="OSGI-INF/templates/application.xml"
        installPath="META-INF/application.xml"
required="true"/>
   
    <template name="jboss-app"
src="OSGI-INF/templates/jboss-app.xml"
        installPath="META-INF/jboss-app.xml"
required="true"/>

    <template name="web"
src="OSGI-INF/templates/web.xml"
        installPath="nuxeo.war/WEB-INF/web.xml"
required="true"/>

    <template name="faces-config"
src="OSGI-INF/templates/faces-config.xml"
       
installPath="nuxeo.war/WEB-INF/faces-config.xml"
required="true"/>

    <install>
        <!--  clean up last install -->
        <delete
path="/META-INF/application.xml"/>
        <delete
path="/META-INF/jboss-app.xml"/>       
        <delete path="/nuxeo.war"/>
       
        <!-- create here the tree directory structure if
needed -->
       
    </install>
       
</container>



Bogdan


_______________________________________________
ECM mailing list
ECMlists.nuxeo.com
http://li
sts.nuxeo.com/mailman/listinfo/ecm
Nuxeo deployment updated
user name
2006-12-07 20:55:29
Congrats!
One small suggestion: rename our customized .nxp deployment
extension  
to use .nxar instead.
This will freak out people less 


Florent

On 7 Dec 2006, at 21:45, Bogdan Stefanescu wrote:

> Hi all,
>
> I've updated the nuxeo deployment so for now if you
update from SVN  
> you *must* deploy the application using the new ant
scripts.
>
> Before deploying Nuxeo please *remove* from jboss
deploy directory  
> All nuxeo files (including XML JAR EAR WAR SAR files).
>
> To build and deploy the entire application run the
target "deploy- 
> ecm-all" from Nuxeo/build.xml
> To build and deploy only a minimal application
(suitable for remote  
> connections but without web interface)
> run the target "deploy-ecm-all" from
NXCoreFacade/build.xml
> To build and deploy only the module in the project run
the "deploy- 
> ecm" target in the  build.xml of the project
> To build and deploy only the Nuxeo ECM deployer and
NXRuntime run  
> the target "deploy-deployer" from
NXJBossRuntime
> To build and deploy only the Nuxeo ECM deployer,
NXRuntime + the  
> nuxeo.nxp skeleton (template) run the target
> "deploy-ecm" from NXJBossRuntime.
>
> So, in general you will use the target deploy-ecm-all
from Nuxeo/ 
> build.xml to deploy the entire application and then the
deploy-ecm  
> target for each project you want to update.
>
> *Note* that you also need to deploy the custom
URLComparator and  
> dependency.order file because these are used by
nxthemes EARs
> You need to do this only the first time.
>
> --------------
>
> Some explanations about the deployment:
>
> The Nuxeo deploy-ecm-all target will deploy the
following files:
> 1. NXCommon.jar in jboss lib directory
> 2. nuxeo.deployer containing the deployer and NXRuntime
in the  
> deploy directory (a JAR archive)
> 3. A nuxeo.nxp folder in deploy directory
> 4. several nxthemes JARs and EARs in deploy directory
>
> The nuxeo.nxp folder is a customized EAR archive that
perform a  
> preprocessing step before the deployment.
> After the preprocessing step is done the deployment is
delegated to  
> the original JBoss EAR deployer.
> The preprocessing is made to dynamically update or
create the  
> needed configuration files as application.xml, web.xml,
faces- 
> config.xml etc
> and also to copy, delete, create or unzip files inside
the EAR.
>
> The preprocessing directives are specified by each
deployable  
> module using a deployment-feature.xml file.
> These files can be deployed as standalone XML files or
inside a JAR  
> in the /OSGI-INF directory.
>
> The container (nuxeo.nxp) has a  container descriptor
OSGI-INF/ 
> deployment-container.xml file that specify  some
install commands  
> and all configuration template files that can be
updated by  
> deployable modules (fragments).
>
> If you look in the nuxeo.nxp folder before starting
jboss (and just  
> after running the deploy-ecm-all task) you will see
that there is  
> no nuxeo.war file
> inside. This will be re-created at the each deploy by
the  
> preprocessor.
> Also you don't have the META-INF/application.xml
neither the META- 
> INF/jboss-app.xml
> These files will be created by the preprocessor. You
can see their  
> templates in the OSGI-INF/templates directory.
> For example this is the template used for the
application.xml file:
>
> <?xml version="1.0"
encoding="UTF-8"?>
>
> <application version="1.4" xmlns="http://java.sun
.com/xml/ns/j2ee"
>  xmlnssi=&q
uot;http:
//www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://java.sun.com/x
ml/ns/j2ee
>    http://java.sun.com/xml/ns/j2ee/application_1_4.xsd
">
>
>  <display-name>Nuxeo5</display-name>
>
>
>  %%
>
> </application>
>
> it looks like a  common application.xml  but contains a
weird  % 
> % inside the application tag.
> This is a marker (or insertion point) that can be used
by fragment  
> descriptors to insert new text (or XML) fragments
> at this place.  Fragments can append or prepend new
text on an  
> insertion point.
> When a fragment insert a new contributions it is
referring the  
> target insertion point by using its name (e.g. MODULE)
> appended to the name of the template declaring the
insertion point  
> and delimited by a #. Ex: application#MODULE
> For example the following fragment inserts a new EAR
module named  
> NXCore.jar
>
> <?xml version="1.0"?>
>
> <fragment>
>
>    <require>NXCoreAPI.jar</require>
>
>    <extension
target="application#MODULE">
>
>    <module>
>        <java>NXCore.jar</java>
>    </module>
>
>    </extension>
>   </fragment>
>
>
> Note that this fragments also declares a
<require> statement. This  
> statement is very important since it is used to control
the
> order of deploying. So the above statement means that
the  
> NXCore.jar module (fragment) must be deployed after the
NXCoreAPI.jar
> was deployed.
>
> Each fragment may contain any number of  contributions
(extension  
> tags) and also a suite of install commands like this
one:
>
> <?xml version="1.0"?>
>
> <fragment>
>
>    ...
>
>    <extension ...> ... </extension>
>
>    ...
>
>    <install>
>
>        <!--  unzip the war template -->
>        <unzip from="nuxeo.jar"
to="/">
>            <include>nuxeo.war/**</include>
>        </unzip>
>
>    </install>
>
> </fragment>
>
> This install section has only one install command :
unzip the entry  
> nuxeo.war from the nuxeo.jar archive inside the EAR
root /.
>
> Supported install commands are:
>
> - delete. Example:
>    <delete path="/TEMP"/>
> - mkdir. Example:
>    <mkdir path="/TEMP"/>
> - copy. Example:
>    <copy from="/OSGI-INF"
to="/TEMP/OSGI-INF-FILTERED">
>        <exclude>*-container.xml</exclude>  
   </copy>
> - unzip. Example:
>    <unzip from="NXCoreAPI.jar"
to="TEMP/unzip-filtered">
>       
<include>org/nuxeo/ecm/core/api/impl/*</include>
>        <exclude>*.class</exclude>
>    </unzip>
>
> ---------------
> An exampe of container descriptor file:
>
>
> <?xml version="1.0"?>
>
> <container>
>
>    <template name="application"
src="OSGI-INF/templates/ 
> application.xml"
>        installPath="META-INF/application.xml"
required="true"/>
>      <template name="jboss-app"
src="OSGI-INF/templates/jboss-app.xml"
>        installPath="META-INF/jboss-app.xml"
required="true"/>
>
>    <template name="web"
src="OSGI-INF/templates/web.xml"
>       
installPath="nuxeo.war/WEB-INF/web.xml"
required="true"/>
>
>    <template name="faces-config"
src="OSGI-INF/templates/faces- 
> config.xml"
>       
installPath="nuxeo.war/WEB-INF/faces-config.xml"  
> required="true"/>
>
>    <install>
>        <!--  clean up last install -->
>        <delete
path="/META-INF/application.xml"/>
>        <delete
path="/META-INF/jboss-app.xml"/>               
> <delete path="/nuxeo.war"/>
>              <!-- create here the tree directory
structure if  
> needed -->
>          </install>
>       </container>
>
>
>
> Bogdan
>
>
> _______________________________________________
> ECM mailing list
> ECMlists.nuxeo.com
> http://li
sts.nuxeo.com/mailman/listinfo/ecm
>

-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1
40 33 79 87


_______________________________________________
ECM mailing list
ECMlists.nuxeo.com
http://li
sts.nuxeo.com/mailman/listinfo/ecm
Nuxeo deployment updated
user name
2006-12-07 21:07:29
I've started using .nux then Eric tell me to rename it with
.nxp ...
I have no special preference for the extension but renaming
it means 
updating all build.properties file for every project :'(
So I wait for all of us to agree with the new extension and
then I will 
rename it 

Bogdan

Florent Guillaume wrote:
> Congrats!
> One small suggestion: rename our customized .nxp
deployment extension 
> to use .nxar instead.
> This will freak out people less 
>
>
> Florent
>
> On 7 Dec 2006, at 21:45, Bogdan Stefanescu wrote:
>
>> Hi all,
>>
>> I've updated the nuxeo deployment so for now if you
update from SVN 
>> you *must* deploy the application using the new ant
scripts.
>>
>> Before deploying Nuxeo please *remove* from jboss
deploy directory 
>> All nuxeo files (including XML JAR EAR WAR SAR
files).
>>
>> To build and deploy the entire application run the
target 
>> "deploy-ecm-all" from Nuxeo/build.xml
>> To build and deploy only a minimal application
(suitable for remote 
>> connections but without web interface)
>> run the target "deploy-ecm-all" from
NXCoreFacade/build.xml
>> To build and deploy only the module in the project
run the 
>> "deploy-ecm" target in the  build.xml of
the project
>> To build and deploy only the Nuxeo ECM deployer and
NXRuntime run the 
>> target "deploy-deployer" from
NXJBossRuntime
>> To build and deploy only the Nuxeo ECM deployer,
NXRuntime + the 
>> nuxeo.nxp skeleton (template) run the target
>> "deploy-ecm" from NXJBossRuntime.
>>
>> So, in general you will use the target
deploy-ecm-all from 
>> Nuxeo/build.xml to deploy the entire application
and then the 
>> deploy-ecm target for each project you want to
update.
>>
>> *Note* that you also need to deploy the custom
URLComparator and 
>> dependency.order file because these are used by
nxthemes EARs
>> You need to do this only the first time.
>>
>> --------------
>>
>> Some explanations about the deployment:
>>
>> The Nuxeo deploy-ecm-all target will deploy the
following files:
>> 1. NXCommon.jar in jboss lib directory
>> 2. nuxeo.deployer containing the deployer and
NXRuntime in the deploy 
>> directory (a JAR archive)
>> 3. A nuxeo.nxp folder in deploy directory
>> 4. several nxthemes JARs and EARs in deploy
directory
>>
>> The nuxeo.nxp folder is a customized EAR archive
that perform a 
>> preprocessing step before the deployment.
>> After the preprocessing step is done the deployment
is delegated to 
>> the original JBoss EAR deployer.
>> The preprocessing is made to dynamically update or
create the needed 
>> configuration files as application.xml, web.xml,
faces-config.xml etc
>> and also to copy, delete, create or unzip files
inside the EAR.
>>
>> The preprocessing directives are specified by each
deployable module 
>> using a deployment-feature.xml file.
>> These files can be deployed as standalone XML files
or inside a JAR 
>> in the /OSGI-INF directory.
>>
>> The container (nuxeo.nxp) has a  container
descriptor 
>> OSGI-INF/deployment-container.xml file that specify
 some install 
>> commands and all configuration template files that
can be updated by 
>> deployable modules (fragments).
>>
>> If you look in the nuxeo.nxp folder before starting
jboss (and just 
>> after running the deploy-ecm-all task) you will see
that there is no 
>> nuxeo.war file
>> inside. This will be re-created at the each deploy
by the preprocessor.
>> Also you don't have the META-INF/application.xml
neither the 
>> META-INF/jboss-app.xml
>> These files will be created by the preprocessor.
You can see their 
>> templates in the OSGI-INF/templates directory.
>> For example this is the template used for the
application.xml file:
>>
>> <?xml version="1.0"
encoding="UTF-8"?>
>>
>> <application version="1.4"
xmlns="http://java.sun
.com/xml/ns/j2ee"
>>  xmlnssi=&q
uot;http:
//www.w3.org/2001/XMLSchema-instance"
>>  xsi:schemaLocation="http://java.sun.com/x
ml/ns/j2ee
>>    http://java.sun.com/xml/ns/j2ee/application_1_4.xsd
">
>>
>>  <display-name>Nuxeo5</display-name>
>>
>>
>>  %%
>>
>> </application>
>>
>> it looks like a  common application.xml  but
contains a weird  
>> %% inside the application tag.
>> This is a marker (or insertion point) that can be
used by fragment 
>> descriptors to insert new text (or XML) fragments
>> at this place.  Fragments can append or prepend new
text on an 
>> insertion point.
>> When a fragment insert a new contributions it is
referring the target 
>> insertion point by using its name (e.g. MODULE)
>> appended to the name of the template declaring the
insertion point 
>> and delimited by a #. Ex: application#MODULE
>> For example the following fragment inserts a new
EAR module named 
>> NXCore.jar
>>
>> <?xml version="1.0"?>
>>
>> <fragment>
>>
>>    <require>NXCoreAPI.jar</require>
>>
>>    <extension
target="application#MODULE">
>>
>>    <module>
>>        <java>NXCore.jar</java>
>>    </module>
>>
>>    </extension>
>>   </fragment>
>>
>>
>> Note that this fragments also declares a
<require> statement. This 
>> statement is very important since it is used to
control the
>> order of deploying. So the above statement means
that the NXCore.jar 
>> module (fragment) must be deployed after the
NXCoreAPI.jar
>> was deployed.
>>
>> Each fragment may contain any number of 
contributions (extension 
>> tags) and also a suite of install commands like
this one:
>>
>> <?xml version="1.0"?>
>>
>> <fragment>
>>
>>    ...
>>
>>    <extension ...> ... </extension>
>>
>>    ...
>>
>>    <install>
>>
>>        <!--  unzip the war template -->
>>        <unzip from="nuxeo.jar"
to="/">
>>           
<include>nuxeo.war/**</include>
>>        </unzip>
>>
>>    </install>
>>
>> </fragment>
>>
>> This install section has only one install command :
unzip the entry 
>> nuxeo.war from the nuxeo.jar archive inside the EAR
root /.
>>
>> Supported install commands are:
>>
>> - delete. Example:
>>    <delete path="/TEMP"/>
>> - mkdir. Example:
>>    <mkdir path="/TEMP"/>
>> - copy. Example:
>>    <copy from="/OSGI-INF"
to="/TEMP/OSGI-INF-FILTERED">
>>       
<exclude>*-container.xml</exclude>     
</copy>
>> - unzip. Example:
>>    <unzip from="NXCoreAPI.jar"
to="TEMP/unzip-filtered">
>>       
<include>org/nuxeo/ecm/core/api/impl/*</include>
>>        <exclude>*.class</exclude>
>>    </unzip>
>>
>> ---------------
>> An exampe of container descriptor file:
>>
>>
>> <?xml version="1.0"?>
>>
>> <container>
>>
>>    <template name="application"
src="OSGI-INF/templates/application.xml"
>>       
installPath="META-INF/application.xml"
required="true"/>
>>      <template name="jboss-app"
src="OSGI-INF/templates/jboss-app.xml"
>>       
installPath="META-INF/jboss-app.xml"
required="true"/>
>>
>>    <template name="web"
src="OSGI-INF/templates/web.xml"
>>       
installPath="nuxeo.war/WEB-INF/web.xml"
required="true"/>
>>
>>    <template name="faces-config" 
>> src="OSGI-INF/templates/faces-config.xml"
>>       
installPath="nuxeo.war/WEB-INF/faces-config.xml" 
>> required="true"/>
>>
>>    <install>
>>        <!--  clean up last install -->
>>        <delete
path="/META-INF/application.xml"/>
>>        <delete
path="/META-INF/jboss-app.xml"/>             
<delete 
>> path="/nuxeo.war"/>
>>              <!-- create here the tree directory
structure if needed -->
>>          </install>
>>       </container>
>>
>>
>>
>> Bogdan
>>
>>
>> _______________________________________________
>> ECM mailing list
>> ECMlists.nuxeo.com
>> http://li
sts.nuxeo.com/mailman/listinfo/ecm
>>
>
> --Florent Guillaume, Director of R&D, Nuxeo
> Open Source Enterprise Content Management (ECM)
> http://www.nuxeo.com
  http://www.nuxeo.org  
+33 1 40 33 79 87
>
>
>

_______________________________________________
ECM mailing list
ECMlists.nuxeo.com
http://li
sts.nuxeo.com/mailman/listinfo/ecm
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )