Re: Help with Shading on ActiveMQ Artemis

2021-11-18 Thread Matt Benson
I have not yet analyzed your example in full detail, but typically the idea
with shaded code is that your original code will refer to the classes of
the package to be shaded by their original names (that's assuming you're
relocating packages, which you are in this case; otherwise the names would
of course not differ). My thought with regard to dependencies among modules
is that the whole idea of shading is that code depending on your shaded
artifact is not typically expected to use directly/at compile time the
shaded types and you can apply this rule to submodules of the same lineage
as well.
I think you could possibly accomplish what you want by creating a dedicated
artifact that does nothing but repackage the JSON library/ies you want to
consume among your modules; I thought of this when I saw you were
attempting to reference your dependencies by their "relocated names" in
your source code. Having created this artifact (which I have not called a
module because as has been mentioned you will probably have a hard time
getting your IDE to build it in the way you want) you can refer to the
relocated types at source level as you have attempted, and across as many
modules as you like. Apache Geronimo has done something like this
(publishing a "shaded" version of a dependency) with asm for their xbean
code as I recall.

HTH,
Matt

On Wed, Nov 17, 2021, 8:07 AM Clebert Suconic 
wrote:

> Right.. This should happen by default. and it will only work if I'm
> using the shaded jar outside of my project. However if I use it within
> my project it will not work at all.
>
>
> I have created a minimal version of my issue on this github project:
>
>
> https://github.com/clebertsuconic/clebert-shade-issue
>
>
>
> I expect the following line to give me a compilation error:
>
>
> https://github.com/clebertsuconic/clebert-shade-issue/blob/main/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/JsonLoader.java#L38
>
> And that shading isolation will only work (that means give me the
> compilation error) if I remove this line from the main pom (after mvn
> install on artemis-commons-json of course):
>
> https://github.com/clebertsuconic/clebert-shade-issue/blob/main/pom.xml#L34
>
>
> if I also call "mvn dependency:tree", you will see the dependency
> listed and not giving the isolation I expected:
>
>
> https://gist.github.com/clebertsuconic/cb025175470a0f429582d3f656b48377#file-gistfile1-txt-L5-L6
>
>
>
>
>
> So, in other words, shading does not work internally. The pom
> replacement will not work through the internal dependency list.
>
> It seems like a bug to me, unless someone finds an explanation?
>
> and how I would be able to achieve this? would anybody know?
>
> On Wed, Nov 17, 2021 at 8:39 AM Matt Benson  wrote:
> >
> >
> https://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#createDependencyReducedPom
> >
> > On Tue, Nov 16, 2021, 10:47 PM Clebert Suconic <
> clebert.suco...@gmail.com>
> > wrote:
> >
> > > I’m not sure how you mean.
> > >
> > > Just get the Pom at the source level or am intermediate build process ?
> > >
> > >
> > > How to do that ?
> > >
> > > On Tue, Nov 16, 2021 at 11:34 PM Matt Benson 
> wrote:
> > >
> > > > You probably want to rewrite the pom, using the property provided by
> the
> > > > shade goal for this purpose.
> > > >
> > > > Matt
> > > >
> > > > On Tue, Nov 16, 2021, 7:48 PM Clebert Suconic <
> clebert.suco...@gmail.com
> > > >
> > > > wrote:
> > > >
> > > > > I am trying to create a component within ActiveMQ Artemis that
> would
> > > > > shade johnzon and javax.json.
> > > > >
> > > > > That component should then be used by other components within
> Artemis.
> > > > >
> > > > > I'm doing that because some users want to use javax.json and others
> > > > > want to use jakarta.json on their runtimes. Since we only use json
> > > > > internally I am trying to shade our own usage and not relay on
> either
> > > > > one of these package names.
> > > > >
> > > > >
> > > > > However I'm getting crazy on this. I can't make shade to hide the
> > > > > dependency. mvn dependency:tree still shows the libraries. and
> shade
> > > > > will not work if I make them provided.e.
> > > > >
> > > > >
> > > > > What is the right way to shade within my own project?
> > > > >

Re: Help with Shading on ActiveMQ Artemis

