Actually, it does not.

The problem is that the IT:s in mojo-parent version 50 are run with
Cobertura instrumentation.
The implication of this is that the POM of each IT needs the Cobertura
depdendency *within the plugin dependencies* when running the *mvn site*
goal.
So ... I would really need to programmatically adjust the dependencies of
the plugin *only when running the ITs of the project itself*.


   1. Is there a convenient way to do that using the capabilities of the
   Maven-Invoker-Plugin?
   2. I would like *not* to have to add this dependency to all IT POMs; it
   has a code smell.
   3. How have other plugins requiring compilation dealt with this? (Or are
   they simply not using cobertura?)


<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>jaxb2-maven-plugin</artifactId>
    <version>@project.version@</version>
    <executions>
        <execution>
            <id>schemagen</id>
            <goals>
                <goal>schemagen</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <!-- Whatever is needed for the IT -->
    </configuration>

        <!-- This dependency is required to execute mvn site in
Mojo-Parent version 50 -->







* <dependencies> <dependency> <groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura</artifactId> <version>2.1.1</version> </dependency>
</dependencies>*
</plugin>


On Tue, Jul 9, 2019 at 8:00 AM Jochen Wiedmann <[email protected]>
wrote:

> According to https://github.com/cobertura/cobertura/issues/128, it
> helps to add a dependency on net.sourceforge.cobertura:cobertura.
>
> Jochen
>
> On Sun, Jul 7, 2019 at 11:49 PM Lennart Jörelid
> <[email protected]> wrote:
> >
> > Hello all,
> >
> > I have come across a rather interesting situation; the
> Jaxb2-Maven-Plugin is ready for a release sporting - among other things -
> Java 11 and Http Proxy support.
> > However, I cannot generate the site due to a cobertura-related error
> where it seems that the Cobertura-Maven-Plugin by default attempts to
> instrument the integration tests of the plugin.
> >
> > This seems to fail, and hence the site cannot be properly generated.
> > What is the workaround here?
> >
> > The simplest way to check is to clone the repo at 
> > ([email protected]:mojohaus/jaxb2-maven-plugin.git),
> build the plugin and build the site.
> > Building the site is done using:
> >
> > mvn -Pmojo-release clean deploy
> >
> > .. which eventually fires the ITs and generates the following (which is
> only generated by the site plugin; not the building of the plugin iself):
> >
> > Caused by: java.lang.NoClassDefFoundError:
> net/sourceforge/cobertura/coveragedata/LightClassmapListener
> >     at java.lang.Class.getDeclaredMethods0 (Native Method)
> >     at java.lang.Class.privateGetDeclaredMethods (Class.java:2701)
> >     at java.lang.Class.getDeclaredMethods (Class.java:1975)
> >     at com.google.inject.spi.InjectionPoint.getInjectionPoints
> (InjectionPoint.java:688)
> >     at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields
> (InjectionPoint.java:380)
> >     at
> com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies
> (ConstructorBindingImpl.java:164)
> >     at com.google.inject.internal.InjectorImpl.getInternalDependencies
> (InjectorImpl.java:613)
> >
> > --
> > +==============================+
> > | Bästa hälsningar,
> > | [sw. "Best regards"]
> > |
> > | Lennart Jörelid
> > | EAI Architect & Integrator
> > |
> > | jGuru Europe AB
> > | Mölnlycke - Kista
> > |
> > | Email: [email protected]
> > | URL:   www.jguru.se
> > | Phone
> > | (skype):    jgurueurope
> > | (intl):     +46 708 507 603
> > | (domestic): 0708 - 507 603
> > +==============================+
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "mojohaus-dev" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> > To post to this group, send email to [email protected].
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojohaus-dev/a06d5a26-d73c-4d51-9981-074ba46fa12a%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "mojohaus-dev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mojohaus-dev/uSZ83oGUEkQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mojohaus-dev/CAF8HOZKVc-6abVUen4EB_1XceqoP_FPS4M-jEi--mtTGqUaHrw%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

--
+==============================+
| Bästa hälsningar,
| [sw. "Best regards"]
|
| Lennart Jörelid
| EAI Architect & Integrator
|
| jGuru Europe AB
| Mölnlycke - Kista
|
| Email: [email protected]
| URL:   www.jguru.se
| Phone
| (skype):    jgurueurope
| (intl):     +46 708 507 603
| (domestic): 0708 - 507 603
+==============================+

-- 
You received this message because you are subscribed to the Google Groups 
"mojohaus-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mojohaus-dev/CAJ1fz80Q2Rca2uOzdEEpfS_9g3dQDWQt0miMfm7oV-rjEizptg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to