-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reproducer for 19152, dev mode maven profile problem
- Loading branch information
Showing
9 changed files
with
152 additions
and
3 deletions.
There are no files selected for viewing
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
8 changes: 7 additions & 1 deletion
8
core/src/main/java/com/github/famod/modmono_quarkus/core/HelloBean.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 |
---|---|---|
@@ -1,11 +1,17 @@ | ||
package com.github.famod.modmono_quarkus.core; | ||
|
||
import javax.enterprise.context.ApplicationScoped; | ||
import javax.inject.Inject; | ||
|
||
import com.github.famod.modmono_quarkus.support.SupportInterface; | ||
|
||
@ApplicationScoped | ||
public class HelloBean { | ||
|
||
@Inject | ||
SupportInterface support; | ||
|
||
public String hello() { | ||
return "hellooo"; | ||
return "hello: " + support.getSupport(); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
core/src/main/java/com/github/famod/modmono_quarkus/support/SupportInterface.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,6 @@ | ||
package com.github.famod.modmono_quarkus.support; | ||
|
||
public interface SupportInterface { | ||
|
||
String getSupport(); | ||
} |
24 changes: 24 additions & 0 deletions
24
core/src/test/java/com/github/famod/modmono_quarkus/core/testlib/SupportMockProducer.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,24 @@ | ||
package com.github.famod.modmono_quarkus.core.testlib; | ||
|
||
import javax.enterprise.context.RequestScoped; | ||
import javax.enterprise.inject.Produces; | ||
|
||
import org.mockito.Mockito; | ||
|
||
import com.github.famod.modmono_quarkus.support.SupportInterface; | ||
|
||
import io.quarkus.arc.AlternativePriority; | ||
|
||
public class SupportMockProducer { | ||
|
||
static { | ||
System.err.println(":::: " + SupportMockProducer.class.getProtectionDomain().getCodeSource().getLocation()); | ||
} | ||
|
||
@Produces | ||
@RequestScoped | ||
@AlternativePriority(-1) | ||
SupportInterface produceMock() { | ||
return Mockito.mock(SupportInterface.class); | ||
} | ||
} |
Empty file.
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
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
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,66 @@ | ||
<?xml version="1.0"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.github.famod.modmono-quarkus</groupId> | ||
<artifactId>modmono-quarkus-parent</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>modmono-quarkus-support</artifactId> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.github.famod.modmono-quarkus</groupId> | ||
<artifactId>modmono-quarkus-core</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.famod.modmono-quarkus</groupId> | ||
<artifactId>modmono-quarkus-core</artifactId> | ||
<version>${project.version}</version> | ||
<type>test-jar</type> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.jboss.jandex</groupId> | ||
<artifactId>jandex-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>make-index</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>jandex</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>mocks</id> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.github.famod.modmono-quarkus</groupId> | ||
<artifactId>modmono-quarkus-core</artifactId> | ||
<version>${project.version}</version> | ||
<classifier>mocks</classifier> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
</profiles> | ||
</project> |
15 changes: 15 additions & 0 deletions
15
support/src/main/java/com/github/famod/modmono_quarkus/support/connector/SupportBean.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,15 @@ | ||
package com.github.famod.modmono_quarkus.support.connector; | ||
|
||
import javax.enterprise.context.ApplicationScoped; | ||
|
||
import com.github.famod.modmono_quarkus.support.SupportInterface; | ||
|
||
@ApplicationScoped | ||
public class SupportBean implements SupportInterface { | ||
|
||
@Override | ||
public String getSupport() { | ||
return "real support"; | ||
} | ||
|
||
} |