2021-11-17 Thread Matt Benson
https://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#createDependencyReducedPom

On Tue, Nov 16, 2021, 10:47 PM Clebert Suconic 
wrote:

> I’m not sure how you mean.
>
> Just get the Pom at the source level or am intermediate build process ?
>
>
> How to do that ?
>
> On Tue, Nov 16, 2021 at 11:34 PM Matt Benson  wrote:
>
> > You probably want to rewrite the pom, using the property provided by the
> > shade goal for this purpose.
> >
> > Matt
> >
> > On Tue, Nov 16, 2021, 7:48 PM Clebert Suconic  >
> > wrote:
> >
> > > I am trying to create a component within ActiveMQ Artemis that would
> > > shade johnzon and javax.json.
> > >
> > > That component should then be used by other components within Artemis.
> > >
> > > I'm doing that because some users want to use javax.json and others
> > > want to use jakarta.json on their runtimes. Since we only use json
> > > internally I am trying to shade our own usage and not relay on either
> > > one of these package names.
> > >
> > >
> > > However I'm getting crazy on this. I can't make shade to hide the
> > > dependency. mvn dependency:tree still shows the libraries. and shade
> > > will not work if I make them provided.e.
> > >
> > >
> > > What is the right way to shade within my own project?
> > >
> > >
> > > I have the project available on my own github fork here:
> > >
> > > https://github.com/clebertsuconic/activemq-artemis/tree/commons-json
> > >
> > > (type this if you can download my branch:
> > >
> > > git clone https://github.com/clebertsuconic/activemq-artemis.git
> > > cd activemq-artemis
> > > git clone commons-json
> > > mvn install -DskipTests=true
> > > mvn dependency:tree
> > >
> > > and here is what gets interesting.
> > > if I go to artemis-selector (a package that relied on
> > > artemis-commons-json) and type mvn dependency:tree on that package,
> > > the dependency does not show up.
> > >
> > >
> > > The issue is only when building the whole project...
> > >
> > >
> > > and I have played with quite a few options! )
> > >
> > >
> > >
> > > Any help would be appreciated ! :)
> > >
> > >
> > > Thanks
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > > For additional commands, e-mail: users-h...@maven.apache.org
> > >
> > >
> >
> --
> Clebert Suconic
>


Re: Help with Shading on ActiveMQ Artemis

2021-11-16 Thread Matt Benson
You probably want to rewrite the pom, using the property provided by the
shade goal for this purpose.

Matt

On Tue, Nov 16, 2021, 7:48 PM Clebert Suconic 
wrote:

> I am trying to create a component within ActiveMQ Artemis that would
> shade johnzon and javax.json.
>
> That component should then be used by other components within Artemis.
>
> I'm doing that because some users want to use javax.json and others
> want to use jakarta.json on their runtimes. Since we only use json
> internally I am trying to shade our own usage and not relay on either
> one of these package names.
>
>
> However I'm getting crazy on this. I can't make shade to hide the
> dependency. mvn dependency:tree still shows the libraries. and shade
> will not work if I make them provided.e.
>
>
> What is the right way to shade within my own project?
>
>
> I have the project available on my own github fork here:
>
> https://github.com/clebertsuconic/activemq-artemis/tree/commons-json
>
> (type this if you can download my branch:
>
> git clone https://github.com/clebertsuconic/activemq-artemis.git
> cd activemq-artemis
> git clone commons-json
> mvn install -DskipTests=true
> mvn dependency:tree
>
> and here is what gets interesting.
> if I go to artemis-selector (a package that relied on
> artemis-commons-json) and type mvn dependency:tree on that package,
> the dependency does not show up.
>
>
> The issue is only when building the whole project...
>
>
> and I have played with quite a few options! )
>
>
>
> Any help would be appreciated ! :)
>
>
> Thanks
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Maven enforcer plugin regarding child module's groupId

2021-08-31 Thread Matt Benson
At that rate, they can also disable the execution of said enforcer rule.

Matt

On Tue, Aug 31, 2021, 10:31 AM David Hoffer  wrote:

