Skip to content

Commit 05ccd15

Browse files
committed
try to get yajsw working
1 parent f5192c8 commit 05ccd15

File tree

412 files changed

+1042
-58194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

412 files changed

+1042
-58194
lines changed

modctrl-app/nbactions.xml

+26-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,33 @@
88
</goals>
99
<properties>
1010
<exec.classpathScope>runtime</exec.classpathScope>
11-
<exec.args>-classpath %classpath modbus.control.EmbeddedJettyService</exec.args>
11+
<exec.args>-classpath %classpath modbus.control.EmbeddedJetty</exec.args>
1212
<exec.executable>java</exec.executable>
1313
</properties>
1414
</action>
15+
<action>
16+
<actionName>debug</actionName>
17+
<goals>
18+
<goal>process-classes</goal>
19+
<goal>org.codehaus.mojo:exec-maven-plugin:1.2:exec</goal>
20+
</goals>
21+
<properties>
22+
<exec.classpathScope>runtime</exec.classpathScope>
23+
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath modbus.control.EmbeddedJetty</exec.args>
24+
<jpda.listen>true</jpda.listen>
25+
<exec.executable>java</exec.executable>
26+
</properties>
27+
</action>
28+
<action>
29+
<actionName>profile</actionName>
30+
<goals>
31+
<goal>process-classes</goal>
32+
<goal>org.codehaus.mojo:exec-maven-plugin:1.1.1:exec</goal>
33+
</goals>
34+
<properties>
35+
<exec.args>${profiler.args} -classpath %classpath modbus.control.EmbeddedJetty</exec.args>
36+
<profiler.action>profile</profiler.action>
37+
<exec.executable>${profiler.java}</exec.executable>
38+
</properties>
39+
</action>
1540
</actions>

modctrl-app/pom.xml

+13-11
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
<dependency>
9191
<groupId>junit</groupId>
9292
<artifactId>junit</artifactId>
93-
<version>3.8.1</version>
9493
<scope>test</scope>
9594
</dependency>
9695
<dependency>
@@ -139,11 +138,6 @@
139138
<version>${jna.version}</version>
140139
<classifier>platform</classifier>
141140
</dependency>
142-
<dependency>
143-
<groupId>commons-vfs</groupId>
144-
<artifactId>commons-vfs</artifactId>
145-
<version>20050307052300</version>
146-
</dependency>
147141
<dependency>
148142
<groupId>org.apache.velocity</groupId>
149143
<artifactId>velocity</artifactId>
@@ -159,6 +153,11 @@
159153
<artifactId>forms</artifactId>
160154
<version>1.2.1</version>
161155
</dependency>
156+
<dependency>
157+
<groupId>org.apache.commons</groupId>
158+
<artifactId>commons-vfs2</artifactId>
159+
<version>2.0</version>
160+
</dependency>
162161
</dependencies>
163162

164163

@@ -247,34 +246,37 @@
247246
<fileset dir="${basedir}/src/izpack" />
248247
</copy>
249248
<copy todir="${staging.dir}">
250-
<fileset dir="${basedir}/target/appassembler/jsw" />
249+
<fileset dir="${project.build.directory}/appassembler/jsw" />
251250
</copy>
252251
<copy file="${basedir}/../modctrl-webapp/target/modctrl-webapp-0.0.1-SNAPSHOT.war" todir="${staging.dir}/ModbusControl/lib"/>
252+
<!-- Dependencies of yajsw without maven repo -->
253+
<copy todir="${project.build.directory}/dependency">
254+
<fileset dir="${basedir}/lib" />
255+
</copy>
253256
</tasks>
254257
</configuration>
255258
</execution>
256259
</executions>
257260
</plugin>
258-
<!-- prepare dependencies so that izpack jar tag to pickup at compile time
261+
<!-- prepare dependencies so that izpack jar tag to pickup at compile time -->
259262
<plugin>
260263
<groupId>org.apache.maven.plugins</groupId>
261264
<artifactId>maven-dependency-plugin</artifactId>
262265
<version>2.0</version>
263266
<executions>
264267
<execution>
265-
<id>standard-installer</id>
266268
<phase>process-resources</phase>
267269
<goals>
268270
<goal>copy-dependencies</goal>
269271
</goals>
270272
<configuration>
271273
<stripVersion>true</stripVersion>
272274
<excludeGroupIds>org.codehaus.izpack</excludeGroupIds>
273-
<outputDirectory>${staging.dir}/dependency</outputDirectory>
275+
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
274276
</configuration>
275277
</execution>
276278
</executions>
277-
</plugin> -->
279+
</plugin>
278280

279281
<!-- see install.xml to see how MyHelloPanel is used -->
280282
<plugin>

modctrl-app/src/main/java/modbus/control/service/WrapperMainServiceWin.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
package modbus.control.service;
1212

1313
import java.io.File;
14-
import java.util.HashMap;
15-
import java.util.Map;
1614
import java.util.concurrent.ExecutorService;
1715
import java.util.concurrent.Executors;
1816
import java.util.concurrent.Future;
@@ -57,13 +55,13 @@ public WrapperMainServiceWin() {
5755
* the arguments
5856
*/
5957
public static void main(String[] args) {
60-
System.setProperty("wrapper.java.app.mainclass", "modbus.control.EmbeddedJetty"); // system properties overwrite properties in conf file.
58+
System.setProperty("wrapper.config", System.getProperty("user.dir") + "\\src\\main\\resources\\wrapper.conf");
6159

6260
String wrapperJar = WrapperLoader.getWrapperJar();
6361
// set home dir of the service to the wrapper jar parent, so that we may find required libs
6462
String homeDir = new File(wrapperJar).getParent();
65-
OperatingSystem.instance().setWorkingDir(homeDir);
66-
YajswConfigurationImpl _config = new YajswConfigurationImpl(false);
63+
OperatingSystem.instance().setWorkingDir(System.getProperty("user.dir") + "\\target\\dependency");
64+
YajswConfigurationImpl _config = new YajswConfigurationImpl(true);
6765

6866
service = new WrapperMainServiceWin();
6967
// set service shutdown timeout
@@ -95,6 +93,8 @@ public static void main(String[] args) {
9593
// global configuration
9694

9795
WrappedProcess wp = WrappedProcessFactory.createProcess((YajswConfiguration)_config);
96+
97+
9898
// set service in wrapper so that we may stop the service in case the application terminates and we need to shutdown the wrapper
9999
wp.setService(service);
100100
wp.init();

0 commit comments

Comments
 (0)