Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable simple-it #95

Merged
merged 1 commit into from
Jun 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 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>
<version>3.6.0</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
24 changes: 21 additions & 3 deletions src/it/simple-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,23 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
</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,14 +36,17 @@
<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>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
</plugin>
</plugins>
</build>
</project>
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()