JBossWS SVN: r19588 - projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-20 11:08:38 -0400 (Fri, 20 Mar 2015)
New Revision: 19588
Removed:
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/UrlUtils.java
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java
Log:
[JBWS-3824] Removing useless class
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java 2015-03-20 11:43:04 UTC (rev 19587)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java 2015-03-20 15:08:38 UTC (rev 19588)
@@ -196,7 +196,7 @@
StringBuilder cp = new StringBuilder();
for ( String el : classPath )
{
- cp.append(UrlUtils.getURL(new File(el)).toExternalForm());
+ cp.append(new File(el).toURI().toURL().toExternalForm());
cp.append(" ");
}
Deleted: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/UrlUtils.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/UrlUtils.java 2015-03-20 11:43:04 UTC (rev 19587)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/UrlUtils.java 2015-03-20 15:08:38 UTC (rev 19588)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.plugins.tools;
-
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.BitSet;
-
-/**
- * Utility for dealing with URLs
- *
- * @author rsearls
- * @since 06-Feb-2015
- */
-public class UrlUtils
-{
- private static final BitSet UNRESERVED = new BitSet(Byte.MAX_VALUE - Byte.MIN_VALUE + 1);
-
- private static final int RADIX = 16;
-
- private static final int MASK = 0xf;
-
- private UrlUtils()
- {
- }
-
- private static final String ENCODING = "UTF-8";
-
- static
- {
- try
- {
- byte[] bytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.!~*'():/".getBytes(ENCODING);
- for (byte aByte : bytes)
- {
- UNRESERVED.set(aByte);
- }
- }
- catch (UnsupportedEncodingException e)
- {
- // can't happen as UTF-8 must be present
- }
- }
-
- public static URL getURL(File file) throws MalformedURLException
- {
- URL url = new URL(file.toURI().toASCIIString());
- // encode any characters that do not comply with RFC 2396
- // this is primarily to handle Windows where the user's home directory contains spaces
- try
- {
- byte[] bytes = url.toString().getBytes(ENCODING);
- StringBuilder buf = new StringBuilder(bytes.length);
- for (byte b : bytes)
- {
- if (b > 0 && UNRESERVED.get(b))
- {
- buf.append((char) b);
- }
- else
- {
- buf.append('%');
- buf.append(Character.forDigit(b >>> 4 & MASK, RADIX));
- buf.append(Character.forDigit(b & MASK, RADIX));
- }
- }
- return new URL(buf.toString());
- }
- catch (UnsupportedEncodingException e)
- {
- // should not happen as UTF-8 must be present
- throw new RuntimeException(e);
- }
- }
-}
9 years, 9 months
JBossWS SVN: r19587 - projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-20 07:43:04 -0400 (Fri, 20 Mar 2015)
New Revision: 19587
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/UrlUtils.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java
Log:
[JBWS-3824] Misc fixes/improvements:
* Fix indentation
* Remove unused methods
* Properly concatenate strings using StringBuilder
* Create temp file in dedicated output directory
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java 2015-03-20 11:04:45 UTC (rev 19586)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java 2015-03-20 11:43:04 UTC (rev 19587)
@@ -179,35 +179,32 @@
* @return The file pointint to the jar
* @throws java.io.IOException When a file operation fails.
*/
- public File createJar( List<String> classPath, String startClassName )
- throws IOException
+ public File createJar(List<String> classPath, String startClassName) throws IOException
{
- File tempDirectory = getOutputDirectory();
+ File tempDirectory = new File(getOutputDirectory().getParentFile(), "jaxws-tools");
tempDirectory.mkdirs();
- File file = File.createTempFile( "jbosswsJaxwsTools", ".jar", tempDirectory );
+ File file = File.createTempFile("jaxws-tools-maven-plugin-classpath-", ".jar", tempDirectory);
- FileOutputStream fos = new FileOutputStream( file );
- JarOutputStream jos = new JarOutputStream( fos );
- jos.setLevel( JarOutputStream.STORED );
- JarEntry je = new JarEntry( "META-INF/MANIFEST.MF" );
- jos.putNextEntry( je );
+ FileOutputStream fos = new FileOutputStream(file);
+ JarOutputStream jos = new JarOutputStream(fos);
+ jos.setLevel(JarOutputStream.STORED);
+ JarEntry je = new JarEntry("META-INF/MANIFEST.MF");
+ jos.putNextEntry(je);
Manifest man = new Manifest();
- // we can't use StringUtils.join here since we need to add a '/' to
- // the end of directory entries - otherwise the jvm will ignore them.
- String cp = "";
+ StringBuilder cp = new StringBuilder();
for ( String el : classPath )
{
- // NOTE: if File points to a directory, this entry MUST end in '/'.
- cp += UrlUtils.getURL(new File(el)).toExternalForm() + " ";
+ cp.append(UrlUtils.getURL(new File(el)).toExternalForm());
+ cp.append(" ");
}
- man.getMainAttributes().putValue( "Manifest-Version", "1.0" );
- man.getMainAttributes().putValue( "Class-Path", cp.trim() );
- man.getMainAttributes().putValue( "Main-Class", startClassName );
+ man.getMainAttributes().putValue("Manifest-Version", "1.0");
+ man.getMainAttributes().putValue("Class-Path", cp.toString().trim());
+ man.getMainAttributes().putValue("Main-Class", startClassName);
- man.write( jos );
+ man.write(jos);
jos.close();
return file;
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/UrlUtils.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/UrlUtils.java 2015-03-20 11:04:45 UTC (rev 19586)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/UrlUtils.java 2015-03-20 11:43:04 UTC (rev 19587)
@@ -28,13 +28,14 @@
import java.util.BitSet;
/**
- * Utility for dealing with URLs in pre-JDK 1.4.
+ * Utility for dealing with URLs
*
- * User: rsearls
- * Date: 2/6/15
+ * @author rsearls
+ * @since 06-Feb-2015
*/
-public class UrlUtils {
- private static final BitSet UNRESERVED = new BitSet( Byte.MAX_VALUE - Byte.MIN_VALUE + 1 );
+public class UrlUtils
+{
+ private static final BitSet UNRESERVED = new BitSet(Byte.MAX_VALUE - Byte.MIN_VALUE + 1);
private static final int RADIX = 16;
@@ -50,50 +51,46 @@
{
try
{
- byte[] bytes =
- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.!~*'():/".getBytes( ENCODING );
- for ( byte aByte : bytes )
+ byte[] bytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.!~*'():/".getBytes(ENCODING);
+ for (byte aByte : bytes)
{
- UNRESERVED.set( aByte );
+ UNRESERVED.set(aByte);
}
}
- catch ( UnsupportedEncodingException e )
+ catch (UnsupportedEncodingException e)
{
// can't happen as UTF-8 must be present
}
}
- public static URL getURL( File file )
- throws MalformedURLException
+ public static URL getURL(File file) throws MalformedURLException
{
- // with JDK 1.4+, code would be: return new URL( file.toURI().toASCIIString() );
- //noinspection deprecation
- URL url = file.toURL();
+ URL url = new URL(file.toURI().toASCIIString());
// encode any characters that do not comply with RFC 2396
// this is primarily to handle Windows where the user's home directory contains spaces
try
{
- byte[] bytes = url.toString().getBytes( ENCODING );
- StringBuilder buf = new StringBuilder( bytes.length );
- for ( byte b : bytes )
+ byte[] bytes = url.toString().getBytes(ENCODING);
+ StringBuilder buf = new StringBuilder(bytes.length);
+ for (byte b : bytes)
{
- if ( b > 0 && UNRESERVED.get( b ) )
+ if (b > 0 && UNRESERVED.get(b))
{
- buf.append( (char) b );
+ buf.append((char) b);
}
else
{
- buf.append( '%' );
- buf.append( Character.forDigit( b >>> 4 & MASK, RADIX ) );
- buf.append( Character.forDigit( b & MASK, RADIX ) );
+ buf.append('%');
+ buf.append(Character.forDigit(b >>> 4 & MASK, RADIX));
+ buf.append(Character.forDigit(b & MASK, RADIX));
}
}
- return new URL( buf.toString() );
+ return new URL(buf.toString());
}
- catch ( UnsupportedEncodingException e )
+ catch (UnsupportedEncodingException e)
{
// should not happen as UTF-8 must be present
- throw new RuntimeException( e );
+ throw new RuntimeException(e);
}
}
}
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java 2015-03-20 11:04:45 UTC (rev 19586)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java 2015-03-20 11:43:04 UTC (rev 19587)
@@ -24,7 +24,6 @@
import java.io.File;
import java.io.PrintStream;
import java.lang.reflect.Method;
-import java.net.URL;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@@ -129,39 +128,6 @@
}
/**
- * Write list of archives on the command-line
- *
- * @param argLine
- * @param classpath
- * @param toolClass
- * @return
- */
- private static List<String> initCommandList(String argLine, List<String> classpath, String toolClass)
- {
- List<String> commandList = new ArrayList<String>();
- commandList.add("java");
- if (argLine != null)
- {
- commandList.add(argLine);
- }
- List<String> cp = classpath;
- if (cp != null && !cp.isEmpty())
- {
- commandList.add("-classpath ");
- StringBuilder additionalClasspath = new StringBuilder();
- for (String c : cp)
- {
- additionalClasspath.append(c);
- additionalClasspath.append(File.pathSeparator);
- }
- additionalClasspath.deleteCharAt(additionalClasspath.length() - 1);
- commandList.add(additionalClasspath.toString());
- }
- commandList.add(toolClass);
- return commandList;
- }
-
- /**
* Write manifest-only jar to the command-line
*
* @param argLine
9 years, 9 months
JBossWS SVN: r19586 - projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-20 07:04:45 -0400 (Fri, 20 Mar 2015)
New Revision: 19586
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsConsumeMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsProvideMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WsConsumeMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WsProvideMojo.java
Log:
[JBWS-3893] Fix deprecated "@parameter expression" usage
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java 2015-03-20 10:53:58 UTC (rev 19585)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java 2015-03-20 11:04:45 UTC (rev 19586)
@@ -47,7 +47,7 @@
abstract class AbstractToolsMojo extends AbstractMojo
{
/**
- * @parameter expression="${project}"
+ * @parameter property="project"
* @readonly
*/
protected MavenProject project;
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsConsumeMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsConsumeMojo.java 2015-03-20 10:53:58 UTC (rev 19585)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsConsumeMojo.java 2015-03-20 11:04:45 UTC (rev 19586)
@@ -49,7 +49,7 @@
/**
* Project test classpath.
*
- * @parameter expression="${project.testClasspathElements}"
+ * @parameter property="project.testClasspathElements"
* @required
* @readonly
*/
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsProvideMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsProvideMojo.java 2015-03-20 10:53:58 UTC (rev 19585)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/TestWsProvideMojo.java 2015-03-20 11:04:45 UTC (rev 19586)
@@ -49,7 +49,7 @@
/**
* Project test classpath.
*
- * @parameter expression="${project.testClasspathElements}"
+ * @parameter property="project.testClasspathElements"
* @required
* @readonly
*/
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WsConsumeMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WsConsumeMojo.java 2015-03-20 10:53:58 UTC (rev 19585)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WsConsumeMojo.java 2015-03-20 11:04:45 UTC (rev 19586)
@@ -49,7 +49,7 @@
/**
* Project classpath.
*
- * @parameter expression="${project.compileClasspathElements}"
+ * @parameter property="project.compileClasspathElements"
* @required
* @readonly
*/
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WsProvideMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WsProvideMojo.java 2015-03-20 10:53:58 UTC (rev 19585)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WsProvideMojo.java 2015-03-20 11:04:45 UTC (rev 19586)
@@ -49,7 +49,7 @@
/**
* Project classpath.
*
- * @parameter expression="${project.compileClasspathElements}"
+ * @parameter property="project.compileClasspathElements"
* @required
* @readonly
*/
9 years, 9 months
JBossWS SVN: r19585 - projects/plugins/maven/jaxws-tools/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-20 06:53:58 -0400 (Fri, 20 Mar 2015)
New Revision: 19585
Modified:
projects/plugins/maven/jaxws-tools/trunk/pom.xml
Log:
[JBWS-3829] Also use latest parent
Modified: projects/plugins/maven/jaxws-tools/trunk/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/pom.xml 2015-03-20 10:50:27 UTC (rev 19584)
+++ projects/plugins/maven/jaxws-tools/trunk/pom.xml 2015-03-20 10:53:58 UTC (rev 19585)
@@ -14,7 +14,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-parent</artifactId>
- <version>1.0.10.GA</version>
+ <version>1.2.0.CR1</version>
</parent>
<!-- Source Control Management -->
9 years, 9 months
JBossWS SVN: r19584 - in projects/plugins/maven/jaxws-tools/trunk: src/test/resources/test-argument and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-20 06:50:27 -0400 (Fri, 20 Mar 2015)
New Revision: 19584
Modified:
projects/plugins/maven/jaxws-tools/trunk/pom.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsconsume-plugin-config.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsprovide-plugin-config.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
Log:
[JBWS-3892] Change artifactId to "jaxws-tools-maven-plugin"
Modified: projects/plugins/maven/jaxws-tools/trunk/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/pom.xml 2015-03-20 10:37:41 UTC (rev 19583)
+++ projects/plugins/maven/jaxws-tools/trunk/pom.xml 2015-03-20 10:50:27 UTC (rev 19584)
@@ -5,7 +5,7 @@
<name>JBoss Web Services - JAX-WS Tools Maven Plugin</name>
<groupId>org.jboss.ws.plugins</groupId>
- <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <artifactId>jaxws-tools-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>1.2.0-SNAPSHOT</version>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsconsume-plugin-config.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsconsume-plugin-config.xml 2015-03-20 10:37:41 UTC (rev 19583)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsconsume-plugin-config.xml 2015-03-20 10:50:27 UTC (rev 19584)
@@ -3,7 +3,7 @@
<plugins>
<plugin>
<groupId>org.jboss.ws.plugins</groupId>
- <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <artifactId>jaxws-tools-maven-plugin</artifactId>
<configuration>
<outputDirectory>output</outputDirectory>
<classpathElements>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsprovide-plugin-config.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsprovide-plugin-config.xml 2015-03-20 10:37:41 UTC (rev 19583)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-argument/wsprovide-plugin-config.xml 2015-03-20 10:50:27 UTC (rev 19584)
@@ -3,7 +3,7 @@
<plugins>
<plugin>
<groupId>org.jboss.ws.plugins</groupId>
- <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <artifactId>jaxws-tools-maven-plugin</artifactId>
<configuration>
<outputDirectory>output</outputDirectory>
<classpathElements>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml 2015-03-20 10:37:41 UTC (rev 19583)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml 2015-03-20 10:50:27 UTC (rev 19584)
@@ -31,7 +31,7 @@
<plugins>
<plugin>
<groupId>org.jboss.ws.plugins</groupId>
- <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <artifactId>jaxws-tools-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<target>2.2</target> <!-- This is actually ignored by the CXF tooling, the jaxws 2.2 version is being used because of the endorsing here -->
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml 2015-03-20 10:37:41 UTC (rev 19583)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml 2015-03-20 10:50:27 UTC (rev 19584)
@@ -28,7 +28,7 @@
<plugins>
<plugin>
<groupId>org.jboss.ws.plugins</groupId>
- <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <artifactId>jaxws-tools-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<target>2.1</target>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml 2015-03-20 10:37:41 UTC (rev 19583)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml 2015-03-20 10:50:27 UTC (rev 19584)
@@ -28,7 +28,7 @@
<plugins>
<plugin>
<groupId>org.jboss.ws.plugins</groupId>
- <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <artifactId>jaxws-tools-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<verbose>true</verbose>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml 2015-03-20 10:37:41 UTC (rev 19583)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml 2015-03-20 10:50:27 UTC (rev 19584)
@@ -36,7 +36,7 @@
<plugins>
<plugin>
<groupId>org.jboss.ws.plugins</groupId>
- <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <artifactId>jaxws-tools-maven-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<verbose>true</verbose>
9 years, 9 months
JBossWS SVN: r19583 - in projects/plugins/maven/jaxws-tools/trunk: src/test/resources/test-embedded/testEndorse and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-20 06:37:41 -0400 (Fri, 20 Mar 2015)
New Revision: 19583
Modified:
projects/plugins/maven/jaxws-tools/trunk/pom.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
Log:
[JBWS-3829] Move plugin to JBossWS 5
Update to maven-compiler-plugin 2.4 and build using JDK 1.7+
Modified: projects/plugins/maven/jaxws-tools/trunk/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/pom.xml 2015-03-19 10:03:26 UTC (rev 19582)
+++ projects/plugins/maven/jaxws-tools/trunk/pom.xml 2015-03-20 10:37:41 UTC (rev 19583)
@@ -26,7 +26,7 @@
<!-- Properties -->
<properties>
- <jbossws.common.tools.version>1.2.0.Final</jbossws.common.tools.version>
+ <jbossws.common.tools.version>1.2.1.CR1</jbossws.common.tools.version>
<getopt.version>1.0.13</getopt.version>
<log4j.version>1.2.14</log4j.version>
<maven.project.version>2.2.1</maven.project.version>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml 2015-03-19 10:03:26 UTC (rev 19582)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml 2015-03-20 10:37:41 UTC (rev 19583)
@@ -15,10 +15,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.4</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.7</source>
+ <target>1.7</target>
<maxmem>256M</maxmem>
<fork>${compiler.fork}</fork>
<compilerArguments>
@@ -120,12 +120,12 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
- <version>5.0.0-SNAPSHOT</version>
+ <version>5.0.0.Beta2</version>
</dependency>
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-factories</artifactId>
- <version>5.0.0-SNAPSHOT</version>
+ <version>5.0.0.Beta2</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.xml.ws</groupId>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml 2015-03-19 10:03:26 UTC (rev 19582)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml 2015-03-20 10:37:41 UTC (rev 19583)
@@ -15,10 +15,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.4</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.7</source>
+ <target>1.7</target>
<maxmem>256M</maxmem>
<fork>${compiler.fork}</fork>
</configuration>
@@ -88,7 +88,7 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
- <version>5.0.0-SNAPSHOT</version>
+ <version>5.0.0.Beta2</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml 2015-03-19 10:03:26 UTC (rev 19582)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml 2015-03-20 10:37:41 UTC (rev 19583)
@@ -15,10 +15,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.4</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.7</source>
+ <target>1.7</target>
<maxmem>256M</maxmem>
<fork>${compiler.fork}</fork>
</configuration>
@@ -95,7 +95,7 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
- <version>5.0.0-SNAPSHOT</version>
+ <version>5.0.0.Beta2</version>
</dependency>
</dependencies>
</project>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml 2015-03-19 10:03:26 UTC (rev 19582)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml 2015-03-20 10:37:41 UTC (rev 19583)
@@ -23,10 +23,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.4</version>
<configuration>
- <source>1.5</source>
- <target>1.5</target>
+ <source>1.7</source>
+ <target>1.7</target>
<maxmem>256M</maxmem>
<fork>${compiler.fork}</fork>
</configuration>
@@ -94,7 +94,7 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
- <version>5.0.0-SNAPSHOT</version>
+ <version>5.0.0.Beta2</version>
</dependency>
</dependencies>
</project>
9 years, 9 months
JBossWS SVN: r19582 - in stack/cxf/branches/management/modules: server/src/main/java/org/jboss/wsf/stack/cxf/interceptor and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-03-19 06:03:26 -0400 (Thu, 19 Mar 2015)
New Revision: 19582
Modified:
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointMetricsGetInterceptor.java
stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointMetricsGetOutInterceptor.java
stack/cxf/branches/management/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java
Log:
[JBWS-3890]:Enhance EndpointMetrics api to collect the concurrent request count and endpoint method request count information
Modified: stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
===================================================================
--- stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java 2015-03-19 10:01:22 UTC (rev 19581)
+++ stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java 2015-03-19 10:03:26 UTC (rev 19582)
@@ -59,8 +59,10 @@
import org.apache.cxf.service.model.BindingOperationInfo;
import org.jboss.security.auth.callback.CallbackHandlerPolicyContextHandler;
import org.jboss.ws.api.util.ServiceLoader;
+import org.jboss.ws.common.utils.RuntimeConfigUtils;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.RuntimeConfig;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandler;
@@ -165,6 +167,10 @@
throws Exception
{
Endpoint ep = exchange.get(Endpoint.class);
+ if (isStatisticsEnabled(ep))
+ {
+ ep.getEndpointMetrics().processInvocation(m.getName());
+ }
final InvocationHandler invHandler = ep.getInvocationHandler();
final Invocation inv = createInvocation(invHandler, serviceObject, ep, m, paramArray);
if (factory != null) {
@@ -213,4 +219,13 @@
nsCtxSelectorFactory.getWrapper().clearCurrentThreadSelector(exchange);
}
}
+
+ private boolean isStatisticsEnabled(Endpoint ep)
+ {
+ if (ep.getEndpointMetrics() != null)
+ {
+ return RuntimeConfigUtils.isEnabled(ep, RuntimeConfig.STATISTICS_ENABLED) || RuntimeConfigUtils.getServerConfig().isStatisticsEnabled();
+ }
+ return false;
+ }
}
Modified: stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java
===================================================================
--- stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java 2015-03-19 10:01:22 UTC (rev 19581)
+++ stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java 2015-03-19 10:03:26 UTC (rev 19582)
@@ -92,8 +92,9 @@
out.close();
return;
}
- final boolean statisticsEnabled = getServerConfig().isStatisticsEnabled() || "true".equals(ep.getRuntimeProperty(RuntimeConfig.STATISTICS_ENABLED));
+ final boolean statisticsEnabled = isStatisticsEnabled(ep, req.getMethod());
final Long beginTime = statisticsEnabled == true ? initRequestMetrics(ep) : 0;
+
final Deployment dep = ep.getService().getDeployment();
final AbstractHTTPDestination dest = findDestination(req, dep.getAttachment(BusHolder.class).getBus());
final HttpServletResponseWrapper response = new HttpServletResponseWrapper(res);
@@ -122,6 +123,14 @@
}
}
+ private boolean isStatisticsEnabled(Endpoint ep, String httpMethod) {
+ if ("POST".equals(httpMethod)) {
+ return getServerConfig().isStatisticsEnabled() || "true".equals(ep.getRuntimeProperty(RuntimeConfig.STATISTICS_ENABLED));
+ }
+ return false;
+
+ }
+
private boolean hasQueryString(HttpServletRequest req)
{
final String queryString = req.getQueryString();
Modified: stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointMetricsGetInterceptor.java
===================================================================
--- stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointMetricsGetInterceptor.java 2015-03-19 10:01:22 UTC (rev 19581)
+++ stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointMetricsGetInterceptor.java 2015-03-19 10:03:26 UTC (rev 19582)
@@ -50,7 +50,6 @@
static
{
httpMethods.add("GET");
- httpMethods.add("POST");
}
public EndpointMetricsGetInterceptor()
Modified: stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointMetricsGetOutInterceptor.java
===================================================================
--- stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointMetricsGetOutInterceptor.java 2015-03-19 10:01:22 UTC (rev 19581)
+++ stack/cxf/branches/management/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/EndpointMetricsGetOutInterceptor.java 2015-03-19 10:03:26 UTC (rev 19582)
@@ -76,6 +76,10 @@
writeElement(mappedWriter, "maxProcessingTime", metrics.getMaxProcessingTime());
writeElement(mappedWriter, "minProcessingTime", metrics.getMinProcessingTime());
writeElement(mappedWriter, "averageProcessingTime", metrics.getAverageProcessingTime());
+ writeElement(mappedWriter, "concurrentRequestCount", metrics.getConcurrentCount());
+ for (String method : metrics.getRequestMethods()) {
+ writeElement(mappedWriter, "Method(" + method + "())InvocationCount:", metrics.getInvocationCountByMethod(method));
+ }
mappedWriter.writeEndDocument();
out.flush();
}
Modified: stack/cxf/branches/management/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java
===================================================================
--- stack/cxf/branches/management/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java 2015-03-19 10:01:22 UTC (rev 19581)
+++ stack/cxf/branches/management/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java 2015-03-19 10:03:26 UTC (rev 19582)
@@ -156,7 +156,8 @@
assertEquals(200, connenction.getResponseCode());
bout = new ByteArrayOutputStream();
IOUtils.copy(connenction.getInputStream(), bout);
- assertTrue("Unexpected response", bout.toString().contains("\"requestCount\":3"));
+ assertTrue("Unexpected rquestCount response", bout.toString().contains("\"requestCount\":1"));
+ assertTrue("Unexpected invocation count", bout.toString().contains("\"Method(testMessageContextProperties())InvocationCount:\":1"));
}
9 years, 9 months
JBossWS SVN: r19581 - in common/branches/management/src/main/java/org/jboss/ws/common: utils and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-03-19 06:01:22 -0400 (Thu, 19 Mar 2015)
New Revision: 19581
Modified:
common/branches/management/src/main/java/org/jboss/ws/common/management/EndpointMetricsImpl.java
common/branches/management/src/main/java/org/jboss/ws/common/utils/RuntimeConfigUtils.java
Log:
[JBWS-3890]:Enhance EndpointMetrics api to collect the concurrent request count and endpoint method request count information
Modified: common/branches/management/src/main/java/org/jboss/ws/common/management/EndpointMetricsImpl.java
===================================================================
--- common/branches/management/src/main/java/org/jboss/ws/common/management/EndpointMetricsImpl.java 2015-03-19 10:01:03 UTC (rev 19580)
+++ common/branches/management/src/main/java/org/jboss/ws/common/management/EndpointMetricsImpl.java 2015-03-19 10:01:22 UTC (rev 19581)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.common.management;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
@@ -53,6 +55,8 @@
private final AtomicLong maxProcessingTime = new AtomicLong(0);
private final AtomicLong minProcessingTime = new AtomicLong(0);
private final AtomicLong totalProcessingTime = new AtomicLong(0);
+ private final AtomicLong concurrentCount = new AtomicLong(0);
+ private final ConcurrentHashMap<String, AtomicLong> methodsRequestMap = new ConcurrentHashMap<String, AtomicLong>( );
public void start()
{
@@ -70,8 +74,10 @@
{
return 0;
}
+ long result = System.nanoTime();
requestCount.incrementAndGet();
- return System.nanoTime();
+ concurrentCount.incrementAndGet();
+ return result;
}
public void processResponseMessage(long beginTime)
@@ -88,6 +94,7 @@
minProcessingTime.compareAndSet(0, procTime);
updateMax(maxProcessingTime, procTime);
updateMin(minProcessingTime, procTime);
+ concurrentCount.decrementAndGet();
}
}
@@ -105,6 +112,7 @@
minProcessingTime.compareAndSet(0, procTime);
updateMax(maxProcessingTime, procTime);
updateMin(minProcessingTime, procTime);
+ concurrentCount.decrementAndGet();
}
}
@@ -180,6 +188,37 @@
buffer.append("\n minProcessingTime=" + minProcessingTime);
buffer.append("\n avgProcessingTime=" + getAverageProcessingTime());
buffer.append("\n totalProcessingTime=" + totalProcessingTime);
+ buffer.append("\n concurrentCount=" + getConcurrentCount());
return buffer.toString();
}
+
+ @Override
+ public long getConcurrentCount()
+ {
+ return concurrentCount.get();
+ }
+
+ //To avoid throw a NPE : if method is not found in map, it returns -1
+ public long getInvocationCountByMethod(String method)
+ {
+ if (!methodsRequestMap.containsKey(method)) {
+ return -1;
+ }
+ return methodsRequestMap.get(method).get();
+ }
+
+ @Override
+ public void processInvocation(String method)
+ {
+ methodsRequestMap.putIfAbsent(method, new AtomicLong(0));
+ methodsRequestMap.get(method).incrementAndGet();
+ }
+
+ @Override
+ public Set<String> getRequestMethods()
+ {
+ return methodsRequestMap.keySet();
+ }
+
+
}
Modified: common/branches/management/src/main/java/org/jboss/ws/common/utils/RuntimeConfigUtils.java
===================================================================
--- common/branches/management/src/main/java/org/jboss/ws/common/utils/RuntimeConfigUtils.java 2015-03-19 10:01:03 UTC (rev 19580)
+++ common/branches/management/src/main/java/org/jboss/ws/common/utils/RuntimeConfigUtils.java 2015-03-19 10:01:22 UTC (rev 19581)
@@ -50,7 +50,7 @@
return false;
}
- private static ServerConfig getServerConfig()
+ public static ServerConfig getServerConfig()
{
if (System.getSecurityManager() == null)
{
9 years, 9 months
JBossWS SVN: r19580 - spi/branches/management/src/main/java/org/jboss/wsf/spi/management.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-03-19 06:01:03 -0400 (Thu, 19 Mar 2015)
New Revision: 19580
Modified:
spi/branches/management/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java
Log:
[JBWS-3890]:Enhance EndpointMetrics api to collect the concurrent request count and endpoint method request count information
Modified: spi/branches/management/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java
===================================================================
--- spi/branches/management/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java 2015-03-17 16:23:00 UTC (rev 19579)
+++ spi/branches/management/src/main/java/org/jboss/wsf/spi/management/EndpointMetrics.java 2015-03-19 10:01:03 UTC (rev 19580)
@@ -21,7 +21,10 @@
*/
package org.jboss.wsf.spi.management;
+import java.util.Set;
+
+
public interface EndpointMetrics
{
void start();
@@ -47,5 +50,13 @@
long getFaultCount();
long getResponseCount();
+
+ long getConcurrentCount();
+
+ void processInvocation(String method);
+
+ long getInvocationCountByMethod(String method);
+
+ Set<String> getRequestMethods();
}
9 years, 9 months