|
118 | 118 | </execution> |
119 | 119 | </executions> |
120 | 120 | </plugin> |
121 | | - <!-- 打jar包 --> |
| 121 | + <!-- 打jar包 https://blog.csdn.net/mn960mn/article/details/51554152 --> |
| 122 | + <!-- lib目录中jar的存放规则,默认是${groupId}/${artifactId}的目录格式,flat表示直接把jar放到lib目录 --> |
| 123 | + |
122 | 124 | <plugin> |
123 | 125 | <groupId>org.codehaus.mojo</groupId> |
124 | 126 | <artifactId>appassembler-maven-plugin</artifactId> |
|
133 | 135 | </execution> |
134 | 136 | </executions> |
135 | 137 | <configuration> |
136 | | - <assembleDirectory>${project.build.directory}/</assembleDirectory> |
| 138 | + <assembleDirectory>${project.build.directory}/nbs</assembleDirectory> |
137 | 139 | <repositoryLayout>flat</repositoryLayout> |
| 140 | + <repositoryName>lib</repositoryName> |
| 141 | + <binFolder>bin</binFolder> |
| 142 | + <configurationDirectory>conf</configurationDirectory> |
138 | 143 | <configurationSourceDirectory>src/main/resources</configurationSourceDirectory> |
139 | | - <configurationSourceDirectory>config</configurationSourceDirectory> |
140 | 144 | <configurationDirectory>true</configurationDirectory> |
| 145 | + |
141 | 146 | <includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath> |
| 147 | + <encoding>UTF-8</encoding> |
| 148 | + <logsDirectory>logs</logsDirectory> |
| 149 | + <tempDirectory>tmp</tempDirectory> |
142 | 150 | <extraJvmArguments>-Xms256m</extraJvmArguments> |
143 | 151 | <binFileExtensions><unix>.sh</unix></binFileExtensions> |
144 | 152 | <platforms> |
|
152 | 160 | <name>nbs-client4j</name> |
153 | 161 | <jvmSettings> |
154 | 162 | <extraArguments> |
| 163 | + <extraArgument>-Dfile.encoding=utf-8</extraArgument> |
155 | 164 | <extraArgument>-server</extraArgument> |
156 | 165 | <extraArgument>-Xms256m</extraArgument> |
157 | 166 | </extraArguments> |
158 | 167 | </jvmSettings> |
159 | 168 | </program> |
160 | 169 | </programs> |
161 | 170 | </configuration> |
| 171 | + |
162 | 172 | </plugin> |
163 | 173 |
|
| 174 | + <!-- <plugin> |
| 175 | + <groupId>org.codehaus.mojo</groupId> |
| 176 | + <artifactId>appassembler-maven-plugin</artifactId> |
| 177 | + <version>2.0.0</version> |
| 178 | + <configuration> |
| 179 | + <!– 根目录 –> |
| 180 | + <assembleDirectory>${project.build.directory}/nbs</assembleDirectory> |
| 181 | + <!– 打包的jar,以及maven依赖的jar放到这个目录里面 –> |
| 182 | + <repositoryName>lib</repositoryName> |
| 183 | + <!– 可执行脚本的目录 –> |
| 184 | + <binFolder>bin</binFolder> |
| 185 | + <!– 配置文件的目标目录 –> |
| 186 | + <configurationDirectory>conf</configurationDirectory> |
| 187 | + <!– 拷贝配置文件到上面的目录中 –> |
| 188 | + <copyConfigurationDirectory>true</copyConfigurationDirectory> |
| 189 | + <!– 从哪里拷贝配置文件 (默认src/main/config) –> |
| 190 | + <configurationSourceDirectory>src/main/resources</configurationSourceDirectory> |
| 191 | + <!– lib目录中jar的存放规则,默认是${groupId}/${artifactId}的目录格式,flat表示直接把jar放到lib目录 –> |
| 192 | + <repositoryLayout>flat</repositoryLayout> |
| 193 | + <encoding>UTF-8</encoding> |
| 194 | + <logsDirectory>logs</logsDirectory> |
| 195 | + <tempDirectory>tmp</tempDirectory> |
| 196 | + <daemons> |
| 197 | + <daemon> |
| 198 | + <id>nbs</id> |
| 199 | + <mainClass>UI.AppMainWindow</mainClass> |
| 200 | + <platforms> |
| 201 | + <platform>jsw</platform> |
| 202 | + </platforms> |
| 203 | + <generatorConfigurations> |
| 204 | + <generatorConfiguration> |
| 205 | + <generator>jsw</generator> |
| 206 | + <includes> |
| 207 | + <include>linux-x86-32</include> |
| 208 | + <include>linux-x86-64</include> |
| 209 | + <include>windows-x86-32</include> |
| 210 | + <include>windows-x86-64</include> |
| 211 | + </includes> |
| 212 | + <configuration> |
| 213 | + <property> |
| 214 | + <name>configuration.directory.in.classpath.first</name> |
| 215 | + <value>conf</value> |
| 216 | + </property> |
| 217 | + <property> |
| 218 | + <name>wrapper.ping.timeout</name> |
| 219 | + <value>120</value> |
| 220 | + </property> |
| 221 | + <property> |
| 222 | + <name>set.default.REPO_DIR</name> |
| 223 | + <value>lib</value> |
| 224 | + </property> |
| 225 | + <property> |
| 226 | + <name>wrapper.logfile</name> |
| 227 | + <value>logs/wrapper.log</value> |
| 228 | + </property> |
| 229 | + </configuration> |
| 230 | + </generatorConfiguration> |
| 231 | + </generatorConfigurations> |
| 232 | + <jvmSettings> |
| 233 | + <!– jvm参数 –> |
| 234 | + <systemProperties> |
| 235 | + <systemProperty>com.sun.management.jmxremote</systemProperty> |
| 236 | + <systemProperty>com.sun.management.jmxremote.port=1984</systemProperty> |
| 237 | + <systemProperty>com.sun.management.jmxremote.authenticate=false</systemProperty> |
| 238 | + <systemProperty>com.sun.management.jmxremote.ssl=false</systemProperty> |
| 239 | + </systemProperties> |
| 240 | + </jvmSettings> |
| 241 | + </daemon> |
| 242 | + </daemons> |
| 243 | + </configuration> |
| 244 | + </plugin> |
| 245 | + <!– package end –> |
164 | 246 | <plugin> |
165 | 247 | <groupId>org.apache.maven.plugins</groupId> |
166 | 248 | <artifactId>maven-dependency-plugin</artifactId> |
|
172 | 254 | <goal>copy-dependencies</goal> |
173 | 255 | </goals> |
174 | 256 | <configuration> |
175 | | - <!--<!– ${project.build.directory} 构建目录,缺省为target –> --> |
| 257 | + <!–<!– ${project.build.directory} 构建目录,缺省为target –> –> |
176 | 258 | <outputDirectory> |
177 | 259 | ${project.build.directory}/lib |
178 | 260 | </outputDirectory> |
179 | 261 | </configuration> |
180 | 262 | </execution> |
181 | 263 | </executions> |
182 | | - </plugin> |
| 264 | + </plugin>--> |
183 | 265 |
|
184 | 266 | <!-- The configuration of maven-assembly-plugin --> |
185 | 267 | <!-- <plugin> |
|
0 commit comments