Skip to content
Snippets Groups Projects
pom.xml 47 KiB
Newer Older
						</configuration>
					</execution>
				</executions>
				<configuration>
					<skipAssembly>${skip.artifact.creation}</skipAssembly>
				</configuration>
			<!-- ============================= Sign executable jar files ============================ -->
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jarsigner-plugin</artifactId>
				<version>1.4</version>
				<executions>
					<execution>
						<id>sign-win-jars</id>
						<phase>package</phase>
						<goals>
							<goal>sign</goal>
						</goals>
						<configuration>
							<skip>${jarsigner.skip}</skip>
							<verbose>false</verbose>
							<processMainArtifact>false</processMainArtifact>
							<processAttachedArtifacts>false</processAttachedArtifacts>
							<archiveDirectory>target/win-jars</archiveDirectory>
							<keystore>${signer-keystore-path}</keystore>
							<storetype>${signer-keystore-type}</storetype>
							<alias>${signer-keystore-alias}</alias>
							<storepass>${signer-keystore-password}</storepass>
							<keypass>${signer-keystore-password}</keypass>
							<removeExistingSignatures>true</removeExistingSignatures>
							<tsa>http://timestamp.comodoca.com/rfc3161</tsa>
						</configuration>
					</execution>
					<execution>
						<id>sign-default-jars</id>
						<phase>package</phase>
						<goals>
							<goal>sign</goal>
						</goals>
						<configuration>
							<skip>${jarsigner.skip}</skip>
							<verbose>false</verbose>
							<processMainArtifact>false</processMainArtifact>
							<processAttachedArtifacts>false</processAttachedArtifacts>
							<archiveDirectory>target/jars</archiveDirectory>
							<keystore>${signer-keystore-path}</keystore>
							<storetype>${signer-keystore-type}</storetype>
							<alias>${signer-keystore-alias}</alias>
							<storepass>${signer-keystore-password}</storepass>
							<keypass>${signer-keystore-password}</keypass>
							<removeExistingSignatures>true</removeExistingSignatures>
							<tsa>http://timestamp.comodoca.com/rfc3161</tsa>
						</configuration>
					</execution>
				</executions>
			</plugin>


			<!-- ==========================   Create release zips ============================ -->
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>create-unix-release</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
			            <configuration>
			                <appendAssemblyId>false</appendAssemblyId>
			                <outputDirectory>${unix.release.folder}</outputDirectory>
			                <descriptors>
								<descriptor>src/assembly/unix-release-assembly.xml</descriptor>
							</descriptors>
			                <finalName>${unix.release.filename}</finalName>
			            </configuration>
					</execution>
					<execution>
						<id>create-windows-release</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
			            <configuration>
			                <appendAssemblyId>false</appendAssemblyId>
			                <outputDirectory>${windows.release.folder}</outputDirectory>
			                <descriptors>
								<descriptor>src/assembly/windows-release-assembly.xml</descriptor>
							</descriptors>
							<finalName>${windows.release.filename}</finalName>
			            </configuration>
					</execution>
				</executions>
				<configuration>
					<skipAssembly>${skip.artifact.creation}</skipAssembly>
				</configuration>
			</plugin>
      
		</plugins>
		
		<pluginManagement>
		    <plugins>
		    		<!-- We need this next bit to get rid of a warning on the enforcer plugin in Eclipse -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-enforcer-plugin</artifactId>
										<versionRange>[1.3.1,)</versionRange>
										<goals>
											<goal>enforce</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				
				<!-- ============= Special task used on an ad-hoc basis to create EvoSuite tests ============ -->
			
				<plugin>
			        <groupId>org.evosuite.plugins</groupId>
			        <artifactId>evosuite-maven-plugin</artifactId>
			        <version>${evosuite.plugin.version}</version>
			        <executions>
			        		<execution>
			        			<id>create-evosuite-tests</id>
	         				<goals> 
	         					<goal>prepare</goal> 
	         				</goals>
	         				<phase>process-test-classes</phase>
	      				</execution>
	      			</executions>
	      			<configuration>
	      				<extraArgs>-Dsearch_budget=90 -Dconsider_main_methods=false -Duse_separate_classloader=false</extraArgs>
	      			</configuration>
				</plugin>
				<!-- =========== Check for plugin updates ================== -->
				<!--        Use: mvn versions:display-plugin-updates         -->
				<plugin>
				    <groupId>org.codehaus.mojo</groupId>
				    <artifactId>versions-maven-plugin</artifactId>
				    <version>2.7</version>
				    <configuration>
				        <generateBackupPoms>false</generateBackupPoms>
				    </configuration>
				</plugin>
				
				<!--  
					Deploy artifacts to a GitHub release - run manually using: 
					mvn github-release:release
				-->
				<!--  plugin>
					<groupId>de.jutzig</groupId>
					<artifactId>github-release-plugin</artifactId>
					<version>1.2.0</version>
					<inherited>false</inherited>
					<configuration>
						<description>See ChangeLog for details</description>
						<releaseName>Release v${project.version}</releaseName>
						<tag>v${project.version}</tag>
						<draft>true</draft>
						<artifact>${unix.release.folder}/${unix.release.filename}</artifact>
						<fileSets>
							<fileSet>
								<includes>
									<include>${osx.app.folder}/${osx.release.filename}.dmg</include>
									<include>${windows.release.folder}/${windows.release.filename}</include>
									<include>${project.basedir}/ChangeLog</include>
								</includes>
							</fileSet>
						</fileSets>
					</configuration>
				</plugin -->
			</plugins>
  		</pluginManagement>
  
	</build>
	
	<reporting>
	
		<plugins>
			<!-- Javadoc -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<skip>${skip.javadoc}</skip>
					<failOnError>false</failOnError>
					<quiet>true</quiet>
					<excludePackageNames>org.*</excludePackageNames>
					<excludes>**/*Test.java, **/*_scaffolding*.java</excludes>
				</configuration>
				<reportSets>
					<reportSet>
						<reports>
							<report>javadoc-no-fork</report>
							<report>test-javadoc-no-fork</report>
						</reports>
					</reportSet>
				</reportSets>
	<!-- ========================== Profile section =================================-->
	
	<profiles>
	        <id>old-java8-profile-deprecated</id>
	        <!-- This profile runs all unit tests including Evosuite ones on Java 8. -->
	        <!-- Note however that some code changes will now be needed to compile on Java 8. -->
	        <activation>
      			<jdk>1.8</jdk>
    		</activation>
	        <properties>
	            <build.profile.id>java8-profile</build.profile.id>
	        </properties>
	        <build>
	        		<plugins>

					<!--  
						Compiling with Java 8 JDK... the compiler does not have the -release parameter, 
						so we fall back to source and target 
					-->
					<plugin>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.8.0</version>
						<configuration>
							<verbose>false</verbose>
		        				<source>1.8</source>
								<target>1.8</target>
		    				</configuration>
					</plugin>
					
	        			<plugin>
		                <groupId>org.apache.maven.plugins</groupId>
		                <artifactId>maven-surefire-plugin</artifactId>
		                <version>2.22.1</version>
		              	<configuration>
		                    <skipTests>${skip.tests}</skipTests>
		                    <trimStackTrace>true</trimStackTrace>
		                    <forkCount>${surefire.num.forks}</forkCount>
		                    <reuseForks>false</reuseForks>
		                    <testFailureIgnore>${ignore.test.failures}</testFailureIgnore>
		                    <argLine>@{surefireArgLine}</argLine>
		          			<excludes>
		 		
								<!--  Start of Evosuite excludes -->
								<exclude>${evosuite.exclude.filter}</exclude>
								<exclude>org/gmod/**</exclude>
			          			<exclude>**/j2ssh/**</exclude>
		    					<!--  End of Evosuite excludes -->
		    						
		    					<!--  Exclude manual adhoc tests -->
								<exclude>**/RunBlastAtNCBITest.*</exclude>
								<exclude>**/TestIbatisDAO.*</exclude>
								<exclude>**/TestJdbcDAO.*</exclude>
		    						
		          			</excludes>
		          			
		          			<!-- Required when running Evosuite tests along with normal tests -->
		          			<properties>
								<property>
									<name>listener</name>
									<value>org.evosuite.runtime.InitializingListener</value>
						      	</property>
						    </properties>
		                </configuration>
		            </plugin>
		            
	        		</plugins>
	        </build>
	    <profile>
	        <id>mac-osx-dmg-packaging</id>
	        <!-- 
	        		App/dmg packaging that can only be run on a Mac.
	         -->
	        <activation>
		        <os> 
			    	<family>mac</family>
			    </os>
			</activation>
	        <properties>
	            <build.profile.id>mac-osx-dmg-packaging</build.profile.id>
	        </properties>
	        <build>
	        		<plugins>
	        		
	        			<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-antrun-plugin</artifactId>
							<version>1.8</version>
							<executions>
								<execution>
									<id>build-macosx</id>
									<phase>verify</phase>
									<configuration>
										<skip>${skip.artifact.creation}</skip>
										<target>
								            <ant antfile="${project.basedir}/src/assembly/macosx-release-assembly.xml">
								            	<target name="bundle-mac-osx"/>
								                <target name="bundle-mac-osx-chado"/>
								            </ant>
								        </target>
									</configuration>
									<goals>
										<goal>run</goal>
									</goals>
								</execution>
							</executions>
						</plugin>
					
	        		</plugins>
	        	</build>
		</profile>
	    
	        <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
	        <properties>
	        		<skip.tests>false</skip.tests>
        			<evosuite.exclude.filter></evosuite.exclude.filter>
        			<jarsigner.skip>false</jarsigner.skip>
        			<skip.artifact.creation>false</skip.artifact.creation>
        			<skip.coverage.reporting>false</skip.coverage.reporting>
        			<skip.javadoc>false</skip.javadoc>
	            <build.profile.id>release</build.profile.id>
	        </properties>  
	</profiles>
	
</project>