Skip to content

Commit

Permalink
konveyor#390 Add dummy module to show property error leading to SEGV
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Aschemann <gerd@aschemann.net>
  • Loading branch information
ascheman committed Nov 17, 2023
1 parent f1baf05 commit c1702b3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
jdt.ls-java-project
examples/java/*.project
examples/java/target
examples/java/dummy/target
examples/java/.settings
examples/java/.classpath
examples/java/.project
Expand All @@ -19,4 +20,4 @@ go.work
go.work.sum

external-providers/generic-external-provider/generic-external-provider
external-providers/golang-dependency-provider/golang-dependency-provider
external-providers/golang-dependency-provider/golang-dependency-provider
24 changes: 24 additions & 0 deletions examples/java/dummy/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example.apps</groupId>
<artifactId>java</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

<artifactId>dummy</artifactId>

<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<!-- This leads to https://github.com/konveyor/analyzer-lsp/issues/390
as the property cannot be resolved here but only in the parent POM -->
<version>${javaee-api.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
7 changes: 7 additions & 0 deletions examples/java/dummy/src/main/java/com/example/apps/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.example.apps;

public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
7 changes: 6 additions & 1 deletion examples/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@
<groupId>com.example.apps</groupId>
<artifactId>java</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>java</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<modules>
<module>dummy</module>
</modules>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<javaee-api.version>7.0</javaee-api.version>
</properties>

<dependencies>
Expand All @@ -38,7 +43,7 @@
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<version>${javaee-api.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit c1702b3

Please sign in to comment.