Kareem Al Jabr wrote:

> On Wed, Jan 12, 2011 at 1:22 PM, Nils Breunese <[email protected]> wrote:
>
> Kareem Al Jabr wrote:
>
>>> I would like to have a clear picture on how the build process should be. I 
>>> checked out the source code from SVN and I also added dependencies on STK 
>>> module and all is working fine. Now I use the generated WAR file in the 
>>> target folder of magnolia-empty-webapp as my author instance WAR file. And 
>>> I added the public instance located in the Apache bundle webapp folder. Now 
>>> I work on my site through the admin central by applying styles and 
>>> modifying templates definitions if needed.
>>
>> There is not 'one right way' for your build process. We don't check out the 
>> source from Subversion, but have set up our own Maven project based on the 
>> Magnolia empty web app jar and added the modules we want to have in our 
>> setup. And then we add our own custom code and configuration in our own 
>> additional modules.
>
> Could you please provide me with a link explaining how this can be done in 
> more details.

I don't know of a page explaining this in detail for Magnolia specifically. I 
don't know if you're familiar with Maven, but if not that might be a place to 
start: http://maven.apache.org/ If you have experience with another build tool 
(ant, gradle, etc.) you could just use that as well.

>>> Note: I use MySQL as my repository. If I need to make changes on the source 
>>> code I have to build the author instance again, will this override my 
>>> modifications to the styles and template definitions I modified in the 
>>> previous war file?
>>>
>>
>>
>> Any configuration stored in MySQL will be persisted, unless an update 
>> overwrites this data. We use local instances of Magnolia during development 
>> and export our repository modifications to XML and commit these XML files in 
>> our build, so they get bootstrapped when the code is deployed.
> I have a problem here. When tables are created in the first deployment of the 
> WAR file they are all created with MyIsam with engine type and I've read in 
> the documentation that this engine type isn't supported. So I need to have 
> ndbcluster as engine type since I'm using a clustered MySQL database.

You can configure the default storage engine in the configuration of your MySQL 
server: 
http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_default-storage-engine
 Or you can change the storage engine after tables are created using a 
statement like 'ALTER TABLE table_name ENGINE = InnoDB;'.

>>> And What about the public instance!? is it enough to keep working on the 
>>> folder I've extracted from the Apache bundle? or I can create a copy of the 
>>> generated WAR file from source code and rename it as public instance?
>>
>> You can use a WAR file with multiple configurations: 
>> http://documentation.magnolia-cms.com/cookbook/using-a-single-war-file-with-multiple-configurations.html
> I would like to have a separate WAR for my public instance since I will 
> deploy it on a separate server.

You can just deploy the same war on all servers if you like, and just make sure 
the war contains the right settings for the right servers (see 
http://documentation.magnolia-cms.com/technical-guide/configuration-mechanisms.html).
 Or you can build separate wars if you really want to. That's up to you.

> Can I use the same author instance WAR file and just rename it and change the 
> persistence storage related tags! I need to know the correct way for the 
> build process and deployment. Whenever I read online I find different topics 
> and each mentioning in a different way.

That's probably because there are multiple ways to do things, there is no one 
correct way. The official documentation can be found at 
http://documentation.magnolia-cms.com/ so I recommend going there first.

> My main question here, if there is a WAR file changes. And I already have my 
> instance setup and there is a folder already extracted from old WAR. how to 
> merge the new changes in the new WAR? If I delete the instance's folder the 
> deployment fails and only succeeds when I drop and recreate the database 
> again!!

I'm not familiar with this problem. When we update to a new version we remove 
that old application and deploy the new war and restart the instance. This 
works fine for us. If you get some error message, you might want to post this 
message.

Nils.
------------------------------------------------------------------------
 VPRO   www.vpro.nl
------------------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to