10 Replies Latest reply on Oct 16, 2007 5:00 AM by Thomas Heute

    custom portal file name

    Vinh Nguyen Newbie

      I'm building from source and would like to output the final artifact with a custom name like myapp-portal.sar instead of the default jboss-portal.sar. Is this configurable somewhere as part of the current build scripts?

        • 1. Re: custom portal file name
          Peter Johnson Master

          You could have simply looked in the build scripts to see that jboss-portal.sar is hard coded. Which script it is in is left as an exercise for the reader. ;-)

          • 2. Re: custom portal file name
            Vinh Nguyen Newbie

            Thanks Peter,
            Yep, that would have been easy to do:) But, I wanted to know if there was a documented way to do this kind of configuration in some properties file somewhere instead of modifying the actual build scripts.

            The reason I ask is because I'd like to use JBoss Portal to build and customize a portal product for customers. So I can take two approaches, each with its pros/cons:

            1) The binary build comes with a lot of stuff I don't need. So I'd have to unpack the build, strip out unnecessary things as well as do a search-replace in several files to customize the product (i.e. to change the context name, output sar name, add/modify themes, etc), and then repack the build.

            2) I can build from source, but that also requires modifying various files to fit my customization needs. I don't mind changing property files, but I'd prefer not touching the original JBoss build scripts which most likely can change between releases.

            So ideally, I'd like to build some automation tools that can just take the binary/source download and customize the simple things as needed for various customers. But the current Portal downloads don't quite make this easy to do since there isn't a centralized set of files that would make at least the simple customizations easier.

            Also, there isn't a clear separation between the core necessary components of JBoss Portal, and what is extra (i.e. administration component). It would be good if there were separate downloads for the core and the "bundled" portal package.

            I understand though that JBoss Portal is currently work in progress:)

            • 3. Re: custom portal file name
              Chris Laprun Master

               

              "vinguye2" wrote:
              I'm building from source and would like to output the final artifact with a custom name like myapp-portal.sar instead of the default jboss-portal.sar. Is this configurable somewhere as part of the current build scripts?


              Why would that be? If you were using a proprietary software say IBM's or BEA's would you be able to rename their product to whatever you'd like? That might actually be a license agreement breach, in the case of proprietary software, though I am not a lawyer.

              "vinguye2" wrote:
              Also, there isn't a clear separation between the core necessary components of JBoss Portal, and what is extra (i.e. administration component). It would be good if there were separate downloads for the core and the "bundled" portal package.


              Actually, the default deploy target in the source distribution will only deploy that minimal core. I agree that it might be better documented though.

              "vinguye2" wrote:
              I understand though that JBoss Portal is currently work in progress:)


              Hmm, JBoss Portal is a mature piece of software with a roadmap, release schedule, etc. in use at major companies around the world... Just because it's open source doesn't mean that it's anymore a work in progress as you call it than any other competing products...

              • 4. Re: custom portal file name
                Chris Laprun Master

                 

                "vinguye2" wrote:
                I'm building from source and would like to output the final artifact with a custom name like myapp-portal.sar instead of the default jboss-portal.sar. Is this configurable somewhere as part of the current build scripts?


                Also, please make sure that you abide to our EULA if you do so, i.e. you might need to remove all Red Hat trademarks, but once again, I am not a lawyer and this shouldn't construed as legal advice.

                • 5. Re: custom portal file name
                  Vinh Nguyen Newbie

                  Thanks Chris,
                  Yep, I will take a careful look at the licensing agreements to make sure I don't do anything illegal:)

                  Now that you mention licensing, I should ask: what's the intended audience for the binary and source downloads?

                  Both downloads will require a developer to modify the contents (i.e descriptor files, jboss-web.xml to change the context name, etc) if they want configuration to be done during development instead of at production/runtime via the admin portlet. I would think the original jboss-portal.sar download is rarely used without modifications to it.

                  Also, there are some features that come with JBoss Portal that are active by default (i.e. News and Weather pages). Even the minimal deploy target adds in these non-core pages. I need to remove/deactivate features which customers don't need. I also need to make sure these features won't be available in customer deployments if they have the CMS portlet enabled, since customers shouldn't need to see content that aren't used in the final product.

                  I think it would be good to have two different binary downloads: a core version with just the minimal components, and a bundled version with all the extra features like the current download.

                  I'm sure there must be developers out there who are interested in what it takes to get JBoss Portal down to just the core so that we can actually make a commercial product with it, not just use it.

                  As for the jboss-portal.sar file name, I think its important that developers be able to customize the name. Otherwise, a customer won't be able to deploy two JBoss Portal based products on the same server, if the file names are the same.

                  • 6. Re: custom portal file name
                    Peter Johnson Master

                    See also the discussion at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=121025. One thing I did not mention there was how to remove the "extra" portlets and how to replace the default CMS contents.

                    The extra portlets are at jboss-portal.sar/samples. Either remove hte entire samples directory, or remove the *-object.xml file in the subdirectories.

                    The default CMS content is at jboss-portal.sar/portal-cms.sar/portal/cms/conf/default-content/default. Replace the content with your own. (The directory name is configurable, see the portal-cms.sar/META-INF/jboss-service.xml file.)

                    By the way, my custom portal uses a package name other than jboss-portal.sar. Works just fine. Though I do not think I have tried to deploy the portal twice using two different package names, not sure if that would work.

                    • 7. Re: custom portal file name
                      Vinh Nguyen Newbie

                      Yep, I've been following that discussion, too, since that user also seems to be looking for a core version:)

                      I'm still not sure how to remove the extra portlets. Here's the dir listing of my deployment:

                      jboss-portal.sar
                      conf/
                      dtd/
                      lib/
                      META-INF/
                      port-admin.sar
                      portal-ajax.sar
                      portal-aop.xml
                      portal-core.war
                      portal-server.war

                      I don't have the /example subdirectory in my sar, or any other portals or portlets elsewhere in my JBoss server deployment. I also did a search for files containing the word "news" or "weather", but no luck. So I'm still puzzled on how to remove the News and Weather pages.

                      • 8. Re: custom portal file name
                        Peter Johnson Master

                        In 2.6.2, the news and weather pages are defined at jboss-portal.sar/samples/portal-news-samples.war/WEB-INF/default-object.xml and jboss-portal.sar/samples/portal-weather-samples.war/WEB-INF/default-object.xml, respectively.

                        Did you, by any chance, deploy the portal, and then later remove the 'samples' directory? In that case, the news and weather pages are still in the database, you will have to manually remove them using the Management Portlet. When I work on my custom portal, I usually initialize the database before I deploy it. Then I am confident that what I see reflects my configuration settings and not information retained in the database. Of course, once I go into production all future updates are done using the Management Portlet.

                        • 9. Re: custom portal file name
                          Vinh Nguyen Newbie

                          Thanks Peter, that did the trick!

                          At first, I downloaded and deployed the bundled sar, which had the extras. Then I redeployed with just the core sar. Since I didn't explicitly do any db configurations, I assumed that no actual db was being used, and that a redeploy would clear out any data persisted from the previous deployment.

                          So now, I just had to delete the files in:
                          \jboss-portal-2.6.2.GA\server\default\data\portal\hypersonic

                          Looks like by default, JBoss Portal uses the file-based Hypersonic db. It would be good to have this documented somewhere.

                          • 10. Re: custom portal file name
                            Thomas Heute Master

                            Before complaining about the doc, please read it !
                            =====
                            2.1. Installing from Bundled Download

                            This is the easiest and fastest way to get JBoss Portal installed and running. The reason, is that the download bundle contains JBoss Application Server, and JBoss Portal uses the embedded Hypersonic Database.
                            =====