git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Tue, 13 Feb 2018 23:28:27 +0000 (23:28 +0000)
committerVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Tue, 13 Feb 2018 23:28:27 +0000 (23:28 +0000)
server/-configuration/deploy-bkup-mediacube-plugins.launch [new file with mode: 0644]
server/-product/pom.xml
server/user.jobengine.osgi.services/echo.bat [new file with mode: 0644]
server/user.jobengine.osgi.services/pom.xml
server/user.jobengine.osgi.services/src/user/jobengine/osgi/rest/jobengine/JobengineService.java

diff --git a/server/-configuration/deploy-bkup-mediacube-plugins.launch b/server/-configuration/deploy-bkup-mediacube-plugins.launch
new file mode 100644 (file)
index 0000000..664347a
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">\r
+<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>\r
+<stringAttribute key="M2_GOALS" value="clean deploy -Dremote.address=scp://root:password@10.10.1.29 -Dremote.location=/opt/test-mediacube -P plugins"/>\r
+<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>\r
+<booleanAttribute key="M2_OFFLINE" value="false"/>\r
+<stringAttribute key="M2_PROFILES" value=""/>\r
+<listAttribute key="M2_PROPERTIES"/>\r
+<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>\r
+<booleanAttribute key="M2_SKIP_TESTS" value="false"/>\r
+<intAttribute key="M2_THREADS" value="1"/>\r
+<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>\r
+<stringAttribute key="M2_USER_SETTINGS" value=""/>\r
+<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>\r
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">\r
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>\r
+</listAttribute>\r
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}/-modules"/>\r
+</launchConfiguration>\r
index 35d233073ebc2b2b017a6c61aa5d6adc4a402553..86ba36fbde69b34d170de0d8fa484cdc0bc192a7 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"\r
-       xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
        <modelVersion>4.0.0</modelVersion>\r
        <parent>\r
                <relativePath>../-modules</relativePath>\r
                                                        <goal>materialize-products</goal>\r
                                                </goals>\r
                                        </execution>\r
-<!--                                   <execution> -->\r
-<!--                                           <id>archive-products</id> -->\r
-<!--                                           <goals> -->\r
-<!--                                                   <goal>archive-products</goal> -->\r
-<!--                                           </goals> -->\r
-<!--                                   </execution> -->\r
+                                       <!-- <execution> -->\r
+                                       <!-- <id>archive-products</id> -->\r
+                                       <!-- <goals> -->\r
+                                       <!-- <goal>archive-products</goal> -->\r
+                                       <!-- </goals> -->\r
+                                       <!-- </execution> -->\r
                                </executions>\r
                        </plugin>\r
                        <plugin>\r
                                                        </resources>\r
                                                </configuration>\r
                                        </execution>\r
-                                       \r
-                               </executions>\r
-                       </plugin>\r
-                       <plugin>\r
-                               <groupId>org.codehaus.mojo</groupId>\r
-                               <artifactId>exec-maven-plugin</artifactId>\r
-                               <version>1.5.0</version>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>remote-deploy</id>\r
-                                               <phase>deploy</phase>\r
-                                               <goals>\r
-                                                       <goal>exec</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <workingDirectory>${project.build.directory}</workingDirectory>\r
-                                                       <executable>winscp.com</executable>\r
-                                                       <arguments>\r
-                                                               <argument>/command</argument>\r
-                                                               <argument>"echo STARTING DEPLOY TO: ${remote.address}"</argument>\r
-                                                               <argument>"open ${remote.address} -hostkey=""${remote.hostkey}"""</argument>\r
-<!--                                                           <argument>"call pcs resource disable mediacube_script"</argument> -->\r
-<!--                                                           <argument>"call sleep 5"</argument> -->\r
-                                                               <argument>"call rm -rf ${remote.location}"</argument>\r
-                                                               <argument>"call mkdir ${remote.location}"</argument>\r
-                                                               <argument>"lcd ${local.location}"</argument>\r
-                                                               <argument>"cd ${remote.location}"</argument>\r
-                                                               <argument>"synchronize remote"</argument>\r
-                                                               <argument>"mkdir log"</argument>\r
-                                                               <argument>"call chmod +x mediacube"</argument>\r
-                                                               <argument>"call chmod +x start-mediacube.sh"</argument>\r
-                                                               <argument>"call chmod +x stop-mediacube.sh"</argument>\r
-<!--                                                           <argument>"call pcs resource enable mediacube_script"</argument> -->\r
-                                                               <argument>"exit"</argument>\r
-                                                       </arguments>\r
-                                               </configuration>\r
-                                       </execution>\r
+\r
                                </executions>\r
                        </plugin>\r
 \r
                </plugins>\r
        </build>\r
