You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sirona.apache.org by jl...@apache.org on 2014/02/04 15:39:06 UTC

svn commit: r1564321 - /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java

Author: jlmonteiro
Date: Tue Feb  4 14:39:06 2014
New Revision: 1564321

URL: http://svn.apache.org/r1564321
Log:
Fixing JavaAgentRunner for tests

Modified:
    incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java

Modified: incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java?rev=1564321&r1=1564320&r2=1564321&view=diff
==============================================================================
--- incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java (original)
+++ incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java Tue Feb  4 14:39:06 2014
@@ -214,14 +214,14 @@ public class JavaAgentRunner extends Blo
     }
 
     private static String buildJavaagent() throws IOException {
-        return new File(System.getProperty( "javaagent.jar.directory", "target" )).listFiles(new FilenameFilter() {
-                @Override
-                public boolean accept(File dir, String name) {
-                    return name.startsWith( System.getProperty( "javaagent.jar.name.start", "sirona-javaagent-" )) //
-                        && name.endsWith(".jar") //
-                        && !name.contains("sources");
-                }
-            })[0].getAbsolutePath();
+        final File[] files = new File(System.getProperty("javaagent.jar.directory", "target")).listFiles(new FilenameFilter() {
+            @Override
+            public boolean accept(File dir, String name) {
+                return name.startsWith(System.getProperty("javaagent.jar.name.start", "sirona-javaagent-"))
+                        && name.endsWith("-shaded.jar");
+            }
+        });
+        return files[0].getAbsolutePath();
     }
 
     private static String findJava() {



Re: svn commit: r1564321 - /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Maybe you forgot a part of the commit but javaagent is removing shaded
artifacts from the forked classpath (to really test the shade and make
javaagent as simple as adding a single line in command line to install

Le mercredi 5 février 2014, Olivier Lamy <ol...@apache.org> a écrit :
> weird because I had no problems here  (IWOMM :-) )
>
> On 5 February 2014 10:42, Romain Manni-Bucau <rm...@gmail.com>
wrote:
>> Was mine in fact so blame me (i was not able to commit this afternoon)
>>
>> basically you broke the build since we test the shade (final delivery) so
>> errors were noclassdefound
>>
>> Le mercredi 5 février 2014, Olivier Lamy <ol...@apache.org> a écrit :
>>> On 5 February 2014 01:39,  <jl...@apache.org> wrote:
>>>> Author: jlmonteiro
>>>> Date: Tue Feb  4 14:39:06 2014
>>>> New Revision: 1564321
>>>>
>>>> URL: http://svn.apache.org/r1564321
>>>> Log:
>>>> Fixing JavaAgentRunner for tests
>>>>
>>>> Modified:
>>>>
>>
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
>>>>
>>>> Modified:
>>
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
>>>> URL:
>>
http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java?rev=1564321&r1=1564320&r2=1564321&view=diff
>>>>
>>
==============================================================================
>>>> ---
>>
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
>> (original)
>>>> +++
>>
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
>> Tue Feb  4 14:39:06 2014
>>>> @@ -214,14 +214,14 @@ public class JavaAgentRunner extends Blo
>>>>      }
>>>>
>>>>      private static String buildJavaagent() throws IOException {
>>>> -        return new File(System.getProperty( "javaagent.jar.directory",
>> "target" )).listFiles(new FilenameFilter() {
>>>> -                @Override
>>>> -                public boolean accept(File dir, String name) {
>>>> -                    return name.startsWith( System.getProperty(
>> "javaagent.jar.name.start", "sirona-javaagent-" )) //
>>>> -                        && name.endsWith(".jar") //
>>>> -                        && !name.contains("sources");
>>>> -                }
>>>> -            })[0].getAbsolutePath();
>>>> +        final File[] files = new
>> File(System.getProperty("javaagent.jar.directory",
"target")).listFiles(new
>> FilenameFilter() {
>>>> +            @Override
>>>> +            public boolean accept(File dir, String name) {
>>>> +                return
>> name.startsWith(System.getProperty("javaagent.jar.name.start",
>> "sirona-javaagent-"))
>>>> +                        && name.endsWith("-shaded.jar");
>>>> +            }
>>>
>>> Why this change? We do not need to use the shaded jar as the test
>>> classpath is added.
>>>
>>> Perso, I reuse this runner in a project and this change breaks my usage.
>>>
>>>
>>>> +        });
>>>> +        return files[0].getAbsolutePath();
>>>>      }
>>>>
>>>>      private static String findJ> *Romain Manni-Bucau*
>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> *Blog: **http://rmannibucau.wordpress.com/*<
http://rmannibucau.wordpress.com/>
>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
>> <http://fr.linkedin.com/in/rmannibucau>*
>> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>
>
>
> --
> Olivier Lamy
> Ecetera: http://ecetera.com.au
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>

