4.0.0 IA_PACKAGE IA_CLASS_NAME war 1.0-SNAPSHOT Implementation Artifact IA_CLASS_NAME 2471.de http://2471.de/maven2 9090 IA_ARTIFACT_TEMPLATE_UPLOAD_URL UTF-8 2.7.6 0.1.6 org.eclipse.winery org.eclipse.winery.highlevelrestapi ${highlevelrestapi.version} junit junit 4.5 test org.springframework spring-web 3.0.7.RELEASE org.springframework spring-context 3.0.7.RELEASE org.apache.cxf cxf-rt-frontend-jaxws ${cxf.version} org.apache.cxf cxf-rt-frontend-simple ${cxf.version} org.apache.cxf cxf-rt-transports-http ${cxf.version} IA_CLASS_NAME maven-compiler-plugin 3.0 1.6 1.6 org.apache.maven.plugins maven-eclipse-plugin 2.9 false true org.apache.cxf cxf-java2ws-plugin ${cxf.version} org.apache.cxf cxf-rt-frontend-jaxws ${cxf.version} org.apache.cxf cxf-rt-frontend-simple ${cxf.version} process-classes process-classes IA_PACKAGE.IA_CLASS_NAME ${basedir}/src/main/webapp/wsdl/IA_CLASS_NAME.wsdl true true java2ws org.apache.maven.plugins maven-war-plugin 2.3 src/main/webapp/WEB-INF/web.xml org.codehaus.gmaven gmaven-plugin 1.4 org.codehaus.gmaven.runtime gmaven-runtime-1.7 1.2 org.apache.httpcomponents httpmime 4.2.1 org.apache.httpcomponents httpcore 4.2.1 org.apache.httpcomponents httpclient 4.2.1 upload2winery deploy execute 1.7 import org.apache.http.impl.client.DefaultHttpClient import org.apache.http.client.methods.HttpPost import org.apache.http.entity.mime.MultipartEntity import org.apache.http.entity.mime.content.FileBody // Get WAR file def name = "target/${project.build.finalName}.war" println "Archive file: $name" def f = new File(name) // POST file DefaultHttpClient httpclient = new DefaultHttpClient() println "Upload URL: ${winery.upload.url}" def post = new HttpPost("${winery.upload.url}") def entity = new MultipartEntity() def fileBody = new FileBody(f) entity.addPart("files[]", fileBody) post.setEntity(entity) // Process response def response = httpclient.execute(post) def status = response.getStatusLine() if( !(status ==~ /.*Created.*/) ) fail("IA upload to Winery FAILED, please upload manually. (HTTP status code: $status)" ) else println "IA upload finished sucessfully (HTTP status code $status)" org.apache.tomcat.maven tomcat7-maven-plugin 2.1 ${run.HttpPort} / false org.apache.maven.plugins maven-install-plugin default-install none org.apache.maven.plugins maven-deploy-plugin default-deploy none