+\r
+       <profiles>\r
+               <profile>\r
+                       <id>full</id>\r
+                       <build>\r
+                               <plugins>\r
+                                       <plugin>\r
+                                               <groupId>org.codehaus.mojo</groupId>\r
+                                               <artifactId>exec-maven-plugin</artifactId>\r
+                                               <version>1.5.0</version>\r
+                                               <executions>\r
+                                                       <execution>\r
+                                                               <id>remote-deploy</id>\r
+                                                               <phase>deploy</phase>\r
+                                                               <goals>\r
+                                                                       <goal>exec</goal>\r
+                                                               </goals>\r
+                                                               <configuration>\r
+                                                                       <workingDirectory>${project.build.directory}</workingDirectory>\r
+                                                                       <executable>winscp.com</executable>\r
+                                                                       <arguments>\r
+                                                                               <argument>/command</argument>\r
+                                                                               <argument>"echo STARTING DEPLOY TO: ${remote.address}"</argument>\r
+                                                                               <argument>"open ${remote.address} -hostkey=""${remote.hostkey}"""</argument>\r
+                                                                               <argument>"call rm -rf ${remote.location}"</argument>\r
+                                                                               <argument>"call mkdir ${remote.location}"</argument>\r
+                                                                               <argument>"lcd ${local.location}"</argument>\r
+                                                                               <argument>"cd ${remote.location}"</argument>\r
+                                                                               <argument>"synchronize remote"</argument>\r
+                                                                               <argument>"mkdir log"</argument>\r
+                                                                               <argument>"mkdir tmp"</argument>\r
+                                                                               <argument>"call chmod +w tmp"</argument>\r
+                                                                               <argument>"call chmod +x mediacube"</argument>\r
+                                                                               <argument>"call chmod +x start-mediacube.sh"</argument>\r
+                                                                               <argument>"call chmod +x stop-mediacube.sh"</argument>\r
+                                                                               <argument>"exit"</argument>\r
+                                                                       </arguments>\r
+                                                               </configuration>\r
+                                                       </execution>\r
+                                               </executions>\r
+                                       </plugin>\r
+                               </plugins>\r
+                       </build>\r
+               </profile>\r
+               <profile>\r
+                       <id>plugins</id>\r
+                       <build>\r
+                               <plugins>\r
+                                       <plugin>\r
+                                               <groupId>org.codehaus.mojo</groupId>\r
+                                               <artifactId>exec-maven-plugin</artifactId>\r
+                                               <version>1.5.0</version>\r
+                                               <executions>\r
+                                                       <execution>\r
+                                                               <id>remote-deploy</id>\r
+                                                               <phase>deploy</phase>\r
+                                                               <goals>\r
+                                                                       <goal>exec</goal>\r
+                                                               </goals>\r
+                                                               <configuration>\r
+                                                                       <workingDirectory>${project.build.directory}</workingDirectory>\r
+                                                                       <executable>winscp.com</executable>\r
+                                                                       <arguments>\r
+                                                                               <argument>/command</argument>\r
+                                                                               <argument>"echo STARTING DEPLOY TO: ${remote.address}"</argument>\r
+                                                                               <argument>"open ${remote.address} -hostkey=""${remote.hostkey}"""</argument>\r
+                                                                               <argument>"lcd ${local.location}/plugins"</argument>\r
+                                                                               <argument>"cd ${remote.location}/plugins"</argument>\r
+                                                                               <argument>"synchronize remote"</argument>\r
+                                                                               <argument>"exit"</argument>\r
+                                                                       </arguments>\r
+                                                               </configuration>\r
+                                                       </execution>\r
+                                               </executions>\r
+                                       </plugin>\r
+                               </plugins>\r
+                       </build>\r
+\r
+               </profile>\r
+       </profiles>\r
        <properties>\r
                <local.location>${project.build.directory}/products/MediaCube/linux/gtk/x86_64</local.location>\r
        </properties>\r
