Bug 185283

Summary: Create Update Center for stand alone module
Product: platform Reporter: javydreamercsw <javydreamercsw>
Component: -- Other --Assignee: issues <issues.netbeans.org>
Status: RESOLVED WONTFIX QA Contact: issues <issues.netbeans.org>
Priority: P3 CC: jglick
Version: 6.x   
Target Milestone: TBD   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:
Attachments: patch incorporating Javier's change

Description javydreamercsw 2010-04-29 19:21:25 UTC
I found that this is missing and is a valid option. Even further I found a solution to it. For now I have this in the module's build.xml file but I think it belogns somewhere else in the harness.

<target name="create-update-center" depends="harness.taskdefs, nbm">
        <mkdir dir="${update.dir}"/>
        <pathfileset id="updater.jar">
            <path refid="cluster.path.id"/>
            <filename name="modules/ext/updater.jar"/>
        </pathfileset>
        <makeupdatedesc desc="${update.dir}/updates.xml" distbase="." automaticgrouping="true" uselicenseurl="${use.license.url.in.catalog}">
            <fileset dir="./build">
                <include name="*.nbm"/>
                <include name="*.jar"/>
            </fileset>
            <updaterjar>
                <resources refid="updater.jar"/>
            </updaterjar>
        </makeupdatedesc>
        <!--Copy the files to the folder-->
        <copy todir="${update.dir}">
            <fileset dir="./build">
                <include name="*.nbm"/>
                <include name="*.jar"/>
            </fileset>
        </copy>
    </target>

Nothing magic about it. Just used the Netbeans task makeupdatedesc. Feel free to change the target name and change ./build with something smarter (I couldn't find a pre-defined bvariable for that in the stand alone modules).
Comment 1 tomwheeler 2010-04-29 20:08:45 UTC
Created attachment 98303 [details]
patch incorporating Javier's change

I've recast Javier's change as a git-format patch, along with documentation update to harness README file.  I have done no further testing -- just trying to help out a bit with his first contribution.
Comment 2 javydreamercsw 2010-04-29 20:43:56 UTC
Thanks for the help Tom. Sadly I can't use Hg at work since I can't connect to Netbeans repository.
Comment 3 Jesse Glick 2010-05-03 15:14:44 UTC
Feel free to add a DevFaq* entry but I don't think this needs to be in the harness. If your module is being developed seriously enough that you need to release updates to it, you should simply create a module suite and add the module to it, at which point you have the ability to create an update center as well as perform other operations. Standalone modules are intended only as a fast, simple way to write a demo or something.
Comment 4 javydreamercsw 2010-05-03 19:23:45 UTC
I'll add the DevFaq but I still think this is a valid approach. Stand alone modules are more than demos, they can be Modules meant to be shared between lots of projects thus not meant to be tied with a suite. In such cases it would be more than logic to have such an update center to keep all applications up to date from one central point.
Comment 5 javydreamercsw 2010-05-03 19:49:33 UTC
Added as a FAQ entry here: http://wiki.netbeans.org/DevFaqHowToReuseModules
Comment 6 Jesse Glick 2010-06-14 20:07:38 UTC
(In reply to comment #4)
> Stand alone
> modules are more than demos, they can be Modules meant to be shared between
> lots of projects thus not meant to be tied with a suite.

If they are to be shared by anything, they should be packaged into a suite project, even if it only contains a single module.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo