mvnizer 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.org +4 -0
- data/README.org +27 -13
- data/lib/mvnizer/templates/war/ExampleServlet.java.erb +3 -3
- data/lib/mvnizer/version.rb +1 -1
- data/mvnizer.gemspec +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b69f8cb2b4af4431f058fb7262631af4485a40050f65c14930cff6abc305e7b4
|
4
|
+
data.tar.gz: 31265f6a2d8fa7336f4e897af748799c786eaca0accbd525e22f2b98c9ad00e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52fb734c188a22d415b2c6e5bea0a3959229e24d9ecbd4c29eea7186a9a9412a974a0d7afeb34eabb71b2402760e4727587ffc3192a6c6554c4768fa70130f53
|
7
|
+
data.tar.gz: 7783da40a8f0665a1ac571059924f7ca55d79d2013b9f8705c4d15e23b4146538f3c079fc3a54f51939e45a486650a3114dce5b1255f0de31c223f58a5e681e3
|
data/CHANGELOG.org
CHANGED
data/README.org
CHANGED
@@ -5,12 +5,12 @@ complicated.
|
|
5
5
|
|
6
6
|
* Introduction
|
7
7
|
|
8
|
-
Mvnizer is ideal to create a
|
9
|
-
a dependency and sets up the Maven project structure.
|
8
|
+
Mvnizer is ideal to create a throwaway Maven project that adds
|
9
|
+
junit as a dependency and sets up the Maven project structure.
|
10
10
|
|
11
11
|
* Install
|
12
12
|
|
13
|
-
Mvnizer can be installed as follows:
|
13
|
+
Mvnizer can be installed as follows:
|
14
14
|
|
15
15
|
#+BEGIN_EXAMPLE
|
16
16
|
$ gem install mvnizer
|
@@ -20,22 +20,22 @@ Mvnizer can be installed as follows:
|
|
20
20
|
|
21
21
|
** Project Creation
|
22
22
|
|
23
|
-
Mvnizer is used as follows:
|
23
|
+
Mvnizer is used as follows:
|
24
24
|
|
25
25
|
#+BEGIN_EXAMPLE
|
26
26
|
$ mvnizer new <coordinates>
|
27
27
|
#+END_EXAMPLE
|
28
28
|
|
29
|
-
The coordinates can have the following format:
|
29
|
+
The coordinates can have the following format:
|
30
30
|
|
31
31
|
#+BEGIN_EXAMPLE
|
32
32
|
<group:>artifact<:version><:type>
|
33
33
|
#+END_EXAMPLE
|
34
34
|
|
35
|
-
with the values between angled brackets optional. =type= can only
|
36
|
-
one of the following three values: =jar= (default), =war= or
|
37
|
-
command creates a project in the =artifact= folder,
|
38
|
-
proper values in the pom file.
|
35
|
+
with the values between angled brackets optional. =type= can only
|
36
|
+
have one of the following three values: =jar= (default), =war= or
|
37
|
+
=pom=. This command creates a project in the =artifact= folder,
|
38
|
+
populating the proper values in the pom file.
|
39
39
|
|
40
40
|
Here are some examples of valid commands:
|
41
41
|
|
@@ -48,13 +48,27 @@ Here are some examples of valid commands:
|
|
48
48
|
mvnizer new com.example:foo:1.0:war
|
49
49
|
#+END_EXAMPLE
|
50
50
|
|
51
|
+
*** WAR Project
|
52
|
+
|
53
|
+
If the type of project generated is =war=, a servlet
|
54
|
+
(=ExampleServlet=) is generated, along with a JSP file and an
|
55
|
+
empty =web.xml= file.
|
56
|
+
|
57
|
+
When running the Jetty plugin, /e.g./:
|
58
|
+
|
59
|
+
#+BEGIN_EXAMPLE
|
60
|
+
mvn org.eclipse.jetty:jetty-maven-plugin:9.4.12.v20180830:run-war
|
61
|
+
#+END_EXAMPLE
|
62
|
+
|
63
|
+
the example can then be accessed at http://localhost:8080/hello
|
64
|
+
|
51
65
|
** Add Dependency
|
52
66
|
|
53
|
-
To add dependencies, you must be in the folder where the pom file you
|
54
|
-
want to add the dependency to is.
|
67
|
+
To add dependencies, you must be in the folder where the pom file you
|
68
|
+
want to add the dependency to is.
|
55
69
|
|
56
|
-
To add a dependency, simply pass the coordinates of the dependency, and
|
57
|
-
add scope if needed (if no scope is given, =compile= is assumed):
|
70
|
+
To add a dependency, simply pass the coordinates of the dependency, and
|
71
|
+
add scope if needed (if no scope is given, =compile= is assumed):
|
58
72
|
|
59
73
|
#+BEGIN_EXAMPLE
|
60
74
|
mvnizer add org.apache.commons:commons-lang3:3.1:jar
|
@@ -1,18 +1,18 @@
|
|
1
1
|
package <%= package_name %>;
|
2
2
|
|
3
3
|
import java.io.IOException;
|
4
|
-
import javax.servlet.GenericServlet;
|
5
4
|
import javax.servlet.ServletException;
|
6
5
|
import javax.servlet.ServletRequest;
|
7
6
|
import javax.servlet.ServletResponse;
|
8
7
|
import javax.servlet.annotation.WebServlet;
|
8
|
+
import javax.servlet.http.HttpServlet;
|
9
9
|
|
10
10
|
@WebServlet("/hello")
|
11
|
-
public class ExampleServlet extends
|
11
|
+
public class ExampleServlet extends HttpServlet {
|
12
12
|
|
13
13
|
@Override
|
14
14
|
public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
|
15
|
-
|
15
|
+
|
16
16
|
request.setAttribute("greeting", "Hello World");
|
17
17
|
request.getRequestDispatcher("/WEB-INF/index.jsp").forward(request, response);
|
18
18
|
}
|
data/lib/mvnizer/version.rb
CHANGED
data/mvnizer.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: mvnizer 0.
|
5
|
+
# stub: mvnizer 0.5.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "mvnizer".freeze
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.5.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
|
-
s.authors = ["S\
|
13
|
+
s.authors = ["S\u{e9}bastien Le Callonnec".freeze]
|
14
14
|
s.date = "2018-10-14"
|
15
15
|
s.description = "Bootstrap a Maven project without the pain of archetypes.".freeze
|
16
16
|
s.email = "sebastien@weblogism.com".freeze
|
@@ -77,7 +77,7 @@ Gem::Specification.new do |s|
|
|
77
77
|
]
|
78
78
|
s.homepage = "http://github.com/tychobrailleur/mvnizer".freeze
|
79
79
|
s.licenses = ["MIT".freeze]
|
80
|
-
s.rubygems_version = "2.
|
80
|
+
s.rubygems_version = "2.7.7".freeze
|
81
81
|
s.summary = "Bootstrap a Maven project without the pain of archetypes.".freeze
|
82
82
|
|
83
83
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mvnizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sébastien Le Callonnec
|
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
207
|
rubyforge_project:
|
208
|
-
rubygems_version: 2.
|
208
|
+
rubygems_version: 2.7.7
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: Bootstrap a Maven project without the pain of archetypes.
|