mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Fixed issues in pom file & enrollment
This commit is contained in:
parent
267d27745d
commit
3f0f4ffeae
@ -19,10 +19,10 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>org.wso2.cdmserver</groupId>
|
||||
<artifactId>wso2cdmserver-parent</artifactId>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>wso2cdm-parent</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../../../../pom.xml</relativePath>
|
||||
<relativePath>../../../../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@ -47,7 +47,7 @@
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>2.2</version>
|
||||
<configuration>
|
||||
<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
|
||||
<!--<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>-->
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
@ -72,7 +72,8 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<copy todir="${basedir}/../../../repository/deployment/server/webapps" overwrite="true">
|
||||
<copy todir="${basedir}/../../../repository/deployment/server/webapps"
|
||||
overwrite="true">
|
||||
<fileset dir="${basedir}/target">
|
||||
<include name="${project.artifactId}.war"/>
|
||||
</fileset>
|
||||
@ -109,62 +110,68 @@
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxws</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-transports-http</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
<version>${junit.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>jsr311-api</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>org.wso2.carbon.utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>org.wso2.carbon.device.mgt.common</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>org.wso2.carbon.device.mgt.core</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>org.wso2.carbon.logging</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxws</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-transports-http</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
<version>${junit.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>jsr311-api</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>org.wso2.carbon.utils</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>org.wso2.carbon.device.mgt.common</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>org.wso2.carbon.device.mgt.core</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
<artifactId>org.wso2.carbon.logging</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<cxf.version>2.6.1</cxf.version>
|
||||
<junit.version>4.8.2</junit.version>
|
||||
|
||||
@ -72,26 +72,30 @@ public class Enrollment {
|
||||
@Consumes("application/json")
|
||||
@Path("{id}")
|
||||
public Response modifyEnrollment(@PathParam("id") String id) {
|
||||
boolean status = false;
|
||||
CarbonContext context = CarbonContext.getThreadLocalCarbonContext();
|
||||
DeviceManagementService dmService = (DeviceManagementService) context.getOSGiService(DeviceManagementService.class,null);
|
||||
try {
|
||||
dmService.isRegistered(null);
|
||||
status = dmService.isRegistered(null);
|
||||
} catch (DeviceManagementException e) {
|
||||
e.printStackTrace();
|
||||
String msg = "Error occurred while modifying enrollment of the device";
|
||||
log.error(msg, e);
|
||||
}
|
||||
return Response.status(201).entity("Registration Successful").build();
|
||||
return Response.status(201).entity(status).build();
|
||||
}
|
||||
|
||||
@DELETE
|
||||
@Path("{id}")
|
||||
public Response disenrollDevice(@PathParam("id") String id) {
|
||||
boolean status = false;
|
||||
CarbonContext context = CarbonContext.getThreadLocalCarbonContext();
|
||||
DeviceManagementService dmService = (DeviceManagementService) context.getOSGiService(DeviceManagementService.class,null);
|
||||
try {
|
||||
dmService.isRegistered(null);
|
||||
status = dmService.isRegistered(null);
|
||||
} catch (DeviceManagementException e) {
|
||||
e.printStackTrace();
|
||||
String msg = "Error occurred while disenrolling the device";
|
||||
log.error(msg, e);
|
||||
}
|
||||
return Response.status(201).entity("Registration Successful").build();
|
||||
return Response.status(201).entity(status).build();
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,9 +104,9 @@
|
||||
<featureArtifactDef>
|
||||
org.wso2.carbon:org.wso2.carbon.ndatasource.feature:${carbon.kernel.version}
|
||||
</featureArtifactDef>
|
||||
<featureArtifactDef>
|
||||
org.wso2.carbon:org.wso2.carbon.device.mgt.server.feature:${project.version}
|
||||
</featureArtifactDef>
|
||||
<!--<featureArtifactDef>-->
|
||||
<!--org.wso2.carbon:org.wso2.carbon.device.mgt.server.feature:${project.version}-->
|
||||
<!--</featureArtifactDef>-->
|
||||
<featureArtifactDef>
|
||||
org.wso2.carbon:org.wso2.carbon.webapp.mgt.feature:${carbon.platform.version}
|
||||
</featureArtifactDef>
|
||||
@ -157,10 +157,10 @@
|
||||
<id>org.wso2.carbon.ndatasource.ui.feature.group</id>
|
||||
<version>${carbon.kernel.version}</version>
|
||||
</feature>
|
||||
<feature>
|
||||
<id>org.wso2.carbon.device.mgt.server.feature.group</id>
|
||||
<version>${project.version}</version>
|
||||
</feature>
|
||||
<!--<feature>-->
|
||||
<!--<id>org.wso2.carbon.device.mgt.server.feature.group</id>-->
|
||||
<!--<version>${project.version}</version>-->
|
||||
<!--</feature>-->
|
||||
<feature>
|
||||
<id>org.wso2.carbon.webapp.mgt.feature.group</id>
|
||||
<version>${carbon.platform.version}</version>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user