-- 
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau
<http://fr.linkedin.com/in/rmannibucau>*
*Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*

Re: svn commit: r1564321 - /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java

Posted by Olivier Lamy <ol...@apache.org>.
weird because I had no problems here  (IWOMM :-) )

On 5 February 2014 10:42, Romain Manni-Bucau <rm...@gmail.com> wrote:
> Was mine in fact so blame me (i was not able to commit this afternoon)
>
> basically you broke the build since we test the shade (final delivery) so
> errors were noclassdefound
>
> Le mercredi 5 février 2014, Olivier Lamy <ol...@apache.org> a écrit :
>> On 5 February 2014 01:39,  <jl...@apache.org> wrote:
>>> Author: jlmonteiro
>>> Date: Tue Feb  4 14:39:06 2014
>>> New Revision: 1564321
>>>
>>> URL: http://svn.apache.org/r1564321
>>> Log:
>>> Fixing JavaAgentRunner for tests
>>>
>>> Modified:
>>>
> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
>>>
>>> Modified:
> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
>>> URL:
> http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java?rev=1564321&r1=1564320&r2=1564321&view=diff
>>>
> ==============================================================================
>>> ---
> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
> (original)
>>> +++
> incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
> Tue Feb  4 14:39:06 2014
>>> @@ -214,14 +214,14 @@ public class JavaAgentRunner extends Blo
>>>      }
>>>
>>>      private static String buildJavaagent() throws IOException {
>>> -        return new File(System.getProperty( "javaagent.jar.directory",
> "target" )).listFiles(new FilenameFilter() {
>>> -                @Override
>>> -                public boolean accept(File dir, String name) {
>>> -                    return name.startsWith( System.getProperty(
> "javaagent.jar.name.start", "sirona-javaagent-" )) //
>>> -                        && name.endsWith(".jar") //
>>> -                        && !name.contains("sources");
>>> -                }
>>> -            })[0].getAbsolutePath();
>>> +        final File[] files = new
> File(System.getProperty("javaagent.jar.directory", "target")).listFiles(new
> FilenameFilter() {
>>> +            @Override
>>> +            public boolean accept(File dir, String name) {
>>> +                return
> name.startsWith(System.getProperty("javaagent.jar.name.start",
> "sirona-javaagent-"))
>>> +                        && name.endsWith("-shaded.jar");
>>> +            }
>>
>> Why this change? We do not need to use the shaded jar as the test
>> classpath is added.
>>
>> Perso, I reuse this runner in a project and this change breaks my usage.
>>
>>
>>> +        });
>>> +        return files[0].getAbsolutePath();
>>>      }
>>>
>>>      private static String findJava() {
>>>
>>>
>>
>>
>>
>> --
>> Olivier Lamy
>> Ecetera: http://ecetera.com.au
>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>
>
> --
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau
> <http://fr.linkedin.com/in/rmannibucau>*
> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: svn commit: r1564321 - /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Was mine in fact so blame me (i was not able to commit this afternoon)

basically you broke the build since we test the shade (final delivery) so
errors were noclassdefound

Le mercredi 5 février 2014, Olivier Lamy <ol...@apache.org> a écrit :
> On 5 February 2014 01:39,  <jl...@apache.org> wrote:
>> Author: jlmonteiro
>> Date: Tue Feb  4 14:39:06 2014
>> New Revision: 1564321
>>
>> URL: http://svn.apache.org/r1564321
>> Log:
>> Fixing JavaAgentRunner for tests
>>
>> Modified:
>>
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
>>
>> Modified:
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
>> URL:
http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java?rev=1564321&r1=1564320&r2=1564321&view=diff
>>
==============================================================================
>> ---
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
(original)
>> +++
incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
Tue Feb  4 14:39:06 2014
>> @@ -214,14 +214,14 @@ public class JavaAgentRunner extends Blo
>>      }
>>
>>      private static String buildJavaagent() throws IOException {
>> -        return new File(System.getProperty( "javaagent.jar.directory",
"target" )).listFiles(new FilenameFilter() {
>> -                @Override
>> -                public boolean accept(File dir, String name) {
>> -                    return name.startsWith( System.getProperty(
"javaagent.jar.name.start", "sirona-javaagent-" )) //
>> -                        && name.endsWith(".jar") //
>> -                        && !name.contains("sources");
>> -                }
>> -            })[0].getAbsolutePath();
>> +        final File[] files = new
File(System.getProperty("javaagent.jar.directory", "target")).listFiles(new
FilenameFilter() {
>> +            @Override
>> +            public boolean accept(File dir, String name) {
>> +                return
name.startsWith(System.getProperty("javaagent.jar.name.start",
"sirona-javaagent-"))
>> +                        && name.endsWith("-shaded.jar");
>> +            }
>
> Why this change? We do not need to use the shaded jar as the test
> classpath is added.
>
> Perso, I reuse this runner in a project and this change breaks my usage.
>
>
>> +        });
>> +        return files[0].getAbsolutePath();
>>      }
>>
>>      private static String findJava() {
>>
>>
>
>
>
> --
> Olivier Lamy
> Ecetera: http://ecetera.com.au
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>

-- 
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau
<http://fr.linkedin.com/in/rmannibucau>*
*Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*

Re: svn commit: r1564321 - /incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java

Posted by Olivier Lamy <ol...@apache.org>.
On 5 February 2014 01:39,  <jl...@apache.org> wrote:
> Author: jlmonteiro
> Date: Tue Feb  4 14:39:06 2014
> New Revision: 1564321
>
> URL: http://svn.apache.org/r1564321
> Log:
> Fixing JavaAgentRunner for tests
>
> Modified:
>     incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
>
> Modified: incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java
> URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java?rev=1564321&r1=1564320&r2=1564321&view=diff
> ==============================================================================
> --- incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java (original)
> +++ incubator/sirona/trunk/agent/javaagent/src/test/java/org/apache/sirona/javaagent/JavaAgentRunner.java Tue Feb  4 14:39:06 2014
> @@ -214,14 +214,14 @@ public class JavaAgentRunner extends Blo
>      }
>
>      private static String buildJavaagent() throws IOException {
> -        return new File(System.getProperty( "javaagent.jar.directory", "target" )).listFiles(new FilenameFilter() {
> -                @Override
> -                public boolean accept(File dir, String name) {
> -                    return name.startsWith( System.getProperty( "javaagent.jar.name.start", "sirona-javaagent-" )) //
> -                        && name.endsWith(".jar") //
> -                        && !name.contains("sources");
> -                }
> -            })[0].getAbsolutePath();
> +        final File[] files = new File(System.getProperty("javaagent.jar.directory", "target")).listFiles(new FilenameFilter() {
> +            @Override
> +            public boolean accept(File dir, String name) {
> +                return name.startsWith(System.getProperty("javaagent.jar.name.start", "sirona-javaagent-"))
> +                        && name.endsWith("-shaded.jar");
> +            }

Why this change? We do not need to use the shaded jar as the test
classpath is added.

Perso, I reuse this runner in a project and this change breaks my usage.


> +        });
> +        return files[0].getAbsolutePath();
>      }
>
>      private static String findJava() {
>
>



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy