Building java projects from sources ...

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Building java projects from sources ...

Petra Berg
Hello all,

... for better understanding and little local patches I deploy the
current IdP packages by local build from GIT-sources.

Unfortunately, there are always some packages where tests fail (out of
the box from GIT) and no test packages are generated. I think it's not a
problem, but test packages are reused for tests in other packages, so
there are dependencies.
Maven needs to go through all dependencies before building the project -
independent of scope.
That means, to build the hole project without tests (-DskipTests
option), I need to temporary deactivate lots of test dependencies.

To avoid this, I found a trick:
For ignoring the test-scoped dependencies in case of skipping tests by
skipTests property, I defined a profile with activation condition and
moved all test-scoped dependencies there.

Just add a profiles section in POM file:

     <profiles>
         <profile>
               <activation>
                 <property>
                     <name>skipTests</name>
                     <value>!true</value>
                 </property>
               </activation>
               <dependencies>
                 <!-- test-scoped dependencies -->
             </dependencies>
         </profile>
     </profiles>

and move all test dependencies into it.
May I ask for this little change in the next release?


Best regards,
Petra Berg

--

___________________________________________________________________

Petra Berg                          Humboldt-Universitaet zu Berlin
Tel.: +49 (0)30-2093 70155          ZE Computer- und Medienservice
Fax:  +49 (0)30-2093 70135          Unter den Linden 6
[hidden email]         D-10099 Berlin
___________________________________________________________________


--
To unsubscribe from this list send an email to [hidden email]

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Building java projects from sources ...

Rod Widdowson
I'm not qualified to answer your question, but I know others will..

However I'd like to understand:

> Unfortunately, there are always some packages where tests fail (out of
> the box from GIT) and no test packages are generated.

Which tests?  Which architecture?  

Windows can be flaky and I've never had time to bottom it out (or when I had time I forgot), but mostly I can and do build fine so it would be useful to understand what's up...


--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Building java projects from sources ...

Cantor, Scott E.
In reply to this post by Petra Berg
On 1/11/19, 6:05 AM, "dev on behalf of Petra Berg" <[hidden email] on behalf of [hidden email]> wrote:

> That means, to build the hole project without tests (-DskipTests
> option), I need to temporary deactivate lots of test dependencies.

There's no reason you should need to do that (apart from speed). We have tests that depend on the server but they should run from anywhere.

-- Scott


--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Building java projects from sources ...

Petra Berg
In reply to this post by Rod Widdowson
>> Unfortunately, there are always some packages where tests fail (out of
>> the box from GIT) and no test packages are generated.
> Which tests?  Which architecture?
>
> Windows can be flaky and I've never had time to bottom it out (or when I had time I forgot), but mostly I can and do build fine so it would be useful to understand what's up...
OK, I found the first fail in idp-cas-impl project, where test-suite
starts a jetty. Because of a local running tomcat and occupied address,
that failed with a java.net.BindException.
With stopped local tomcat, build finished successfully.
My build system is a debian linux (buster/sid).

Thanks,
Petra

--
___________________________________________________________________

Petra Berg                          Humboldt-Universitaet zu Berlin
Tel.: +49 (0)30-2093 70155          ZE Computer- und Medienservice
Fax:  +49 (0)30-2093 70135          Unter den Linden 6
[hidden email]         D-10099 Berlin
___________________________________________________________________



--
To unsubscribe from this list send an email to [hidden email]

smime.p7s (7K) Download Attachment