mirror of
https://github.com/morluto/rea.git
synced 2026-11-30 02:17:09 +00:00
Read property values through the same Java String.trim semantics as other POM scalar declarations. Preserve non-ASCII boundary characters and nonempty Unicode-only properties before transport credential removal. Exercise compiled CLI, stdio MCP and retained Evidence with property references, ASCII controls, URL redaction and unchanged artifact bytes.
165 lines
4.7 KiB
TypeScript
165 lines
4.7 KiB
TypeScript
/** Tiny well-formed Maven POM with parent, properties, BOM import, and ranges. */
|
|
export const mavenPomFixture = `<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<groupId>com.example</groupId>
|
|
<artifactId>demo-parent</artifactId>
|
|
<version>9.0.0</version>
|
|
<relativePath>../pom.xml</relativePath>
|
|
</parent>
|
|
<artifactId>demo</artifactId>
|
|
<version>\${revision}</version>
|
|
<packaging>jar</packaging>
|
|
<properties>
|
|
<revision>1.2.3</revision>
|
|
<jackson.version>2.17.2</jackson.version>
|
|
</properties>
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-dependencies</artifactId>
|
|
<version>3.3.4</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
<version>\${jackson.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
<scope>compile</scope>
|
|
<optional>false</optional>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-annotations</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter</artifactId>
|
|
<version>[5.10,6.0)</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</project>
|
|
`;
|
|
|
|
/** Maven property keys keep their prefixes even when XML namespace URIs agree. */
|
|
export const qualifiedMavenPropertiesFixture = `<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:a="urn:revisions" xmlns:b="urn:revisions">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>example</groupId>
|
|
<artifactId>qualified-properties</artifactId>
|
|
<version>\${a:revision}</version>
|
|
<properties>
|
|
<revision>0</revision>
|
|
<a:revision>11</a:revision>
|
|
<b:revision>22</b:revision>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>example</groupId>
|
|
<artifactId>dependency</artifactId>
|
|
<version>\${b:revision}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</project>
|
|
`;
|
|
|
|
/** Maven trims ASCII padding but keeps non-ASCII property value characters. */
|
|
export const mavenPropertyValuesFixture = `<project xmlns="http://maven.apache.org/POM/4.0.0">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>example</groupId>
|
|
<artifactId>property-values</artifactId>
|
|
<version>\${revision}</version>
|
|
<properties>
|
|
<revision>  1.2.3  </revision>
|
|
<dependency.version>2.0</dependency.version>
|
|
<marker> </marker>
|
|
<plain> \tordinary value\n </plain>
|
|
<blank> \t\n </blank>
|
|
<mirror>  https://fixture-user:fixture-password@example.invalid/repository </mirror>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>example</groupId><artifactId>dependency</artifactId>
|
|
<version>\${dependency.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</project>
|
|
`;
|
|
|
|
/** Tiny Gradle Module Metadata 1.1 document with library and platform variants. */
|
|
export const gradleModuleFixture = `{
|
|
"formatVersion": "1.1",
|
|
"component": {
|
|
"group": "com.example",
|
|
"module": "demo",
|
|
"version": "1.2.3"
|
|
},
|
|
"createdBy": {
|
|
"gradle": {
|
|
"version": "8.10.2"
|
|
}
|
|
},
|
|
"variants": [
|
|
{
|
|
"name": "apiElements",
|
|
"attributes": {
|
|
"org.gradle.usage": "java-api",
|
|
"org.gradle.category": "library"
|
|
},
|
|
"dependencies": [
|
|
{
|
|
"group": "com.fasterxml.jackson.core",
|
|
"module": "jackson-databind",
|
|
"version": { "requires": "2.17.2" },
|
|
"excludes": [
|
|
{
|
|
"group": "com.fasterxml.jackson.core",
|
|
"module": "jackson-annotations"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "runtimeElements",
|
|
"attributes": {
|
|
"org.gradle.usage": "java-runtime",
|
|
"org.gradle.category": "library"
|
|
},
|
|
"dependencyConstraints": [
|
|
{
|
|
"group": "org.slf4j",
|
|
"module": "slf4j-api",
|
|
"version": { "requires": "2.0.16" }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "demoPlatform",
|
|
"attributes": {
|
|
"org.gradle.category": "platform"
|
|
},
|
|
"dependencyConstraints": [
|
|
{
|
|
"group": "com.fasterxml.jackson.core",
|
|
"module": "jackson-databind",
|
|
"version": { "strictly": "[2.17,2.18)" }
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
`;
|