> They can delete/change/not do that.   I'd like to put the rule in a parent
> POM that enforces in a way that can't easily be removed.
>
> -Dave
>
> On Tue, Aug 31, 2021 at 8:41 AM Delany  wrote:
>
> > Instead of policing deviations with a rule, why not make this possible at
> > the outset?
> >
> > ${project.parent.groupId}.${project.parent.artifactId}
> >
> > Delany
> >
> >
> > On Tue, 31 Aug 2021 at 16:29, David Hoffer  wrote:
> >
> > > I'd love to see that added to the included rules in the enforcer
> plugin.
> > >
> > > -Dave
> > >
> > > On Tue, Aug 31, 2021 at 6:53 AM Matt Benson 
> wrote:
> > >
> > > > On Tue, Aug 31, 2021, 3:28 AM Delany 
> > wrote:
> > > >
> > > > > Good question. There seems no way to do this dynamically in Maven
> 3.x
> > > > > Delany
> > > > >
> > > > > On Mon, 30 Aug 2021 at 20:45, David Hoffer 
> > wrote:
> > > > >
> > > > > > How to enforce that child modules append to the parent groupId
> per
> > > the
> > > > > > Maven
> > > > > > Guide to Naming Conventions
> > > > > > <
> http://maven.apache.org/guides/mini/guide-naming-conventions.html
> > >
> > > ?
> > > > > >
> > > > >
> > > >
> > > > It would seem that writing a custom enforcer rule to do this would be
> > > > trivial.
> > > >
> > > > Matt
> > > >
> > > >
> > > > > -Dave
> > > > > >
> > > > >
> > > >
> > >
> >
>


Re: Maven enforcer plugin regarding child module's groupId

2021-08-31 Thread Matt Benson
On Tue, Aug 31, 2021, 3:28 AM Delany  wrote:

> Good question. There seems no way to do this dynamically in Maven 3.x
> Delany
>
> On Mon, 30 Aug 2021 at 20:45, David Hoffer  wrote:
>
> > How to enforce that child modules append to the parent groupId per the
> > Maven
> > Guide to Naming Conventions
> >   ?
> >
>

It would seem that writing a custom enforcer rule to do this would be
trivial.

Matt


> -Dave
> >
>


Re: API for annotation scanning in a mojo?

2016-07-15 Thread Matt Benson
Paul,
  If you decide that scanning of classfiles is what you want to do, Apache
Commons Weaver [1] provides the opportunity to do this and create, modify
or delete classfiles or other resources in the target directory.
Additionally logging is supported; there is of course a
commons-weaver-maven-plugin [2]. As for working this into your own mojo, I
suppose you could program against Commons Weaver's core framework [3].

HTH,
Matt

[1] http://commons.apache.org/proper/commons-weaver/
[2] http://commons.apache.org/proper/commons-weaver/#maven
[3] http://commons.apache.org/proper/commons-weaver/#core


On Fri, Jul 15, 2016 at 2:23 AM, Christofer Dutz 
wrote:

> Hi Paul,
>
>
> Have you thought about writing a Java annotation processor and hooking
> that up in the compiler plugin? I think this is exactly what I would use if
> I want to do something like that.
>
>
> <
> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths
> >
>
>
> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessors
>
>
> Chris
>
> 
> Von: Paul Benedict 
> Gesendet: Mittwoch, 13. Juli 2016 23:13:41
> An: Apache Maven Users
> Betreff: API for annotation scanning in a mojo?
>
> Is there any existing API in any of these projects [1] for scanning
> annotations? I am writing a Mojo and want to scan either the project's
> source files or binary files -- haven't decided. The answer will depend on
> what APIs are available to me.
>
> [1] https://maven.apache.org/ref/3.3.9/index.html
>
> Cheers,
> Paul
>


Re: Maven compile crush while ANT pass

2016-02-02 Thread Matt Benson
On Tue, Feb 2, 2016 at 7:06 AM, Anders Hammar  wrote:
> On Tue, Feb 2, 2016 at 1:13 PM, Eyal Goren  wrote:
>
>>
>> How can you tell in ANT what is the encoding ?

Ant's javac task has an encoding attribute.

Matt

