-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MOJO-1671] Allow system properties to be used for download-licenses …
…mojo Submitted by: Elliot Metsger o applied without change git-svn-id: file:///home/tiste/MOJOHAUS-TO-GIT/SVN-MOJO-WIP/trunk/mojo/license-maven-plugin@14050 52ab4f32-60fc-0310-b215-8acea882cd1b
- Loading branch information
Showing
6 changed files
with
102 additions
and
6 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
src/it/download-licenses-configured-alt-location/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals = -DlicensesConfigFile=./licenses.xml -DlicensesOutputDirectory=./licenseout -DlicensesOutputFile=licensesout.xml clean license:download-licenses |
14 changes: 14 additions & 0 deletions
14
src/it/download-licenses-configured-alt-location/licenses.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<licenseSummary> | ||
<dependencies> | ||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
<licenses> | ||
<license> | ||
<name>Apache License 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
</license> | ||
</licenses> | ||
</dependency> | ||
</dependencies> | ||
</licenseSummary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.codehaus.mojo.license</groupId> | ||
<artifactId>it-test</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>Integration Test</name> | ||
<url>http://maven.apache.org</url> | ||
<description> | ||
Check default execution. | ||
</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
<version>1.0</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
<version>@pom.version@</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>download-licenses</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
15 changes: 15 additions & 0 deletions
15
...download-licenses-configured-alt-location/src/main/java/org/codehaus/mojo/HelloWorld.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.codehaus.mojo; | ||
|
||
public class HelloWorld | ||
{ | ||
|
||
/** | ||
* @param args | ||
*/ | ||
public static void main( String[] args ) | ||
{ | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/it/download-licenses-configured-alt-location/verify.bsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import java.io.*; | ||
import java.util.*; | ||
|
||
try | ||
{ | ||
File licenseFile = new File( basedir, "licenseout/apache license 2.0 - license-2.0.txt" ); | ||
if ( !licenseFile.isFile() ) | ||
{ | ||
System.err.println( "Could not find license file: " + licenseFile ); | ||
return false; | ||
} | ||
|
||
File summaryFile = new File( basedir, "licensesout.xml" ); | ||
if ( !summaryFile.isFile() ) | ||
{ | ||
System.err.println( "Could not find license file: " + summaryFile ); | ||
return false; | ||
} | ||
} | ||
catch( Throwable t ) | ||
{ | ||
t.printStackTrace(); | ||
return false; | ||
} | ||
|
||
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters