Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8ea45d8

Browse filesBrowse files
Adding missing @Inject to LicenseListMojo class (#656)
* adding `@Inject` to class * Add integration test --------- Co-authored-by: Slawomir Jaranowski <s.jaranowski@gmail.com>
1 parent de9999a commit 8ea45d8
Copy full SHA for 8ea45d8

File tree

Expand file treeCollapse file tree

4 files changed

+106
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

4 files changed

+106
-0
lines changed
Open diff view settings
Collapse file
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
###
2+
# #%L
3+
# License Maven Plugin
4+
# %%
5+
# Copyright (C) 2008 - 2011 CodeLutin, Codehaus, Tony Chemit
6+
# %%
7+
# This program is free software: you can redistribute it and/or modify
8+
# it under the terms of the GNU Lesser General Public License as
9+
# published by the Free Software Foundation, either version 3 of the
10+
# License, or (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Lesser Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Lesser Public
18+
# License along with this program. If not, see
19+
# <http://www.gnu.org/licenses/lgpl-3.0.html>.
20+
# #L%
21+
###
22+
invoker.goals=license:license-list
Collapse file

‎src/it/license-list/pom.xml‎

Copy file name to clipboard
+55Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
#%L
4+
License Maven Plugin
5+
%%
6+
Copyright (C) 2008 - 2011 CodeLutin, Codehaus, Tony Chemit
7+
%%
8+
This program is free software: you can redistribute it and/or modify
9+
it under the terms of the GNU Lesser General Public License as
10+
published by the Free Software Foundation, either version 3 of the
11+
License, or (at your option) any later version.
12+
13+
This program is distributed in the hope that it will be useful,
14+
but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
GNU General Lesser Public License for more details.
17+
18+
You should have received a copy of the GNU General Lesser Public
19+
License along with this program. If not, see
20+
<http://www.gnu.org/licenses/lgpl-3.0.html>.
21+
#L%
22+
-->
23+
24+
<project xmlns="http://maven.apache.org/POM/4.0.0"
25+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
26+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
27+
28+
<modelVersion>4.0.0</modelVersion>
29+
30+
<groupId>org.codehaus.mojo.license.test</groupId>
31+
<artifactId>license-list</artifactId>
32+
<version>@project.version@</version>
33+
34+
<name>License Test :: license-list</name>
35+
36+
<properties>
37+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38+
<detail>true</detail>
39+
</properties>
40+
41+
<build>
42+
<pluginManagement>
43+
<plugins>
44+
<plugin>
45+
<groupId>org.codehaus.mojo</groupId>
46+
<artifactId>license-maven-plugin</artifactId>
47+
<version>@project.version@</version>
48+
</plugin>
49+
</plugins>
50+
</pluginManagement>
51+
</build>
52+
53+
</project>
54+
55+
Collapse file
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* #%L
3+
* License Maven Plugin
4+
* %%
5+
* Copyright (C) 2008 - 2011 CodeLutin, Codehaus, Tony Chemit
6+
* %%
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU Lesser General Public License as
9+
* published by the Free Software Foundation, either version 3 of the
10+
* License, or (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Lesser Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Lesser Public
18+
* License along with this program. If not, see
19+
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
20+
* #L%
21+
*/
22+
23+
// simple check that the license list ws execute
24+
def log = new File(basedir, 'build.log').text
25+
assert log.contains('Available licenses :')
26+
assert log.contains('* apache_v2 : Apache License version 2.0')
Collapse file

‎src/main/java/org/codehaus/mojo/license/LicenseListMojo.java‎

Copy file name to clipboardExpand all lines: src/main/java/org/codehaus/mojo/license/LicenseListMojo.java
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* #L%
2323
*/
2424

25+
import javax.inject.Inject;
26+
2527
import java.io.IOException;
2628
import java.util.Arrays;
2729
import java.util.Collections;
@@ -79,6 +81,7 @@ public class LicenseListMojo extends AbstractLicenseMojo {
7981
*/
8082
private LicenseStore licenseStore;
8183

84+
@Inject
8285
public LicenseListMojo(MavenProjectHelper projectHelper) {
8386
super(projectHelper);
8487
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.