>>
>
> I don't know.
>
> /Anders
>
>
>
>>
>>
>>
>> --
>> View this message in context:
>> http://maven.40175.n5.nabble.com/Maven-compile-crush-while-ANT-pass-tp5860680p5860682.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Filtering resources

2016-01-12 Thread Matt Benson
If you just want to get it done, use the maven-antrun-plugin with Ant
filtersets.

Matt

On Tue, Jan 12, 2016 at 4:14 PM, Thomas Sundberg  wrote:
> Hi!
>
> I need to be able to filter files where the values to replace are defind as
>
> @aPlaceHolderThatNeedToBeSubstituted@
>
> Does anyone know of a good, working example where a custom resource
> filter is implemented?
>
> I had a look at
> http://maven.apache.org/plugins/maven-resources-plugin/examples/custom-resource-filters.html
> and it is a bit sketchy. A complete, annotated example would be nice
> where all details needed to implement this interface
> MavenResourcesFiltering are shared.
>
> A Git repo to clone would be the most awesome tip I can think of.
>
> Cheers,
> Thomas
>
> --
> Thomas Sundberg
> M. Sc. in Computer Science
>
> Mobile: +46 70 767 33 15
> Blog: http://thomassundberg.wordpress.com/
> Twitter: @thomassundberg
>
> Better software through faster feedback
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Maven Shad Plugin with AWS Java SDK

2015-06-25 Thread Matt Benson
In my experience you must relocate each individual package; simply
relocating org.apache.http is not sufficient.

Matt
On Jun 25, 2015 6:11 AM, mmccar...@tribloom.com mmccar...@tribloom.com
wrote:

 I have been attempting to shade[1] the AWS Java SDK[2] version 1.10.1,
 specifically the S3 SDK, to relocate the Apache HTTPCompontents[3]
 libraries. I am attempting to do this in order to resolve a dependency
 conflict with another more complicated project which is also dependent on
 an older version of HTTPComponents. So far I have been unsuccessful and
 can't determine if it is misconfiguration or an issue with the plugin. I
 hope it is the former.

 First I added a Maven Shade configuration to the aws-java-sdk-core pom.xml:
 plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-shade-plugin/artifactId
version2.4/version
configuration
   artifactSet
  includes
 includecom.amazonaws:*/include
 includeorg.apache.httpcomponents:*/include
  /includes
   /artifactSet
   relocations
  relocation
 patternorg.apache.http/pattern
 shadedPatternorg.shaded.http/shadedPattern
  /relocation
   /relocations
/configuration
executions
   execution
  phasepackage/phase
  goals
 goalshade/goal
  /goals
   /execution
/executions
 /plugin

 This seems to work fine and produces a jar that seems to be as expected
 when I build the project using mvn clean install -Dgpg.skip=true
 -DskipTests=true, although I haven't tested it. Second, I modify the
 aws-java-sdk-s3 pom.xml as follows:
 plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-shade-plugin/artifactId
version2.4/version
configuration
   shadeSourcesContenttrue/shadeSourcesContent
   createSourcesJartrue/createSourcesJar
   artifactSet
  includes
 includecom.amazonaws:*/include
 includeorg.apache.httpcomponents:*/include
  /includes
   /artifactSet
   relocations
  relocation
 patternorg.apache.http/pattern
 shadedPatternorg.shaded.http/shadedPattern
  /relocation
   /relocations
/configuration
executions
   execution
  phasepackage/phase
  goals
 goalshade/goal
  /goals
   /execution
/executions
 /plugin

 By itself this produces build errors like this:
 [ERROR]
 \dev\CSJ\aws\aws-sdk-java-1.10.1\aws-java-sdk-s3\src\main\java\com\amazonaws\services\s3\model\S3ObjectInputStream.java:[20,29]
 error: package org.apache.http.client does not exist

 So I added an explicit dependency on HTTPComponents to the S3 pom.xml:
 dependency
groupIdorg.apache.httpcomponents/groupId
artifactIdhttpclient/artifactId
version4.3.6/version
 /dependency

 When I build I get only one error:
 [ERROR]
 \dev\CSJ\aws\aws-sdk-java-1.10.1\aws-java-sdk-s3\src\main\java\com\amazonaws\services\s3\internal\S3ObjectResponseHandler.java:[54,26]
 error: no suitable constructor found for
 S3ObjectInputStream(InputStream,org.shaded.http.client.methods.HttpRequestBase)

 It appears to me that the shading is not actually relocating the
 http.client.methods.HttpRequestBase argument to the S3ObjectInputStream
 class within the code. Running javap confirms this:
 $ javap
 target/classes/com/amazonaws/services/s3/model/S3ObjectInputStream.class
 Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
 Compiled from S3ObjectInputStream.java
 public class com.amazonaws.services.s3.model.S3ObjectInputStream extends
 com.amazonaws.internal.SdkFilterInputStream {
   public
 com.amazonaws.services.s3.model.S3ObjectInputStream(java.io.InputStream,
 org.apache.http.client.methods.HttpRequestBase);
   public
 com.amazonaws.services.s3.model.S3ObjectInputStream(java.io.InputStream,
 org.apache.http.client.methods.HttpRequestBase, boolean);
   public void abort();
   public org.apache.http.client.methods.HttpRequestBase getHttpRequest();
   public int available() throws java.io.IOException;
 }

 Can anyone point out if my configuration is wrong, my methodology is
 wrong, or the Maven Shade plugin is actually not behaving as expected?

 [1] http://maven.apache.org/plugins/maven-shade-plugin/index.html
 [2] https://github.com/aws/aws-sdk-java
 [3] https://hc.apache.org/

 Thanks,
 --
 Michael

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: [DISCUSS] In the event of adopting the owl as project mascot, what will we call it?

2014-11-25 Thread Matt Benson
From the peanut gallery: someone had complained that the owl as a
mascot disregarded the Yiddish origin of the term Maven. How about
naming the owl something like Abraham, Jacob, or Moses? :D

Matt

On Tue, Nov 25, 2014 at 5:05 AM, Stephen Connolly
stephen.alan.conno...@gmail.com wrote:
 http://people.apache.org/~stephenc/maven-logo-contest/maven-owl-final-large.png

 When I created this owl, I gave it the name Couché Tard which is a french
 nickname for an owl (literal translation: Sleeps Late)

 Early versions of this owl have ended up with the nickname Shotgun Owl
 due to the belly feathers being white in the initial versions, which some
 people thought made it look like it had been shot.

 Some people feel that we shouldn't name a mascot...

 As creator of the graphic, I could force the issue... but I would much
 rather if the community has a name that the community wants.

 Please provide your suggestions in this thread. If the owl is adopted as a
 mascot, we will have a second vote thread to confirm its name.

 I personally recommend a gender neutral name.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: [DISCUSS] In the event of adopting the owl as project mascot, what will we call it?

2014-11-25 Thread Matt Benson
How about a rabbinical owl?

Matt

On Tue, Nov 25, 2014 at 2:07 PM, Michael Osipov micha...@apache.org wrote:
 Am 2014-11-25 um 20:56 schrieb Matt Benson:

 From the peanut gallery: someone had complained that the owl as a

 mascot disregarded the Yiddish origin of the term Maven. How about
 naming the owl something like Abraham, Jacob, or Moses? :D


 That was me and I still highly dislike the connection between the owl (Greek
 wisdom) and Yiddish background.

 This always leads me the same question: Why the owl? Having sad that, I
 would love to see a stylized version of a Woody Allen type:
 http://popchassid.wpengine.netdna-cdn.com/wp-content/uploads/2013/07/maxresdefault.jpg

 Michael


 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: doxia markdown property expansion

2014-04-06 Thread Matt Benson
Thanks, Martin! The .vm suffix was indeed what I was missing. Turns
out it's documented at [1].

Matt
[1] 
https://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html#Filtering

