Building java projects from sources ...

Petra Berg petra.berg at cms.hu-berlin.de
Fri Jan 11 06:05:17 EST 2019


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
petra.berg at cms.hu-berlin.de         D-10099 Berlin
___________________________________________________________________

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5411 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://shibboleth.net/pipermail/dev/attachments/20190111/05b22821/attachment.p7s>


More information about the dev mailing list