blob: faf72def782d779aa87907e59a1644a2bc369bb9 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--><mediawiki xmlns="http://www.mediawiki.org/xml/export-0.3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.3" xml:lang="en" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.3/ http://www.mediawiki.org/xml/export-0.3.xsd">
<siteinfo>
<sitename>NetBeans Wiki</sitename>
<base>http://wiki.netbeans.org/Main_Page</base>
<generator>MediaWiki 1.15.1</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2">Media</namespace>
<namespace key="-1">Special</namespace>
<namespace key="0"/>
<namespace key="1">Talk</namespace>
<namespace key="2">User</namespace>
<namespace key="3">User talk</namespace>
<namespace key="4">NetBeans Wiki</namespace>
<namespace key="5">NetBeans Wiki talk</namespace>
<namespace key="6">File</namespace>
<namespace key="7">File talk</namespace>
<namespace key="8">MediaWiki</namespace>
<namespace key="9">MediaWiki talk</namespace>
<namespace key="10">Template</namespace>
<namespace key="11">Template talk</namespace>
<namespace key="12">Help</namespace>
<namespace key="13">Help talk</namespace>
<namespace key="14">Category</namespace>
<namespace key="15">Category talk</namespace>
</namespaces>
</siteinfo>
<page>
<title>DevFaqVersionNumber</title>
<id>7508</id>
<revision>
<id>70068</id>
<timestamp>2017-02-01T14:34:50Z</timestamp>
<contributor>
<username>Javydreamercsw</username>
<id>2603</id>
</contributor>
<comment>Added other files that need to be filtered as well.</comment>
<text xml:space="preserve">__NOTOC__
===How do I set the version number?===
There are two ways to set the version number shown in the Help... About dialog.
* The easy way is to set the system property &lt;tt&gt;netbeans.buildnumber&lt;/tt&gt; to some value in your application.
* The harder way is to put this key/value &lt;tt&gt;currentVersion=My Product 1.2.3&lt;/tt&gt; into the file named &lt;tt&gt;"branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties"&lt;/tt&gt; below your suite, then rebuild and run.
* In NB 6.5 and later is the file location different: &lt;tt&gt;"branding/core/core.jar/org/netbeans/core/startup/Bundle.properties"&lt;/tt&gt;
===How do I set the version number automatically in maven-based applications?===
Within your branding-module use Maven placeholders in Bundle.properties and within the pom.xml filter the bundle by the maven-resources-plugin.
'''Note:''' Some of the files below are ignored by default in version control by Netbeans so you might need to add them to preserve the changes.
src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/Bundle.properties:
&lt;pre&gt;
currentVersion=My app ${project.version}
LBL_splash_window_title=Starting My app ${project.version}
&lt;/pre&gt;
src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties:
&lt;pre&gt;
CTL_MainWindow_Title=My app ${project.version}
CTL_MainWindow_Title_No_Project=My app ${project.version}
&lt;/pre&gt;
src/main/nbm-branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties:
&lt;pre&gt;
LBL_ProductInformation=My app ${project.version}
&lt;/pre&gt;
pom.xml:
&lt;pre&gt;
&lt;build&gt;
&lt;resources&gt;
&lt;resource&gt;
&lt;directory&gt;${basedir}/src/main/nbm-branding&lt;/directory&gt;
&lt;!-- f.e. allow replacing ${project.version} in all property files below src/main/nbm-branding --&gt;
&lt;includes&gt;
&lt;include&gt;**/*.properties&lt;/include&gt;
&lt;/includes&gt;
&lt;filtering&gt;true&lt;/filtering&gt;
&lt;targetPath&gt;${basedir}/target/filtered-nbm-branding&lt;/targetPath&gt;
&lt;/resource&gt;
&lt;/resources&gt;
&lt;plugins&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
&lt;artifactId&gt;nbm-maven-plugin&lt;/artifactId&gt;
&lt;configuration&gt;
&lt;!-- use previously filtered branding sources --&gt;
&lt;brandingSources&gt;${basedir}/target/filtered-nbm-branding&lt;/brandingSources&gt;
&lt;/configuration&gt;
&lt;/plugin&gt;
&lt;!-- ... --&gt;
&lt;/plugins&gt;
&lt;/build&gt;
&lt;/pre&gt;</text>
</revision>
</page>
</mediawiki>