Skip to content

Commit

Permalink
[BYTEMAN-414] speed up compilation to skip tests and doc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ochaloup authored and adinn committed Jul 20, 2021
1 parent de190c5 commit c66b7b9
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 4 deletions.
11 changes: 11 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ or application code.
(n.b. these examples still need extending to show how to use Byteman
for fault injection based testing).

Compiling Byteman
-----------------

To compile source code use Maven command `mvn clean install`.
Byteman will be compiled, the command generates documentation
and distribution artifacts can be found at `download/target`.

To speed-up compilation you can skip tests and generating
the documentation with
`mvn clean install -DskipITs -DskipTests -DskipDocs`.

Copyright
---------
See the copyright file in the docs directory for details of the open
Expand Down
5 changes: 5 additions & 0 deletions agent/noverification.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<verifications xmlns="http://maven.apache.org/verifications/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/verifications/1.0.0 http://maven.apache.org/xsd/verifications-1.0.0.xsd">
<!-- empty verification for purpose to skip maven-verification-plugin -->
</verifications>
2 changes: 1 addition & 1 deletion agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2375,7 +2375,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-verifier-plugin</artifactId>
<configuration>
<verificationFile>verification.xml</verificationFile>
<verificationFile>${agent.verification.file}</verificationFile>
<failOnError>true</failOnError>
</configuration>
<executions>
Expand Down
28 changes: 27 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@
<debug.args>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 -Dorg.jboss.byteman.verbose</debug.args>
<!-- asm release version to use -->
<asm.version>9.1</asm.version>
<!-- maven-verification-plugin -->
<tests.verification.file>access-verification.xml</tests.verification.file>
<agent.verification.file>verification.xml</agent.verification.file>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -422,11 +425,34 @@
<module>contrib/dtest</module>
<module>contrib/rulecheck-maven-plugin</module>
<module>sample</module>
<module>docs</module>
<module>download</module>
<!-- docs module is activated in profile 'default-with-docs' -->
</modules>

<profiles>
<profile>
<id>default-with-docs</id>
<activation>
<property>
<name>!skipDocs</name>
</property>
</activation>
<modules>
<module>docs</module>
</modules>
</profile>
<profile>
<id>skip-integration-test-skips-verification</id>
<activation>
<property>
<name>skipITs</name>
</property>
</activation>
<properties>
<tests.verification.file>noverification.xml</tests.verification.file>
<agent.verification.file>noverification.xml</agent.verification.file>
</properties>
</profile>
<profile>
<!-- normally tools jar is in ../lib/tools.jar -->
<id>default-toolsjar-profile</id>
Expand Down
5 changes: 5 additions & 0 deletions tests/noverification.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<verifications xmlns="http://maven.apache.org/verifications/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/verifications/1.0.0 http://maven.apache.org/xsd/verifications-1.0.0.xsd">
<!-- empty verification for purpose to skip maven-verification-plugin -->
</verifications>
4 changes: 2 additions & 2 deletions tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2303,8 +2303,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-verifier-plugin</artifactId>
<configuration>
<verificationFile>../agent/verification.xml</verificationFile>
<verificationFile>access-verification.xml</verificationFile>
<verificationFile>../agent/${agent.verification.file}</verificationFile>
<verificationFile>${tests.verification.file}</verificationFile>
<failOnError>true</failOnError>
</configuration>
<executions>
Expand Down

0 comments on commit c66b7b9

Please sign in to comment.