This document discusses Apache Maven, an open-source tool for managing software projects and automating common software project tasks such as compiling source code, running tests, packaging, and deploying artifacts. It describes how Maven uses a Project Object Model (POM) file to manage a project's build, reporting and documentation from a central configuration. It also outlines key Maven concepts like the POM, lifecycles, phases, dependencies, repositories, inheritance, and multi-module projects.
how to write functional tests with Selenium. how to set up Selenium Testing On Grails Apps In Continuous
Integration Using two approaches: The long way – using Maven and/or Ant The fast way, using the grails-
selenium-rc plug-in - ( see
http://buildchimp.com/wordpress/?p=241 )
The Spring Framework has undergone a lot of innovation in the 4.0 and 4.1 releases, and so has its testing support. Join Spring Test component lead Sam Brannen in this talk to discover what's new in Spring's testing support in 4.0 through 4.1.
This talk will provide attendees an overview of what's been deprecated, what's changed, and what's been introduced in Spring's testing support over the last two years, with real life examples and tips for best practices. Highlights include using SocketUtils to scan for free TCP & UDP server ports, the ActiveProfilesResolver API, meta-annotation support for test annotations including attribute overrides, best practices with TestNG, using Groovy scripts to configure an ApplicationContext for integration tests, improvements to SQL script execution and embedded databases, the new TestContext framework bootstrap strategy, programmatic transaction management in tests, and more.
Join core JUnit 5 committer Sam Brannen to gain insight on the latest new features in JUnit 5 as well as what’s on the horizon.
In this presentation we will look at exciting new features that have been added in JUnit 5 over the past year, including temporary directories, custom display name generators, method ordering, timeouts, the Test Kit, and powerful new extension APIs. If you haven't yet made the switch from JUnit 4 to JUnit 5 you will definitely want to check out this presentation.
In closing, Sam will also provide a few tips on how to use JUnit Jupiter to test Spring and Spring Boot apps.
The Spring Framework has always embraced testing as a first class citizen. Spring-based components should be modular, easy to wire together via dependency injection, and therefore easy to test. In fact, when well designed following a POJO programming model, a component in a Spring application can be unit tested without using Spring at all. And when you take the step toward developing integration tests, Spring's testing support is there to make your job easy.
Join Spring Test component lead Sam Brannen in this talk to learn about the basics for Spring's unit and integration testing support. This talk will provide attendees an overview of the following topics: unit testing without Spring, integration testing with Spring, loading application contexts (with and without context hierarchies), injecting dependencies into tests, transaction management for tests, SQL script execution, testing Spring MVC and REST web applications, and more.
how to write functional tests with Selenium. how to set up Selenium Testing On Grails Apps In Continuous
Integration Using two approaches: The long way – using Maven and/or Ant The fast way, using the grails-
selenium-rc plug-in - ( see
http://buildchimp.com/wordpress/?p=241 )
The Spring Framework has undergone a lot of innovation in the 4.0 and 4.1 releases, and so has its testing support. Join Spring Test component lead Sam Brannen in this talk to discover what's new in Spring's testing support in 4.0 through 4.1.
This talk will provide attendees an overview of what's been deprecated, what's changed, and what's been introduced in Spring's testing support over the last two years, with real life examples and tips for best practices. Highlights include using SocketUtils to scan for free TCP & UDP server ports, the ActiveProfilesResolver API, meta-annotation support for test annotations including attribute overrides, best practices with TestNG, using Groovy scripts to configure an ApplicationContext for integration tests, improvements to SQL script execution and embedded databases, the new TestContext framework bootstrap strategy, programmatic transaction management in tests, and more.
Join core JUnit 5 committer Sam Brannen to gain insight on the latest new features in JUnit 5 as well as what’s on the horizon.
In this presentation we will look at exciting new features that have been added in JUnit 5 over the past year, including temporary directories, custom display name generators, method ordering, timeouts, the Test Kit, and powerful new extension APIs. If you haven't yet made the switch from JUnit 4 to JUnit 5 you will definitely want to check out this presentation.
In closing, Sam will also provide a few tips on how to use JUnit Jupiter to test Spring and Spring Boot apps.
The Spring Framework has always embraced testing as a first class citizen. Spring-based components should be modular, easy to wire together via dependency injection, and therefore easy to test. In fact, when well designed following a POJO programming model, a component in a Spring application can be unit tested without using Spring at all. And when you take the step toward developing integration tests, Spring's testing support is there to make your job easy.
Join Spring Test component lead Sam Brannen in this talk to learn about the basics for Spring's unit and integration testing support. This talk will provide attendees an overview of the following topics: unit testing without Spring, integration testing with Spring, loading application contexts (with and without context hierarchies), injecting dependencies into tests, transaction management for tests, SQL script execution, testing Spring MVC and REST web applications, and more.
Get the Most out of Testing with Spring 4.2Sam Brannen
Join Sam Brannen and Nicolas Fränkel to discover what's new in Spring Framework 4.2's testing support and learn tips and best practices for testing modern, Spring-based applications.
Sam Brannen is the Spring Test component lead and author of the Spring TestContext Framework, and Nicolas Fränkel is the author of the book "Integration Testing from the Trenches".
In this session, Sam and Nicolas will cover the latest testing features in Core Spring, Spring Boot, and Spring Security. In addition to new features, they will also present insider tips and best practices on integration testing with suites in TestNG, database transactions, SQL script execution, granularity of context configuration files, optimum use of the context cache, a discussion on TestNG vs. JUnit, and much more.
Given at TechMaine's Java Users Group on Feb 26 2008
Why do we need another build tool when we already have Ant? By focusing on convention over configuration, Maven allows you to declaratively define how your project is built, which reduces a lot of the procedural code that you'd need to implement in every build file if you were using Ant. This, along with Maven's built-in management of repositories for project dependencies, allows you to streamline your build process. Ultimately Maven can reduce the amount of time that would otherwise be wasted hunting down jar files and fiddling with boilerplate build scripts.
This presentation covers Maven's core concepts. It introduces the Plugin architecture, and explain how the most popular plugins are used. It also covers the POM concept and how it relates to dependency tracking and repositories.
This is a introduction to Maven 2. For more information visit http://jpereira.eu/2012/05/03/an-introduction-to-maven-2/
If you want to download the editable presentation contact me (find my contacts on my blog)
JUnit 5 - from Lambda to Alpha and beyondSam Brannen
Want to know what the hype surrounding JUnit 5 is all about? Then join this talk by JUnit 5 core committer Sam Brannen to find out!
Since JUnit 4.0 was first released, a lot has happened in the world of Java. Unfortunately, JUnit 4 hasn't kept up with the times. JUnit 5 therefore aims to help shape the future of testing on the JVM, with a focus on Java 8, modularity, extensibility, and a modern programming API for authoring tests in Java.
This presentation will start off by providing attendees an overview of the inspiration for and architecture of JUnit 5, from launchers to test engines. Sam will then take the audience on an example-driven tour of the new programming model, highlighting support for dependency injection via flexible method signatures, conditional test execution, using lambda expressions and method references in assertions and assumptions, and implementing test/before/after methods via interface default methods.
To round off the discussion, Sam will present an overview of the new extension model in JUnit 5, discussing how to author and register extensions for conditional tests, method parameter resolution, lifecycle callbacks, and more.
JUnit 5 - New Opportunities for Testing on the JVMSam Brannen
Take a Deep Dive into JUnit 5 with core committer Sam Brannen!
Over the last decade a lot has happened in the world of Java and testing, but JUnit 4 hasn't kept up. Now JUnit 5 is here to help shape the future of testing on the JVM with a focus on Java 8 language features, extensibility, and a modern programming API for testing in Java. Moreover, JUnit isn't just a Java testing framework anymore. Third parties are already developing test engines for Scala, Groovy, Kotlin, etc. that run on the new JUnit Platform.
This session starts off with an overview of the inspiration for & architecture of JUnit 5, from launchers to test engines. Sam will then take the audience on a live coding tour, highlighting support for tagging, custom display names, dependency injection, repeated tests, parameterized tests, conditional test execution, lambda expressions for assertions, assumptions, & dynamic tests, and implementing tests via interface default methods (a.k.a., testing traits).
Next, Sam will present the new extension model in JUnit Jupiter, discussing how to author and register extensions for conditional tests, parameter resolution (a.k.a., dependency injection), lifecycle callbacks, & more.
To round off the session, Sam will quickly showcase the new JUnit Jupiter support in Spring Framework 5.0.
Software Test automation tools are available under several categories such as commercial, free software, open source software and etc. In this paper Open Source Software Testing Tools will be discussed.
Open source software test automation tools may be practical alternatives to popular closed-source commercial applications and some open source tools offers features or performance benefits that exceed their commercial counterparts. The source code is openly published for use and/or modification from its original design, free of charge. And these are usually available under a license defined by the Open Source Initiative.
Infinum Android Talks #17 - Testing your Android applications by Ivan KustInfinum
van will show you how to setup unit tests using Robolectric, how to test user interactions using Espresso and provide some tips and tricks for stress-free testing.
This is a basic tutorial on Spring core.
Best viewed when animations and transitions are supported, e.g., view in MS Powerpoint. So, please try to view it with animation else the main purpose of this presentation will be defeated.
Get the Most out of Testing with Spring 4.2Sam Brannen
Join Sam Brannen and Nicolas Fränkel to discover what's new in Spring Framework 4.2's testing support and learn tips and best practices for testing modern, Spring-based applications.
Sam Brannen is the Spring Test component lead and author of the Spring TestContext Framework, and Nicolas Fränkel is the author of the book "Integration Testing from the Trenches".
In this session, Sam and Nicolas will cover the latest testing features in Core Spring, Spring Boot, and Spring Security. In addition to new features, they will also present insider tips and best practices on integration testing with suites in TestNG, database transactions, SQL script execution, granularity of context configuration files, optimum use of the context cache, a discussion on TestNG vs. JUnit, and much more.
Given at TechMaine's Java Users Group on Feb 26 2008
Why do we need another build tool when we already have Ant? By focusing on convention over configuration, Maven allows you to declaratively define how your project is built, which reduces a lot of the procedural code that you'd need to implement in every build file if you were using Ant. This, along with Maven's built-in management of repositories for project dependencies, allows you to streamline your build process. Ultimately Maven can reduce the amount of time that would otherwise be wasted hunting down jar files and fiddling with boilerplate build scripts.
This presentation covers Maven's core concepts. It introduces the Plugin architecture, and explain how the most popular plugins are used. It also covers the POM concept and how it relates to dependency tracking and repositories.
This is a introduction to Maven 2. For more information visit http://jpereira.eu/2012/05/03/an-introduction-to-maven-2/
If you want to download the editable presentation contact me (find my contacts on my blog)
JUnit 5 - from Lambda to Alpha and beyondSam Brannen
Want to know what the hype surrounding JUnit 5 is all about? Then join this talk by JUnit 5 core committer Sam Brannen to find out!
Since JUnit 4.0 was first released, a lot has happened in the world of Java. Unfortunately, JUnit 4 hasn't kept up with the times. JUnit 5 therefore aims to help shape the future of testing on the JVM, with a focus on Java 8, modularity, extensibility, and a modern programming API for authoring tests in Java.
This presentation will start off by providing attendees an overview of the inspiration for and architecture of JUnit 5, from launchers to test engines. Sam will then take the audience on an example-driven tour of the new programming model, highlighting support for dependency injection via flexible method signatures, conditional test execution, using lambda expressions and method references in assertions and assumptions, and implementing test/before/after methods via interface default methods.
To round off the discussion, Sam will present an overview of the new extension model in JUnit 5, discussing how to author and register extensions for conditional tests, method parameter resolution, lifecycle callbacks, and more.
JUnit 5 - New Opportunities for Testing on the JVMSam Brannen
Take a Deep Dive into JUnit 5 with core committer Sam Brannen!
Over the last decade a lot has happened in the world of Java and testing, but JUnit 4 hasn't kept up. Now JUnit 5 is here to help shape the future of testing on the JVM with a focus on Java 8 language features, extensibility, and a modern programming API for testing in Java. Moreover, JUnit isn't just a Java testing framework anymore. Third parties are already developing test engines for Scala, Groovy, Kotlin, etc. that run on the new JUnit Platform.
This session starts off with an overview of the inspiration for & architecture of JUnit 5, from launchers to test engines. Sam will then take the audience on a live coding tour, highlighting support for tagging, custom display names, dependency injection, repeated tests, parameterized tests, conditional test execution, lambda expressions for assertions, assumptions, & dynamic tests, and implementing tests via interface default methods (a.k.a., testing traits).
Next, Sam will present the new extension model in JUnit Jupiter, discussing how to author and register extensions for conditional tests, parameter resolution (a.k.a., dependency injection), lifecycle callbacks, & more.
To round off the session, Sam will quickly showcase the new JUnit Jupiter support in Spring Framework 5.0.
Software Test automation tools are available under several categories such as commercial, free software, open source software and etc. In this paper Open Source Software Testing Tools will be discussed.
Open source software test automation tools may be practical alternatives to popular closed-source commercial applications and some open source tools offers features or performance benefits that exceed their commercial counterparts. The source code is openly published for use and/or modification from its original design, free of charge. And these are usually available under a license defined by the Open Source Initiative.
Infinum Android Talks #17 - Testing your Android applications by Ivan KustInfinum
van will show you how to setup unit tests using Robolectric, how to test user interactions using Espresso and provide some tips and tricks for stress-free testing.
This is a basic tutorial on Spring core.
Best viewed when animations and transitions are supported, e.g., view in MS Powerpoint. So, please try to view it with animation else the main purpose of this presentation will be defeated.
Introduction to the Spring Framework:
Generar description
IoC container
Dependency Injection
Beans scope and lifecycle
Autowiring
XML and annotation based configuration
Additional features
Maven is a project management and comprehension tool. Maven provides developers a complete build lifecycle framework. Development team can automate the project's build infrastructure in almost no time as Maven uses a standard directory layout and a default build lifecycle.
In case of multiple development teams environment, Maven can set-up the way to work as per standards in a very short time. As most of the project setups are simple and reusable, Maven makes life of developer easy while creating reports, checks, build and testing automation setups.
Automating the build process for a flex application. You swf,ie the target now is sent to the web application and a war is generated through the build process
Maven 2 is a powerful tool that promotes convention over configuration and you need to
integrate it into one of the popular integrated development environments (IDEs) called
eclipse to make your work easier, thus increasing your productivity and project quality. This
tutorial provides an example of how to make Maven and Eclipse collaborate. Also covers the
popular JSF Web framework.
Similar to Apache maven, a software project management tool (20)
2. So it’s done...
I’m Renato Primavera from Quadratic
I write software that helps customers to manage and
make use of their geographical data
@RenatoPrimavera
renato.primavera@quadratic.be
www.quadratic.be
3. Maven can manage a project's
build, reporting and
documentation
from a central piece
of information: the “POM”
4. The concept of POM, for
Project Object Model
is the base of Maven
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
</project>
Here is a “POM”...
5. Maven makes the build process easy
> mvn clean
Deletes any build output (e.g. class files or JARs)
> mvn test
Runs the unit tests for the project
> mvn package
Build the project artifacts (e.g. JAR or WAR)
> mvn site
Creates project documentation (e.g. reports or Javadoc)
6. Maven provides a uniform build system
A project is always built using its
project object model (POM)
and a set of plugins that are shared by
all projects using Maven
8. Keeping your test source code in a separate, but
parallel source tree
Using test case naming conventions to locate and
execute tests
Layout your project’s directory structure
(so that once you learn the layout, you can easily
navigate any other project that uses Maven and the
same defaults ! )
10. Maven Installation
Prerequisite: Maven is a Java tool, so you must have
Java installed in order to use it. More precisely, you need a
JDK, the JRE is not sufficient
First...
Download Maven (tar.gz / zip)
http://maven.apache.org/download.cgi
11. Then…
Unzip the distribution archive to the
directory you wish to install Maven
Add the M2_HOME environment variable,
pointing to that directory
Append the value $M2_HOME/bin to the
PATH environment variable
#1
#2
#3
12. Make sure that JAVA_HOME exists as environment
variable and it is set to the location of your JDK
[Optional] add the MAVEN_OPTS environment
variable to specify JVM properties, e.g. the value
-Xms256m -Xmx512m. This can be used to supply
extra options to Maven
Open a command prompt and run mvn --version
to verify that it is correctly installed
#4
#5
#6
13. Maven is now installed. It’s quite simple, isn’t it?
Let’s create a project
> mvn archetype:generate
-DgroupId=com.mycompany.app
-DartifactId=my-app
-DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false
14. What has been generated?
(the project structure)
The POM file
The sources tree
The tests sources tree
16. What did you just do?
You executed the Maven goal “archetype:
generate”, and passed in various parameters to
that goal
The prefix “archetype” is the plugin that
contains the goal
17. The “generate” goal of the “archetype”
plugin created a simple project based upon
an archetype
Suffice it to say for now that a plugin is a collection of goals
with a general common purpose (e.g. the “release” plugin
provides goals that allow to release projects - updating the
POM and tagging in the SCM)
18. We can now Build that project
(and so generate a JAR artifact…)
> mvn package
...
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Jul 07 21:34:52 CEST 2011
[INFO] Final Memory: 3M/6M
[INFO]
------------------------------------------------------------------------
The command line will print out various actions, and end with the following:
19. Unlike the first command executed
(archetype:generate) you may notice the
second is simply a single word - “package”
Rather than a goal, this is a phase
20. A phase is a step in the build lifecycle
(which is an ordered sequence of phases)
When a phase is given, Maven will
execute every phase in the sequence
up to and including the one defined
21. For example, if we execute the compile phase,
the phases that actually get executed are:
- validate
- generate-sources
- process-sources
- generate-resources
- process-resources
- compile
22. These are the most common default
lifecycle phases executed
validate: validate the project is correct and
all necessary information is available
compile: compile the source code of the
project
23. test: test the compiled source code using a
suitable unit testing framework. These tests
should not require the code be packaged or
deployed
package: take the compiled code and package
it in its distributable format, such as a JAR
24. integration-test: process and deploy the
package if necessary into an environment
where integration tests can be run
verify: run any checks to verify the package is
valid and meets quality criteria
25. install: install the package into the local
repository, for use as a dependency in other
projects locally
deploy: done in an integration or release
environment, copies the final package to the
remote repository for sharing with other
developers and projects
26. There are two other really useful
Maven lifecycles phases
clean: cleans up artifacts created by prior
builds
site: generates site documentation for this
project
28. Sir, yes Sir
A repository in Maven is used
to hold build artifacts and
dependencies of varying types
29. There are strictly only two types of
repositories: local and remote
The local repository refers to a copy on your own
installation that is a cache of the remote
downloads, and also contains the temporary build
artifacts that you have not yet released
31. Remote repositories refer to any other
type of repository, accessed by a variety of
protocols such as file:// and http://
Such repository might be a truly remote
repository set up by a third party to provide their
artifacts for downloading
32. Other "remote" repositories may be
internal repositories set up on a file or
HTTP server within your company
These are used to share private artifacts
between development teams and for releases
33. mvn install: installs the package
into the local repository
(for use as a dependency in other
projects locally)
Reminder
mvn deploy: deploys the final package to the
remote repository ,i.e. the corporate one
(for sharing with other developers and projects)
34. Before deploying any artifact
to a remote repository, you must
configure that repo !
Using the distributionManagement
section in your POM
or using the repositories
section in your settings.xml file
35. <distributionManagement>
<!-- use the following if you're not using a snapshot version. -->
<repository>
<id>repo</id>
<name>Repository Name</name>
<url>scp://host/path/to/repo</url>
</repository>
<!-- use the following if you ARE using a snapshot version. -->
<snapshotRepository>
<id>repo</id>
<name>Repository Name</name>
<url>scp://host/path/to/repo</url>
</snapshotRepository>
</distributionManagement>
in thePOM
37. The POM contains all necessary
information about a project, as well as
configurations of plugins to be used
during the build process
It is, effectively, the declarative manifestation of
the “who”, “what” and “where” of your project
(while the build lifecycle is the “when” and “how”)
38. The Super POM is
Maven's default POM
All POMs extend the Super POM unless explicitly
set, meaning the configuration specified in the
Super POM is inherited by the POMs you created
for your projects
39. By default, the build directory is “target”
By default, the source directory is “src/main/java”
By default, the test source directory is “src/main/test”
and so on...
Examples for this
40. Super POM brings also the
basic plugins...
maven-compiler-plugin
maven-dependency-plugin
maven-deploy-plugin
maven-jar-plugin
maven-javadoc-plugin
...
41. One powerful aspect of Maven
is in its handling of
project relationships
That includes dependencies
(and transitive dependencies),
inheritance, and aggregation (multi-
module projects)
43. Maven downloads and links
the dependencies for you
on compilation and other
goals that require them
44. As an added bonus, Maven brings in the
dependencies of those dependencies
(transitive dependencies), allowing your list
to focus solely on the dependencies your
project requires
45. One powerful addition that Maven
brings to build management is
the concept of
project
inheritance
48. Once defined, we may add
values to this parent POM,
which will be inherited by
its children
49. For instance, sections like
dependencyManagement (or
pluginManagement) can be defined
in the parent POM
Dependency management allows to directly specify the
versions of artifacts to be used when they are
encountered in transitive dependencies or in dependencies
of children POM and where no version has been specified
50. In another words, the dependency
management section is a mechanism
for centralizing dependency
information
When you have a set of projects that inherits a common
parent it's possible to put all information about the
dependency in the common POM and have simpler
references to the artifacts in the child POMs