Setup"

From Documentation
 
(28 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{ZATSEssentialsPageHeader}}
 
{{ZATSEssentialsPageHeader}}
  
= ZATS Mimic Setup =
+
= ZATS Mimic =
  
 
== Maven Project ==
 
== Maven Project ==
  
If your project is managed by Maven already, you can adopt ZATS Mimic easily by adding a dependency.
+
Please [[ZK_Installation_Guide/Setting_up_IDE/Maven/Use_ZK_Maven_Artifacts/Resolving_ZK_Framework_Artifacts_via_Maven#How_to_Use_ZK_Maven_Repository | setup zk Maven repository]] first.
  
For a project depends on ZK '''5.0.x''', add the following dependency:
+
{{versionSince|9.6.0}}
  
 +
===Java EE===
 
<source lang="xml">
 
<source lang="xml">
 +
    <dependency>
 +
      <groupId>org.zkoss.zats</groupId>
 +
      <artifactId>zats-mimic-ext96</artifactId>
 +
      <version>3.0.0</version>
 +
      <scope>test</scope>
 +
    </dependency>
 +
</source>
  
 +
Check [https://mavensync.zkoss.org/maven2/org/zkoss/zats/zats-mimic-ext96/ CE repository] for the latest version.
 +
 +
===Jakarta EE ===
 +
<source lang="xml">
 
     <dependency>
 
     <dependency>
 
       <groupId>org.zkoss.zats</groupId>
 
       <groupId>org.zkoss.zats</groupId>
 
       <artifactId>zats-mimic</artifactId>
 
       <artifactId>zats-mimic</artifactId>
       <version>1.0.0-RC</version>
+
       <version>4.0.0</version>
 +
      <scope>test</scope>
 +
    </dependency>
 +
</source>
 +
 
 +
Check [https://mavensync.zkoss.org/maven2/org/zkoss/zats/zats-mimic/ CE repository] for the latest version.
 +
 
 +
{{versionSince|7.0.0}}
 +
 
 +
Add the following dependency:
 +
 
 +
<source lang="xml">
 +
 
 +
    <dependency>
 +
      <groupId>org.zkoss.zats</groupId>
 +
      <artifactId>zats-mimic-ext7</artifactId>
 +
      <version>${zats-version}</version>
 
       <scope>test</scope>
 
       <scope>test</scope>
 
     </dependency>
 
     </dependency>
Line 20: Line 48:
 
</source>
 
</source>
  
For a project depends on ZK '''6.0.0''', add the following dependency:
+
 
 +
{{versionSince|6.0.0}}
 +
 
 +
Add the following dependency:
  
 
<source lang="xml">
 
<source lang="xml">
Line 27: Line 58:
 
       <groupId>org.zkoss.zats</groupId>
 
       <groupId>org.zkoss.zats</groupId>
 
       <artifactId>zats-mimic-ext6</artifactId>
 
       <artifactId>zats-mimic-ext6</artifactId>
       <version>1.0.0-RC</version>
+
       <version>${zats-version}</version>
 +
      <scope>test</scope>
 +
    </dependency>
 +
 
 +
</source>
 +
 
 +
{{versionSince|5.0.0}}
 +
Add the following dependency:
 +
 
 +
<source lang="xml">
 +
 
 +
    <dependency>
 +
      <groupId>org.zkoss.zats</groupId>
 +
      <artifactId>zats-mimic</artifactId>
 +
      <version>${zats-version}</version>
 
       <scope>test</scope>
 
       <scope>test</scope>
 
     </dependency>
 
     </dependency>
Line 33: Line 78:
 
</source>
 
</source>
  
Remember to also add dependencies of your preferred '''unit test framework''', e.g. JUnit or TestNG.
+
 
 +
Also remember to add dependencies of your preferred '''unit test framework''', e.g. JUnit or TestNG.
 +
 
 +
The above XML is just a sample, you can use another version available in [http://mavensync.zkoss.org/maven2/org/zkoss/zats/zats-mimic-ext6/ ZK Maven repository].
 +
 
 +
ZATS mimic depends on Jetty (<code>org.eclipse.jetty:jetty-webapp</code>) and Rhino (<code>org.mozilla:rhino</code>), and these dependencies are already configured in Mimic's pom.xml. Maven's dependency management will automatically include jetty-related jars. If not, please check your Maven setting.
  
 
== Manually ==
 
== Manually ==
  
Download the released zip file and add all jar under '''dist/lib''' and '''dist/lib/ext''' into your project's classpath. '''Note that please do not deploy these jars to your application server'''.
+
<div style="font-size:18px;">
 +
 
 +
[http://www.zkoss.org/download/zats Download ZATS Mimic Binary]
 +
</div>
 +
 
 +
For projects depending on '''ZK 7''':
 +
 
 +
Add all jar files under zats-mimic-[version].zip/'''dist/lib''' and '''dist/lib/ext'''  <span style="color:red"> except </span> '''zats-mimic-ext6.jar''' into your project's classpath. '''Note that please do not deploy these jars to your application server, they are for testing only'''.
 +
 
 +
For projects depending on '''ZK 6''':
  
Also remember to add jar of your preferred unit test framework, e.g. JUnit.
+
Add all jar files under zats-mimic-[version].zip/'''dist/lib''' and '''dist/lib/ext'''  <span style="color:red"> except </span> '''zats-mimic-ext7.jar''' into your project's classpath. '''Note that please do not deploy these jars to your application server, they are for testing only'''.
  
 +
 +
For projects depending on '''ZK 5''':
 +
 +
Add all jar files under zats-mimic-[version].zip/'''dist/lib''' and '''dist/lib/ext''' <span style="color:red"> except </span> '''zats-mimic-ext6.jar''' and '''zats-mimic-ext7.jar''' into your project's classpath.
 +
 +
= Unit Test Framework =
 +
Also remember to add jar files of your preferred unit test framework, e.g. JUnit.
 +
<source lang='xml'>
 +
<dependency>
 +
<groupId>junit</groupId>
 +
<artifactId>junit</artifactId>
 +
<version>4.12</version>
 +
<scope>test</scope>
 +
</dependency>
 +
</source>
  
  
 +
{{ZATSEssentialsPageHeader}}
 
{{ZATSEssentialsPageFooter}}
 
{{ZATSEssentialsPageFooter}}

Latest revision as of 07:11, 12 December 2022


ZATS Mimic

Maven Project

Please setup zk Maven repository first.

Since 9.6.0

Java EE

    <dependency>
      <groupId>org.zkoss.zats</groupId>
      <artifactId>zats-mimic-ext96</artifactId>
      <version>3.0.0</version>
      <scope>test</scope>
    </dependency>

Check CE repository for the latest version.

Jakarta EE

    <dependency>
      <groupId>org.zkoss.zats</groupId>
      <artifactId>zats-mimic</artifactId>
      <version>4.0.0</version>
      <scope>test</scope>
    </dependency>

Check CE repository for the latest version.

Since 7.0.0

Add the following dependency:

    <dependency>
      <groupId>org.zkoss.zats</groupId>
      <artifactId>zats-mimic-ext7</artifactId>
      <version>${zats-version}</version>
      <scope>test</scope>
    </dependency>


Since 6.0.0

Add the following dependency:

    <dependency>
      <groupId>org.zkoss.zats</groupId>
      <artifactId>zats-mimic-ext6</artifactId>
      <version>${zats-version}</version>
      <scope>test</scope>
    </dependency>

Since 5.0.0 Add the following dependency:

    <dependency>
      <groupId>org.zkoss.zats</groupId>
      <artifactId>zats-mimic</artifactId>
      <version>${zats-version}</version>
      <scope>test</scope>
    </dependency>


Also remember to add dependencies of your preferred unit test framework, e.g. JUnit or TestNG.

The above XML is just a sample, you can use another version available in ZK Maven repository.

ZATS mimic depends on Jetty (org.eclipse.jetty:jetty-webapp) and Rhino (org.mozilla:rhino), and these dependencies are already configured in Mimic's pom.xml. Maven's dependency management will automatically include jetty-related jars. If not, please check your Maven setting.

Manually

For projects depending on ZK 7:

Add all jar files under zats-mimic-[version].zip/dist/lib and dist/lib/ext except zats-mimic-ext6.jar into your project's classpath. Note that please do not deploy these jars to your application server, they are for testing only.

For projects depending on ZK 6:

Add all jar files under zats-mimic-[version].zip/dist/lib and dist/lib/ext except zats-mimic-ext7.jar into your project's classpath. Note that please do not deploy these jars to your application server, they are for testing only.


For projects depending on ZK 5:

Add all jar files under zats-mimic-[version].zip/dist/lib and dist/lib/ext except zats-mimic-ext6.jar and zats-mimic-ext7.jar into your project's classpath.

Unit Test Framework

Also remember to add jar files of your preferred unit test framework, e.g. JUnit.

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>




Last Update : 2022/12/12

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.