Author: veithen
Date: Fri Dec 22 13:39:25 2017
New Revision: 1819039

URL: http://svn.apache.org/viewvc?rev=1819039&view=rev
Log:
Add an option to axis2-repo-maven-plugin to override the scope attribute of 
deployed services.

Modified:
    axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/pom.xml
    
axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/src/test/java/org/apache/axis2/jaxbri/identityservice/IdentityServiceTest.java
    
axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/src/test/java/org/apache/axis2/jaxbri/mtom/MtomTest.java
    axis/axis2/java/core/trunk/modules/jibx/pom.xml
    
axis/axis2/java/core/trunk/modules/jibx/src/test/java/org/apache/axis2/jibx/library/unwrapped/LibraryTest.java
    
axis/axis2/java/core/trunk/modules/jibx/src/test/java/org/apache/axis2/jibx/library/wrapped/LibraryTest.java
    
axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/AbstractCreateRepositoryMojo.java
    
axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/ServiceDescription.java

Modified: axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/pom.xml?rev=1819039&r1=1819038&r2=1819039&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/pom.xml (original)
+++ axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/pom.xml Fri Dec 
22 13:39:25 2017
@@ -251,6 +251,7 @@
                             <serviceDescriptions>
                                 <serviceDescription>
                                     
<directory>${project.build.directory}/gen/identityservice/resources</directory>
+                                    <scope>application</scope>
                                     <parameters>
                                         <parameter>
                                             <name>ServiceClass</name>
@@ -271,6 +272,7 @@
                             <serviceDescriptions>
                                 <serviceDescription>
                                     
<directory>${project.build.directory}/gen/mtom/resources</directory>
+                                    <scope>application</scope>
                                     <parameters>
                                         <parameter>
                                             <name>ServiceClass</name>

Modified: 
axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/src/test/java/org/apache/axis2/jaxbri/identityservice/IdentityServiceTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/src/test/java/org/apache/axis2/jaxbri/identityservice/IdentityServiceTest.java?rev=1819039&r1=1819038&r2=1819039&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/src/test/java/org/apache/axis2/jaxbri/identityservice/IdentityServiceTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/src/test/java/org/apache/axis2/jaxbri/identityservice/IdentityServiceTest.java
 Fri Dec 22 13:39:25 2017
@@ -18,9 +18,6 @@
  */
 package org.apache.axis2.jaxbri.identityservice;
 