diff --git a/server/user.jobengine.osgi.services/echo.bat b/server/user.jobengine.osgi.services/echo.bat
new file mode 100644 (file)
index 0000000..cf91379
--- /dev/null
@@ -0,0 +1 @@
+echo %1
\ No newline at end of file
index 7c73ea01916a8d5bb7ff01d598064896aa24b498..787546d85dbc9fe427d39fab393550d59826a8ed 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
-<project\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"\r
-       xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"\r
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
        <parent>\r
                <relativePath>../-modules</relativePath>\r
                <groupId>user.jobengine</groupId>\r
        <artifactId>user.jobengine.osgi.services</artifactId>\r
        <packaging>eclipse-plugin</packaging>\r
        <version>1.0.0</version>\r
+       <profiles>\r
+               <profile>\r
+                       <id>profile-1</id>\r
+\r
+                       <build>\r
+                               <plugins>\r
+                                       <plugin>\r
+                                               <groupId>org.codehaus.mojo</groupId>\r
+                                               <artifactId>exec-maven-plugin</artifactId>\r
+                                               <version>1.5.0</version>\r
+                                               <executions>\r
+                                                       <execution>\r
+                                                               <id>install</id>\r
+                                                               <phase>install</phase>\r
+                                                               <goals>\r
+                                                                       <goal>exec</goal>\r
+                                                               </goals>\r
+                                                               <configuration>\r
+                                                                       <executable>echo</executable>\r
+                                                                       <arguments>\r
+                                                                               <argument>xxx</argument>\r
+                                                                       </arguments>\r
+                                                               </configuration>\r
+                                                       </execution>\r
+                                               </executions>\r
+                                       </plugin>\r
+\r
+                               </plugins>\r
+                       </build>\r
+\r
+               </profile>\r
+       </profiles>\r
+\r
+       <build>\r
+               <plugins>\r
+                       <plugin>\r
+                               <groupId>org.codehaus.mojo</groupId>\r
+                               <artifactId>exec-maven-plugin</artifactId>\r
+                               <version>1.5.0</version>\r
+                               <executions>\r
+                                       <execution>\r
+                                               <id>install</id>\r
+                                               <phase>install</phase>\r
+                                               <goals>\r
+                                                       <goal>exec</goal>\r
+                                               </goals>\r
+                                               <configuration>\r
+                                                       <executable>echo</executable>\r
+                                                       <arguments>\r
+                                                               <argument>yyy</argument>\r
+                                                       </arguments>\r
+                                               </configuration>\r
+                                       </execution>\r
+                               </executions>\r
+                       </plugin>\r
+\r
+               </plugins>\r
+       </build>\r
+\r
 </project>
\ No newline at end of file
index c2a9811311eaa69ccb2be5a5e601eb06f9dfbbe3..edd1fc5a3439e88f389e2fd091e2b8ce9a322d19 100644 (file)
@@ -31,6 +31,20 @@ public class JobengineService {
                //logger.info("Created");\r
        }\r
 \r
+       @GET\r
+       @Path("/check")\r
+       @Consumes({ MediaType.APPLICATION_JSON })\r
+       @Produces({ MediaType.APPLICATION_JSON })\r
+       public Response check() {\r
+               Response result = null;\r
+               try {\r
+                       result = Response.ok().build();\r
+               } catch (Exception e) {\r
+                       result = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();\r
+               }\r
+               return result;\r
+       }\r
+\r
        @POST\r
        @Path("/create")\r
        @Consumes({ MediaType.APPLICATION_JSON })\r