Java Simple Calculator - Command Line
This is repository of the project java-simplecalc-cli.
Branch:
master
: pronto para produçãodevelop
: último desenvolvimento pronto para produção
Consulte todos detalhes da estratégia de branches e workflow deste projeto.
- Java JDK 1.8 (jar file includes runnable)
- Eclipse (version Neon recommended)
- Apache Maven 3.6 (recommended > 3.3)
pom.xml
:- properties:
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- dependencies:
- build:
<finalName>java-simplecalc-cli</finalName>
<plugin> <artifactId>maven-assembly-plugin</artifactId> </plugin>
- properties:
- Clone source code using "git clone". Use branch "master" if branch "develop" is not available.
- Read, if avaliable, "2. Documentation" and "3.X. Guides, Patterns, Standard, Conventions and Best Practices" to understand patterns, standards, conventions and best practices used in this project.
- Make your changes, commit and push on "develop" branch. Use branch "master" if branch "develop" is not available. Ask me permission, if not available permission to push.
- n/a
The following command line runs JUnit tests.
C:\..\java-simplecalc-cli> mvn clean test
The following command line builds a runnable (.jar) in .\target\java-simplecalc-cli-jar-with-dependencies.jar
C:\..\java-simplecalc-cli> mvn clean compile package assembly:single
Some demonstrations examples:
- Evaluate expression:
1 + 1 = 2
C:\..\java-simplecalc-cli> java -jar .\target\java-simplecalc-cli-jar-with-dependencies 1 + 1
2
- Evaluate expression:
1 + 2 * 3 / 4 = 2.5
. We need to envolve with quotes " because of*
C:\..\java-simplecalc-cli> java -jar target\java-simplecalc-cli-jar-with-dependencies.jar "1 + 2 * 3 / 4"
2.5
- n/a