-import org.apache.axis2.Constants;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.testutils.UtilServer;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -35,9 +32,6 @@ public class IdentityServiceTest {
     @BeforeClass
     public static void startServer() throws Exception {
         UtilServer.start(System.getProperty("basedir", ".") + 
"/target/repo/identityservice");
-        AxisConfiguration axisConfiguration = 
UtilServer.getConfigurationContext().getAxisConfiguration();
-        AxisService service = 
axisConfiguration.getService("IdentityLinkingService");
-        service.setScope(Constants.SCOPE_APPLICATION);
     }
     
     @AfterClass

Modified: 
axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/src/test/java/org/apache/axis2/jaxbri/mtom/MtomTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/src/test/java/org/apache/axis2/jaxbri/mtom/MtomTest.java?rev=1819039&r1=1819038&r2=1819039&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/src/test/java/org/apache/axis2/jaxbri/mtom/MtomTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/databinding-tests/jaxbri-tests/src/test/java/org/apache/axis2/jaxbri/mtom/MtomTest.java
 Fri Dec 22 13:39:25 2017
@@ -24,7 +24,6 @@ import javax.activation.DataSource;
 import org.apache.axiom.testutils.activation.RandomDataSource;
 import org.apache.axiom.testutils.io.IOTestUtils;
 import org.apache.axis2.Constants;
-import org.apache.axis2.description.AxisService;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.testutils.UtilServer;
 import org.junit.AfterClass;
@@ -39,8 +38,6 @@ public class MtomTest {
         UtilServer.start(System.getProperty("basedir", ".") + 
"/target/repo/mtom");
         AxisConfiguration axisConfiguration = 
UtilServer.getConfigurationContext().getAxisConfiguration();
         
axisConfiguration.getParameter(Constants.Configuration.ENABLE_MTOM).setValue(true);
-        AxisService service = axisConfiguration.getService("mtom");
-        service.setScope(Constants.SCOPE_APPLICATION);
     }
     
     @AfterClass

Modified: axis/axis2/java/core/trunk/modules/jibx/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jibx/pom.xml?rev=1819039&r1=1819038&r2=1819039&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/jibx/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/jibx/pom.xml Fri Dec 22 13:39:25 2017
@@ -200,6 +200,7 @@
                             <serviceDescriptions>
                                 <serviceDescription>
                                     
<directory>${project.build.directory}/gen/library-unwrapped/resources</directory>
+                                    <scope>application</scope>
                                     <parameters>
                                         <parameter>
                                             <name>ServiceClass</name>
@@ -221,6 +222,7 @@
                             <serviceDescriptions>
                                 <serviceDescription>
                                     
<directory>${project.build.directory}/gen/library-wrapped/resources</directory>
+                                    <scope>application</scope>
                                     <parameters>
                                         <parameter>
                                             <name>ServiceClass</name>

Modified: 
axis/axis2/java/core/trunk/modules/jibx/src/test/java/org/apache/axis2/jibx/library/unwrapped/LibraryTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jibx/src/test/java/org/apache/axis2/jibx/library/unwrapped/LibraryTest.java?rev=1819039&r1=1819038&r2=1819039&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/jibx/src/test/java/org/apache/axis2/jibx/library/unwrapped/LibraryTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jibx/src/test/java/org/apache/axis2/jibx/library/unwrapped/LibraryTest.java
 Fri Dec 22 13:39:25 2017
@@ -21,9 +21,6 @@ package org.apache.axis2.jibx.library.un
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-import org.apache.axis2.Constants;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.jibx.beans.Book;
 import org.apache.axis2.jibx.library.unwrapped.client.LibraryStub;
 import org.apache.axis2.testutils.UtilServer;
@@ -35,9 +32,6 @@ public class LibraryTest {
     @BeforeClass
     public static void startServer() throws Exception {
         UtilServer.start(System.getProperty("basedir", ".") + 
"/target/repo/library-unwrapped");
-        AxisConfiguration axisConfiguration = 
UtilServer.getConfigurationContext().getAxisConfiguration();
-        AxisService service = axisConfiguration.getService("library");
-        service.setScope(Constants.SCOPE_APPLICATION);
     }
     
     @AfterClass

Modified: 
axis/axis2/java/core/trunk/modules/jibx/src/test/java/org/apache/axis2/jibx/library/wrapped/LibraryTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jibx/src/test/java/org/apache/axis2/jibx/library/wrapped/LibraryTest.java?rev=1819039&r1=1819038&r2=1819039&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/jibx/src/test/java/org/apache/axis2/jibx/library/wrapped/LibraryTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jibx/src/test/java/org/apache/axis2/jibx/library/wrapped/LibraryTest.java
 Fri Dec 22 13:39:25 2017
@@ -18,9 +18,6 @@
  */
 package org.apache.axis2.jibx.library.wrapped;
 
-import org.apache.axis2.Constants;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.jibx.beans.Book;
 import org.apache.axis2.jibx.library.wrapped.client.LibraryStub;
 import org.apache.axis2.jibx.wrappers.AddBookRequest;
@@ -33,9 +30,6 @@ public class LibraryTest {
     @BeforeClass
     public static void startServer() throws Exception {
         UtilServer.start(System.getProperty("basedir", ".") + 
"/target/repo/library-wrapped");
-        AxisConfiguration axisConfiguration = 
UtilServer.getConfigurationContext().getAxisConfiguration();
-        AxisService service = axisConfiguration.getService("library");
-        service.setScope(Constants.SCOPE_APPLICATION);
     }
     
     @AfterClass

Modified: 
axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/AbstractCreateRepositoryMojo.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/AbstractCreateRepositoryMojo.java?rev=1819039&r1=1819038&r2=1819039&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/AbstractCreateRepositoryMojo.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/AbstractCreateRepositoryMojo.java
 Fri Dec 22 13:39:25 2017
@@ -332,6 +332,9 @@ public abstract class AbstractCreateRepo
                         log.info("Building service " + serviceName);
                         metaInfDirectory = new File(new File(parentDirectory, 
serviceName), "META-INF");
                         metaInfDirectory.mkdirs();
+                        if (serviceDescription.getScope() != null) {
+                            serviceElement.addAttribute("scope", 
serviceDescription.getScope(), null);
+                        }
                         if (serviceDescription.getParameters() != null) {
                             for (Parameter parameter : 
serviceDescription.getParameters()) {
                                 OMElement parameterElement = null;

Modified: 
axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/ServiceDescription.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/ServiceDescription.java?rev=1819039&r1=1819038&r2=1819039&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/ServiceDescription.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin/src/main/java/org/apache/axis2/maven2/repo/ServiceDescription.java
 Fri Dec 22 13:39:25 2017
@@ -22,6 +22,7 @@ import java.io.File;
 
 public class ServiceDescription {
     private File directory;
+    private String scope;
     private Parameter[] parameters;
 
     public File getDirectory() {
@@ -32,6 +33,14 @@ public class ServiceDescription {
         this.directory = directory;
     }
 
+    public String getScope() {
+        return scope;
+    }
+
+    public void setScope(String scope) {
+        this.scope = scope;
+    }
+
     public Parameter[] getParameters() {
         return parameters;
     }


Reply via email to