Resource Menu


RE : New module
  • cd LS_SRC/Src/LS-Server
  • cp -r wiki note
  • I edit package name to prevent conflict
  • I edit build.properties and add : libresource-note.dir=${src.ls-server.dir}/note
  • I edit build.xml and add :
<condition property="rebuilt-note">
		<not>
			<uptodate targetfile="${components-jar.dir}/Libresource/Note/${libresource-note.component-name}-${libresource-note.version}.jar">
				<srcfiles dir="${libresource-note.dir}/src" />
			</uptodate>
		</not>
	</condition>
<equals arg1="${rebuilt-note}" arg2="true" />
<!-- libresource-note -->
	<target name="note" description="build the Libresource-Note module" if="rebuilt-note">
		<savant:dependency localcache="${components-jar.dir}">
			<savant:project name="Kernel" group="Libresource" dir="${base.dir}" target="kernel" />
			<savant:project name="Forum" group="Libresource" dir="${base.dir}" target="forum" />
			<savant:artifactgroup>
				<savant:artifact id="Kernel" group="Libresource" projectname="Kernel" name="${kernel.component-name}" version="${kernel.version}" type="jar" />
				<savant:artifact id="Forum" group="Libresource" projectname="Forum" name="${libresource-forum.component-name}" version="${libresource-forum.version}" type="jar" />
			</savant:artifactgroup>
		</savant:dependency>

<echo message="// Building Libresource Note" /> <antcall target="init" inheritall="true" inheritrefs="true" />

<savant:artifactcopy todir="${component.depends.thirdparty.dir}" localcache="${components-jar.dir}" flatten="true"> <savant:artifact id="Kernel" group="Libresource" projectname="Kernel" name="${kernel.component-name}" version="${kernel.version}" type="jar" /> <savant:artifact id="Forum" group="Libresource" projectname="Forum" name="${libresource-forum.component-name}" version="${libresource-forum.version}" type="jar" /> </savant:artifactcopy>

<property name="component.jar.name" value="${libresource-note.component-name}-${libresource-note.version}.jar" /> <property name="component.deployable.jar.name" value="${libresource-note.component-name}-${libresource-note.version}-deployable.jar" /> <property name="component.name" value="${libresource-note.component-name}" /> <property name="component.version" value="${libresource-note.version}" /> <mkdir dir="${component.depends.thirdparty.dir}" />

<copy todir="${component.src.dir}"> <fileset dir="${libresource-note.dir}/src"> <include name="**/*" /> </fileset> </copy>

<antcall target="genic" inheritall="yes" inheritRefs="true" /> <antcall target="ejb-jar" inheritall="yes" inheritRefs="true" /> <echo message="// Libresource Note is built !" />

<savant:publish from="${component.dist.dir}/${component.jar.name}" localcache="${components-jar.dir}"> <savant:artifact id="Note" group="Libresource" projectname="Note" name="${component.name}" version="${component.version}" type="jar" expireminutes="720" /> </savant:publish> <savant:publish from="${component.dist.dir}/${component.deployable.jar.name}" localcache="${components-jar.dir}"> <savant:artifact id="Note-deployable" group="Libresource" projectname="Note" name="${component.name}" version="${component.version}-deployable" type="jar" /> </savant:publish> </target>

...

That's all in the directory LS-Server

In Distribution :

  • I edit build.properties and add : services.note=yes
  • I edit build.xml and add :
<condition property="modules.wiki" value="<module><ejb>${libresource-note.component-name}-${libresource-noteversion}.jar</ejb></module>">
  			<equals arg1="${services.note}" arg2="yes" trim="yes" casesensitive="no"/>
  		</condition>
  		<condition property="modules.note" value="">
  			<not><equals arg1="${services.note}" arg2="yes" trim="yes" casesensitive="no"/></not>
  		</condition>
<filter token="LIBRESOURCE_NOTE_MODULE" value="${modules.note}"/>
  • I edit components.properties and add :
libresource-note.component-name=LibreSource-Note libresource-note.version=2.0
  • to finish I copy Src/LS-Client/Default-WebApp/WEB-INF/src/java/org/libresource/web/controllers/Wiki to Src/LS-Client/Default-WebApp/WEB-INF/src/java/org/libresource/web/controllers/note
posted by reya at Jan 14, 2008 3:30 PM