| <?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 <tt>netbeans.buildnumber</tt> to some value in your application. |
| * The harder way is to put this key/value <tt>currentVersion=My Product 1.2.3</tt> into the file named <tt>"branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties"</tt> below your suite, then rebuild and run. |
| * In NB 6.5 and later is the file location different: <tt>"branding/core/core.jar/org/netbeans/core/startup/Bundle.properties"</tt> |
| |
| |
| ===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: |
| <pre> |
| currentVersion=My app ${project.version} |
| LBL_splash_window_title=Starting My app ${project.version} |
| </pre> |
| |
| src/main/nbm-branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties: |
| <pre> |
| CTL_MainWindow_Title=My app ${project.version} |
| CTL_MainWindow_Title_No_Project=My app ${project.version} |
| </pre> |
| |
| src/main/nbm-branding/modules/org-netbeans-core.jar/org/netbeans/core/ui/Bundle.properties: |
| <pre> |
| LBL_ProductInformation=My app ${project.version} |
| </pre> |
| |
| |
| pom.xml: |
| <pre> |
| <build> |
| <resources> |
| <resource> |
| <directory>${basedir}/src/main/nbm-branding</directory> |
| <!-- f.e. allow replacing ${project.version} in all property files below src/main/nbm-branding --> |
| <includes> |
| <include>**/*.properties</include> |
| </includes> |
| <filtering>true</filtering> |
| <targetPath>${basedir}/target/filtered-nbm-branding</targetPath> |
| </resource> |
| </resources> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>nbm-maven-plugin</artifactId> |
| <configuration> |
| <!-- use previously filtered branding sources --> |
| <brandingSources>${basedir}/target/filtered-nbm-branding</brandingSources> |
| </configuration> |
| </plugin> |
| <!-- ... --> |
| </plugins> |
| </build> |
| </pre></text> |
| </revision> |
| </page> |
| </mediawiki> |