Re: [SUREFIRE] No JUnit test run when TestNG is in class path
and I am using latest surefire 2.22.0 -D On Wed, Jun 20, 2018 at 8:39 PM, Dan Tran wrote: > > Hi > > I have junit4/5 and testng in the classpath and none of my junit tests got > invoked > > I this a correct behavior? > > I ended up to directly add junit-platform-surefire-provider to > surefire's dependency > > and I cant remove testng since we have legacy none test code uses testng > assert > > Thanks > > -Dan >
[SUREFIRE] No JUnit test run when TestNG is in class path
Hi I have junit4/5 and testng in the classpath and none of my junit tests got invoked I this a correct behavior? I ended up to directly add junit-platform-surefire-provider to surefire's dependency and I cant remove testng since we have legacy none test code uses testng assert Thanks -Dan
Re: Building maven plugin: Caused by: java.lang.ArrayIndexOutOfBoundsException: 3411 …
Aha! Of course! Why didn’t I think of checking for a newer version ? :-) Thanks! /Tommy På 20 juni 2018 till 20:46:09, Robert Scholte (rfscho...@apache.org(mailto:rfscho...@apache.org)) skrev: > It looks like you're hit by MPLUGIN-328[1] > Upgrading the maven-plugin-plugin to the latest version should fix your > issue. > > [1] https://issues.apache.org/jira/browse/MPLUGIN-328 > > On Wed, 20 Jun 2018 20:25:43 +0200, Tommy Svensson > wrote: > > > Hello, > > > > I keep getting this exception from maven when building a maven plugin: > > > > Caused by: java.lang.ArrayIndexOutOfBoundsException: 3411 > > at org.objectweb.asm.ClassReader.readClass(Unknown Source) > > at org.objectweb.asm.ClassReader.accept(Unknown Source) > > at org.objectweb.asm.ClassReader.accept(Unknown Source) > > at > > org.apache.maven.tools.plugin.annotations.scanner.DefaultMojoAnnotationsScanner.scanFile(DefaultMojoAnnotationsScanner.java:139) > > at > > org.apache.maven.tools.plugin.annotations.scanner.DefaultMojoAnnotationsScanner.scan(DefaultMojoAnnotationsScanner.java:85) > > at > > org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.scanAnnotations(JavaAnnotationsMojoDescriptorExtractor.java:125) > > at > > org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.execute(JavaAnnotationsMojoDescriptorExtractor.java:104) > > at > > org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:108) > > at > > org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:233) > > at > > org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute(DescriptorGeneratorMojo.java:92) > > at > > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) > > ... 21 more > > > > I have no idea what ”3411” means. If it is some error code it is not > > documented. I actually get no hits when googling on ”maven error codes”. > > The relevant parts of the plugin looks like this: > > > > @Mojo(name="doc", defaultPhase = LifecyclePhase.GENERATE_SOURCES) > > public class MarkdownDocMavenPlugin extends AbstractMojo { > > > > /** > > * Provides the options for which generator to run. > > */ > > @Parameter > > private GeneratorOptions generatorOptions; > > > > /** > > * Provides the options for the HTMLGenerator. These are only > > relevant if > > * generatorOptions.generator == "html". > > */ > > @Parameter > > private HTMLGeneratorOptions htmlGeneratorOptions; > > > > /** > > * Provides the options for the MarkdownGenerator. These are only > > relevant if > > * generatorOptions.generator == "md". > > */ > > @Parameter > > private MarkdownGeneratorOptions mdGeneratorOptions; > > > > /** > > * Provides the options for the PDFGenerator. These are only > > relevant if > > * generatorOptions.generator == "pdf". > > */ > > @Parameter > > private PDFGeneratorOptions pdfGeneratorOptions; > > > > /** > > * The projects base directory. > > */ > > @Parameter(property = "${basedir}”) private String baseDir; > > … > > /** > > * Executes this mojo. > > * > > * @throws MojoExecutionException on bad config and other failures. > > */ > > public void execute() throws MojoExecutionException { > > } > > … > > > > (The formatting got slightly screwed on paste above. ) > > > > The following dependencies for maven plugin is used: > > > > org.apache.maven > > maven-plugin-api > > 3.0 > > > > > > > > > > org.apache.maven.plugin-tools > > maven-plugin-annotations > > 3.4 > > provided > > > > > > So what I’m I missing here that triggers the > > ArrayIndexOutOfBoundsException ? I’m building with maven 3.3.9. > > I googled, googled, and googled, but found no answers. I’m hoping > > someone can explain this. My only other alternative is to go back to > > javadoc annotations and build with maven 3.0.5. > > Thanks! > > Tommy Svensson > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org >
Re: Building maven plugin: Caused by: java.lang.ArrayIndexOutOfBoundsException: 3411 …
It looks like you're hit by MPLUGIN-328[1] Upgrading the maven-plugin-plugin to the latest version should fix your issue. [1] https://issues.apache.org/jira/browse/MPLUGIN-328 On Wed, 20 Jun 2018 20:25:43 +0200, Tommy Svensson wrote: Hello, I keep getting this exception from maven when building a maven plugin: Caused by: java.lang.ArrayIndexOutOfBoundsException: 3411 at org.objectweb.asm.ClassReader.readClass(Unknown Source) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.apache.maven.tools.plugin.annotations.scanner.DefaultMojoAnnotationsScanner.scanFile(DefaultMojoAnnotationsScanner.java:139) at org.apache.maven.tools.plugin.annotations.scanner.DefaultMojoAnnotationsScanner.scan(DefaultMojoAnnotationsScanner.java:85) at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.scanAnnotations(JavaAnnotationsMojoDescriptorExtractor.java:125) at org.apache.maven.tools.plugin.annotations.JavaAnnotationsMojoDescriptorExtractor.execute(JavaAnnotationsMojoDescriptorExtractor.java:104) at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:108) at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:233) at org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute(DescriptorGeneratorMojo.java:92) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) ... 21 more I have no idea what ”3411” means. If it is some error code it is not documented. I actually get no hits when googling on ”maven error codes”. The relevant parts of the plugin looks like this: @Mojo(name="doc", defaultPhase = LifecyclePhase.GENERATE_SOURCES) public class MarkdownDocMavenPlugin extends AbstractMojo { /** * Provides the options for which generator to run. */ @Parameter private GeneratorOptions generatorOptions; /** * Provides the options for the HTMLGenerator. These are only relevant if * generatorOptions.generator == "html". */ @Parameter private HTMLGeneratorOptions htmlGeneratorOptions; /** * Provides the options for the MarkdownGenerator. These are only relevant if * generatorOptions.generator == "md". */ @Parameter private MarkdownGeneratorOptions mdGeneratorOptions; /** * Provides the options for the PDFGenerator. These are only relevant if * generatorOptions.generator == "pdf". */ @Parameter private PDFGeneratorOptions pdfGeneratorOptions; /** * The projects base directory. */ @Parameter(property = "${basedir}”)private String baseDir; … /** * Executes this mojo. * * @throws MojoExecutionException on bad config and other failures. */ public void execute() throws MojoExecutionException { } … (The formatting got slightly screwed on paste above. ) The following dependencies for maven plugin is used: org.apache.maven maven-plugin-api 3.0 org.apache.maven.plugin-tools maven-plugin-annotations 3.4 provided So what I’m I missing here that triggers the ArrayIndexOutOfBoundsException ? I’m building with maven 3.3.9. I googled, googled, and googled, but found no answers. I’m hoping someone can explain this. My only other alternative is to go back to javadoc annotations and build with maven 3.0.5. Thanks! Tommy Svensson - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org