-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14288 from smowton/smowton/admin/buildless-snapsh…
…ot-repositories-test Java: Add test re: buildless mode interaction with snapshot repositories
- Loading branch information
Showing
14 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/pom.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,35 @@ | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.mycompany.app</groupId> | ||
<artifactId>my-app</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<properties> | ||
<maven.compiler.source>8</maven.compiler.source> | ||
<maven.compiler.target>8</maven.compiler.target> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>snapshot-test-repo</id> | ||
<url>http://localhost:9427/snapshots</url> | ||
<releases> | ||
<enabled>false</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
<updatePolicy>always</updatePolicy> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.github.my.snapshot.test</groupId> | ||
<artifactId>snapshottest</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
24 changes: 24 additions & 0 deletions
24
...y/repo/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.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,24 @@ | ||
<metadata modelVersion="1.1.0"> | ||
<groupId>com.github.my.snapshot.test</groupId> | ||
<artifactId>snapshottest</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<versioning> | ||
<lastUpdated>20230101020304</lastUpdated> | ||
<snapshot> | ||
<timestamp>20230901.050514</timestamp> | ||
<buildNumber>100</buildNumber> | ||
</snapshot> | ||
<snapshotVersions> | ||
<snapshotVersion> | ||
<extension>jar</extension> | ||
<value>1.0-20230901.050514-100</value> | ||
<updated>20230101020304</updated> | ||
</snapshotVersion> | ||
<snapshotVersion> | ||
<extension>pom</extension> | ||
<value>1.0-20230901.050514-100</value> | ||
<updated>20230101020304</updated> | ||
</snapshotVersion> | ||
</snapshotVersions> | ||
</versioning> | ||
</metadata> |
1 change: 1 addition & 0 deletions
1
...po/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.md5
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 @@ | ||
cf2064037098dc6d4294ef6f1a12dc75 |
1 change: 1 addition & 0 deletions
1
...o/snapshots/com/github/my/snapshot/test/snapshottest/1.0-SNAPSHOT/maven-metadata.xml.sha1
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 @@ | ||
aeabf1dbf735290f5317d78459b3219d267dbb0e |
Binary file added
BIN
+1.87 KB
...ithub/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...b/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.md5
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 @@ | ||
dbb202adb2f6c5504c9b29b93610dd9e |
1 change: 1 addition & 0 deletions
1
.../my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.jar.sha1
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 @@ | ||
6db6f637a68116728830d5610cbafb608bc58a21 |
13 changes: 13 additions & 0 deletions
13
...ithub/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom
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,13 @@ | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.github.my.snapshot.test</groupId> | ||
<artifactId>snapshottest</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
</project> |
1 change: 1 addition & 0 deletions
1
...b/my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.md5
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 @@ | ||
66c5f73407153610dc3f5743eef678f3 |
1 change: 1 addition & 0 deletions
1
.../my/snapshot/test/snapshottest/1.0-SNAPSHOT/snapshottest-1.0-20230901.050514-100.pom.sha1
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 @@ | ||
f895a88d2490dbcec8228c2a528bde029d80409e |
7 changes: 7 additions & 0 deletions
7
...ntegration-tests/all-platforms/java/buildless-snapshot-repository/src/main/java/Test.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,7 @@ | ||
import testpkg.DepClass; | ||
|
||
public class Test { | ||
|
||
DepClass dc; | ||
|
||
} |
3 changes: 3 additions & 0 deletions
3
java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.expected
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,3 @@ | ||
diagnostics | ||
#select | ||
| DepClass | |
12 changes: 12 additions & 0 deletions
12
java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.py
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,12 @@ | ||
import sys | ||
|
||
from create_database_utils import * | ||
import subprocess | ||
|
||
repo_server_process = subprocess.Popen(["python3", "-m", "http.server", "9427"], cwd = "repo") | ||
|
||
try: | ||
run_codeql_database_create([], lang="java", extra_args=["--extractor-option=buildless=true"], extra_env={"CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_CLASSPATH_FROM_BUILD_FILES": "true"}) | ||
finally: | ||
repo_server_process.kill() | ||
|
8 changes: 8 additions & 0 deletions
8
java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/test.ql
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,8 @@ | ||
import java | ||
import semmle.code.java.Diagnostics | ||
|
||
query predicate diagnostics(Diagnostic d) { any() } | ||
|
||
from Class c | ||
where c.getName() = "DepClass" | ||
select c.toString() |