enable deploy calls
This commit is contained in:
@@ -13,6 +13,7 @@ import org.codehaus.plexus.component.annotations.Component;
|
|||||||
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
||||||
|
|
||||||
import com.inteligr8.alfresco.activiti.ApsPublicRestApiJerseyImpl;
|
import com.inteligr8.alfresco.activiti.ApsPublicRestApiJerseyImpl;
|
||||||
|
import com.inteligr8.alfresco.activiti.model.AppDefinitionUpdateResultRepresentation;
|
||||||
|
|
||||||
@Mojo( name = "deploy-app", threadSafe = true )
|
@Mojo( name = "deploy-app", threadSafe = true )
|
||||||
@Component( role = org.apache.maven.plugin.Mojo.class )
|
@Component( role = org.apache.maven.plugin.Mojo.class )
|
||||||
@@ -76,22 +77,22 @@ public class DeployAppGoal extends ApsAppAccessibleGoal {
|
|||||||
if (appId == null) {
|
if (appId == null) {
|
||||||
if (this.publish) {
|
if (this.publish) {
|
||||||
this.getLog().info("Uploading & publishing new APS App: " + this.apsAppName);
|
this.getLog().info("Uploading & publishing new APS App: " + this.apsAppName);
|
||||||
// AppDefinitionUpdateResultRepresentation appDefUpdate = api.getAppDefinitionsJerseyApi().publishApp(bistream, cdisposition);
|
AppDefinitionUpdateResultRepresentation appDefUpdate = api.getAppDefinitionsJerseyApi().publishApp(bistream, cdisposition);
|
||||||
// if (Boolean.TRUE.equals(appDefUpdate.getError()))
|
if (Boolean.TRUE.equals(appDefUpdate.getError()))
|
||||||
// throw new MojoExecutionException(appDefUpdate.getErrorDescription());
|
throw new MojoExecutionException(appDefUpdate.getErrorDescription());
|
||||||
} else {
|
} else {
|
||||||
this.getLog().info("Uploading new APS App: " + this.apsAppName);
|
this.getLog().info("Uploading new APS App: " + this.apsAppName);
|
||||||
// api.getAppDefinitionsJerseyApi().import_(bistream, cdisposition);
|
api.getAppDefinitionsJerseyApi().import_(bistream, cdisposition);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.publish) {
|
if (this.publish) {
|
||||||
this.getLog().info("Uploading, versioning, & publishing APS App: " + this.apsAppName);
|
this.getLog().info("Uploading, versioning, & publishing APS App: " + this.apsAppName);
|
||||||
// AppDefinitionUpdateResultRepresentation appDefUpdate = api.getAppDefinitionsJerseyApi().publishApp(appId, bistream, cdisposition);
|
AppDefinitionUpdateResultRepresentation appDefUpdate = api.getAppDefinitionsJerseyApi().publishApp(appId, bistream, cdisposition);
|
||||||
// if (Boolean.TRUE.equals(appDefUpdate.getError()))
|
if (Boolean.TRUE.equals(appDefUpdate.getError()))
|
||||||
// throw new MojoExecutionException(appDefUpdate.getErrorDescription());
|
throw new MojoExecutionException(appDefUpdate.getErrorDescription());
|
||||||
} else {
|
} else {
|
||||||
this.getLog().info("Uploading & versioning APS App: " + this.apsAppName);
|
this.getLog().info("Uploading & versioning APS App: " + this.apsAppName);
|
||||||
// api.getAppDefinitionsJerseyApi().import_(appId, bistream, cdisposition);
|
api.getAppDefinitionsJerseyApi().import_(appId, bistream, cdisposition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
Reference in New Issue
Block a user