Skip to content

Commit

Permalink
enable simple-it
Browse files Browse the repository at this point in the history
Signed-off-by: Hervé Boutemy <[email protected]>
  • Loading branch information
hboutemy committed Jun 23, 2023
1 parent d8aed90 commit f918240
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 21 deletions.
42 changes: 26 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
<description>Plugin for supporting SPDX in a Maven build. See README.md</description>
<organization>
<name>SPDX</name>
<url>http://spdx.dev</url>
<url>https://spdx.dev</url>
</organization>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.outputTimestamp>1675930644</project.build.outputTimestamp>
Expand All @@ -25,34 +26,39 @@
<sonar.projectKey>spdx-maven-plugin</sonar.projectKey>
<dependency-check-maven.version>8.0.1</dependency-check-maven.version>
</properties>

<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<url>https://github.com/spdx/spdx-maven-plugin</url>
<connection>scm:git:ssh://[email protected]:spdx/spdx-maven-plugin.git</connection>
<developerConnection>scm:git:ssh://[email protected]:spdx/spdx-maven-plugin.git</developerConnection>
<url>https://github.com/spdx/spdx-maven-plugin</url>
<connection>scm:git:ssh://[email protected]:spdx/spdx-maven-plugin.git</connection>
<developerConnection>scm:git:ssh://[email protected]:spdx/spdx-maven-plugin.git</developerConnection>
</scm>

<distributionManagement>
<repository>
<id>ossrh</id>
<name>spdx-maven-plugin</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<developers>
<developer>
<id>goneall</id>
<name>Gary O'Neall</name>
<email>[email protected]</email>
<organization>SPDX</organization>
<organizationUrl>http://spdx.org</organizationUrl>
</developer>
</developers>
<developer>
<id>goneall</id>
<name>Gary O'Neall</name>
<email>[email protected]</email>
<organization>SPDX</organization>
<organizationUrl>https://spdx.dev</organizationUrl>
</developer>
</developers>

<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
Expand Down Expand Up @@ -252,24 +258,28 @@
<profiles>
<profile>
<id>run-its</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>1.7</version>
<configuration>
<debug>true</debug>
<debug>false</debug>
<streamLogsOnFailures>true</streamLogsOnFailures>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<settingsFile>${project.build.directory}/it/settings.xml</settingsFile>
<settingsFile>src/it/settings.xml</settingsFile>
<goals>
<goal>clean</goal>
<goal>test-compile</goal>
<goal>verify</goal>
</goals>
</configuration>
<executions>
Expand All @@ -293,7 +303,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
19 changes: 16 additions & 3 deletions src/it/simple-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -21,10 +35,9 @@
<version>@project.version@</version>
<executions>
<execution>
<id>touch</id>
<phase>validate</phase>
<id>build-spdx</id>
<goals>
<goal>touch</goal>
<goal>createSPDX</goal>
</goals>
</execution>
</executions>
Expand Down
24 changes: 24 additions & 0 deletions src/it/simple-it/src/main/java/simple/Simple.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2014 Source Auditor Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package simple;

public class Simple
{
public static void main(String[] args)
{
System.out.println( "Hello World!");
}
}
27 changes: 27 additions & 0 deletions src/it/simple-it/src/test/java/SimpleTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2014 Source Auditor Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package simple;

import org.junit.Test;

public class SimpleTest
{
@Test
public void test()
{

}
}
4 changes: 2 additions & 2 deletions src/it/simple-it/verify.groovy
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
File touchFile = new File( basedir, "target/touch.txt" );
File spdxFile = new File( basedir, "target/site/org.spdx.it_simple-it-1.0-SNAPSHOT.spdx.json" );

assert touchFile.isFile()
assert spdxFile.isFile()

0 comments on commit f918240

Please sign in to comment.