On Sat, Apr 5, 2014 at 7:49 PM, Martin Gainty mgai...@hotmail.com wrote:
 assume your pom contains:
 build
 plugins
 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-site-plugin/artifactId
 dependencies
 dependency
 groupIdorg.kohsuke/groupId
 artifactIddoxia-module-markdown/artifactId
 version1.0/version
 /dependency
 /dependencies
  /plugin
 /plugins
 /build
 mvn site

 ..verify index.md exists..

 http://blog.akquinet.de/2012/04/12/maven-sites-reloaded/

 hth
 Martin
 __
 standard  goes here


 Date: Sat, 5 Apr 2014 15:31:06 -0500
 Subject: doxia markdown property expansion
 From: mben...@apache.org
 To: users@maven.apache.org


 Hi all,
 Is there a means for expanding project properties in markdown
 templates? I haven't yet found any example showing how to do it.

 Thanks,
 Matt

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



doxia markdown property expansion

2014-04-05 Thread Matt Benson
Hi all,
  Is there a means for expanding project properties in markdown
templates? I haven't yet found any example showing how to do it.

Thanks,
Matt

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: [MNG-5551] Java 8 + Maven status

2014-03-27 Thread Matt Benson
Oh, well... It's no secret that ASM 3, being interface-based, is wholly
incompatible with ASM 4, which took the approach of using abstract classes
to significantly reduce the amount of code needed to accomplish a given
task. ASM 5 claims to be compatible with 4, which is why I, not realizing
that the plugins in question were based on ASM 3, suggested that simply
dropping in the new jar should suffice. The good news is that the upgrade
process is not terribly onerous, if only someone steps to do it.

Matt
On Mar 27, 2014 5:25 AM, Mirko Friedenhagen mfriedenha...@gmail.com
wrote:

 Mark,

 the analyze goal depends on the
 org.apache.maven.shared:maven-dependency-analyzer:1.4 which depends on
 asm 3.3.1. The trunk already moved to 4.2. I will see what happens
 when switching to asm 5 :-)
 Regards Mirko
 --
 http://illegalstateexception.blogspot.com/
 https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
 https://bitbucket.org/mfriedenhagen/


 On Thu, Mar 27, 2014 at 5:45 AM, Mark Derricutt m...@talios.com wrote:
  What version of the maven-dependency-plugin?  I'm using 2.8 fine under
 JDK8
  and have been for some time - this is using the `copy-dependencies` goal
 and
  nothing else tho...
 
 
 
  On 27 Mar 2014, at 6:15, Steven Schlansker wrote:
 
  Java 8 has now been out for a week and Maven is still not really
  compatible.
  In particular, the maven-shade-plugin and maven-dependency-plugin do not
  work
  due to an old version of ASM that throws ArrayIndexOutOfBoundsException
 on
  Java 8 class files.

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: [MNG-5551] Java 8 + Maven status

2014-03-27 Thread Matt Benson
Oh, good news on the dependency plugin bit--I almost forgot that you had
mentioned its underlying library having already upgraded its trunk to
version 4. I was thinking more about jdependency, which supports the shade
plugin.

Matt
On Mar 27, 2014 7:22 AM, Matt Benson gudnabr...@gmail.com wrote:

 Oh, well... It's no secret that ASM 3, being interface-based, is wholly
 incompatible with ASM 4, which took the approach of using abstract classes
 to significantly reduce the amount of code needed to accomplish a given
 task. ASM 5 claims to be compatible with 4, which is why I, not realizing
 that the plugins in question were based on ASM 3, suggested that simply
 dropping in the new jar should suffice. The good news is that the upgrade
 process is not terribly onerous, if only someone steps to do it.

 Matt
 On Mar 27, 2014 5:25 AM, Mirko Friedenhagen mfriedenha...@gmail.com
 wrote:

 Mark,

 the analyze goal depends on the
 org.apache.maven.shared:maven-dependency-analyzer:1.4 which depends on
 asm 3.3.1. The trunk already moved to 4.2. I will see what happens
 when switching to asm 5 :-)
 Regards Mirko
 --
 http://illegalstateexception.blogspot.com/
 https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
 https://bitbucket.org/mfriedenhagen/


 On Thu, Mar 27, 2014 at 5:45 AM, Mark Derricutt m...@talios.com wrote:
  What version of the maven-dependency-plugin?  I'm using 2.8 fine under
 JDK8
  and have been for some time - this is using the `copy-dependencies`
 goal and
  nothing else tho...
 
 
 
  On 27 Mar 2014, at 6:15, Steven Schlansker wrote:
 
  Java 8 has now been out for a week and Maven is still not really
  compatible.
  In particular, the maven-shade-plugin and maven-dependency-plugin do
 not
  work
  due to an old version of ASM that throws
 ArrayIndexOutOfBoundsException on
  Java 8 class files.

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: [MNG-5551] Java 8 + Maven status

2014-03-26 Thread Matt Benson
Can't you declare ASM 5.0.1 as a plugin dependency as an interim measure?

Matt

On Wed, Mar 26, 2014 at 12:15 PM, Steven Schlansker
stevenschlans...@gmail.com wrote:
 Hello everyone,

 http://jira.codehaus.org/browse/MNG-5551

 Java 8 has now been out for a week and Maven is still not really compatible.
 In particular, the maven-shade-plugin and maven-dependency-plugin do not work
 due to an old version of ASM that throws ArrayIndexOutOfBoundsException on 
 Java 8 class files.

 http://jira.codehaus.org/browse/MSHADE-166
 http://jira.codehaus.org/browse/MDEP-439

 There may be more uses of the broken ASM, these are just the ones I've run 
 into.

 Is there any possibility of getting these fixed and released in the near 
 future?  It is frustrating
 to have Maven be broken on a now-considered-production JDK release.

 Thanks!
 Steven


 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Surefire + JUnit 4.7+

2010-09-11 Thread Matt Benson
Hello,
  I am working on a multi-module project that uses JUnit 3 tests.  I updated 
the parent POM to v2.6 of the surefire plugin and JUnit 4.8.1 and three classes 
fitting the pattern Test* that are not JUnit tests were picked up and now 
report errors initializing tests.  Googling brought me to 
http://jira.codehaus.org/browse/SUREFIRE-482 in which Kristian states that 
adding parallel configuration information to the surefire plugin's declaration 
should force the junit47 provider and this will not happen.  My parent pom now 
contains the plugin configuration:

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-surefire-plugin/artifactId
version2.6/version
configuration
  parallelclasses/parallel
/configuration
/plugin

For good measure, I also updated the surefire-report plugin to v2.6.  The 
module pom with the failures contains not one occurrence of the string 'sure', 
so *I* feel quite sure the parent plugin configuration is not being overridden. 
 Unfortunately, with a 'clean install' from my parent directory I still get the 
same failures in the child module.  I am perfectly fine with using the parallel 
configuration option to force the use of the junit47 provider; less so with 
annotating any class named Test* with @Ignore (though this does solve the 
problem).  I do note that the changelog for JUnit 4.8.2 says:

TestSuite(MyTestCase.class) should dynamically detect if MyTestCase is a 
TestCase

From this it strikes me that it would be nice to upgrade to junit 4.8.2, but 
I'd like to stick to artifacts in the central repo.  I guess this means my 
questions are:

1.  Do the experts agree that 4.8.2 is likely to (or has already been confirmed 
to) solve my problem?
2.  Does anyone have any clue why JUnit 4.8.2 has never made it into the 
central repo?  The easy answer is that they never put in an upload request; 
however, I don't see any JUnit upload requests since the one for 4.7 and that 
one apparently didn't even come from a JUnit developer.  What gives?

Thanks,
Matt

Re: Surefire + JUnit 4.7+

2010-09-11 Thread Matt Benson

On Sep 11, 2010, at 3:18 PM, Wayne Fay wrote:

 From this it strikes me that it would be nice to upgrade to junit 4.8.2, but
 I'd like to stick to artifacts in the central repo.  I guess this means my
 questions are:
 
 Neither question is particularly relevant to Maven -- I assume the
 JUnit folks can/should be able to answer them both. But if they don't
 use or care about Maven, then they won't include deploy artifacts to
 Central as part of their push a new release process, right?

That's all well and good, and I take your point.  But I'm still quite curious 
to know what mechanism has allowed the other artifacts into the central repo if 
the junit team themselves haven't been pushing for it.

-Matt

 
 Wayne
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org