fixed broken POM which included javaee-api into application scope
This commit is contained in:
@ -1,149 +1,149 @@
|
||||
<?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>
|
||||
<artifactId>shared</artifactId>
|
||||
<groupId>de.muehlencord</groupId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<artifactId>shared-account-ui</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>shared-account-ui</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<timestamp>${maven.build.timestamp}</timestamp>
|
||||
<applicationUuid>143a2bd3-7e0b-4162-a76e-3031331c7dfe</applicationUuid>
|
||||
<maven.compiler.source>10</maven.compiler.source>
|
||||
<maven.compiler.target>10</maven.compiler.target>
|
||||
|
||||
<!-- default filter if not selected via profile -->
|
||||
<filter.name>development</filter.name>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.primefaces</groupId>
|
||||
<artifactId>primefaces</artifactId>
|
||||
</dependency>
|
||||
<!-- Admin faces template -->
|
||||
<dependency>
|
||||
<groupId>com.github.adminfaces</groupId>
|
||||
<artifactId>admin-template</artifactId>
|
||||
<version>1.0.0-RC19</version>
|
||||
</dependency>
|
||||
<!-- Omnifaces, faces utils -->
|
||||
<dependency>
|
||||
<groupId>org.omnifaces</groupId>
|
||||
<artifactId>omnifaces</artifactId>
|
||||
<version>3.2</version>
|
||||
</dependency>
|
||||
<!-- Apache Shiro, Security API -->
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<artifactId>shared-shiro-faces</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<artifactId>shared-account</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<artifactId>shared-util</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<artifactId>shared-jeeutil</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.muehlencord.sf</groupId>
|
||||
<artifactId>filter</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-web-api</artifactId>
|
||||
<version>7.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<filters>
|
||||
<filter>${basedir}/src/main/filters/${filter.name}.properties</filter>
|
||||
</filters>
|
||||
|
||||
<resources>
|
||||
<!-- fill buildinformation file -->
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<finalName>account</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>10</source>
|
||||
<target>10</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.2.2</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<webResources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>WEB-INF/web.xml</include>
|
||||
<include>WEB-INF/shiro.ini</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>development</id>
|
||||
<properties>
|
||||
<filter.name>development</filter.name>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>production</id>
|
||||
<properties>
|
||||
<filter.name>production</filter.name>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
<?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>
|
||||
<artifactId>shared</artifactId>
|
||||
<groupId>de.muehlencord</groupId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<artifactId>shared-account-ui</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>shared-account-ui</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<timestamp>${maven.build.timestamp}</timestamp>
|
||||
<applicationUuid>143a2bd3-7e0b-4162-a76e-3031331c7dfe</applicationUuid>
|
||||
<maven.compiler.source>10</maven.compiler.source>
|
||||
<maven.compiler.target>10</maven.compiler.target>
|
||||
|
||||
<!-- default filter if not selected via profile -->
|
||||
<filter.name>development</filter.name>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.primefaces</groupId>
|
||||
<artifactId>primefaces</artifactId>
|
||||
</dependency>
|
||||
<!-- Admin faces template -->
|
||||
<dependency>
|
||||
<groupId>com.github.adminfaces</groupId>
|
||||
<artifactId>admin-template</artifactId>
|
||||
<version>1.0.0-RC19</version>
|
||||
</dependency>
|
||||
<!-- Omnifaces, faces utils -->
|
||||
<dependency>
|
||||
<groupId>org.omnifaces</groupId>
|
||||
<artifactId>omnifaces</artifactId>
|
||||
<version>3.2</version>
|
||||
</dependency>
|
||||
<!-- Apache Shiro, Security API -->
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<artifactId>shared-shiro-faces</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<artifactId>shared-account</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<artifactId>shared-util</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.muehlencord.shared</groupId>
|
||||
<artifactId>shared-jeeutil</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.muehlencord.sf</groupId>
|
||||
<artifactId>filter</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-web-api</artifactId>
|
||||
<version>7.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<filters>
|
||||
<filter>${basedir}/src/main/filters/${filter.name}.properties</filter>
|
||||
</filters>
|
||||
|
||||
<resources>
|
||||
<!-- fill buildinformation file -->
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<finalName>account</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>10</source>
|
||||
<target>10</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.2.2</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<webResources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>WEB-INF/web.xml</include>
|
||||
<include>WEB-INF/shiro.ini</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>development</id>
|
||||
<properties>
|
||||
<filter.name>development</filter.name>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>production</id>
|
||||
<properties>
|
||||
<filter.name>production</filter.name>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@ -1,46 +1,47 @@
|
||||
package de.muehlencord.shared.account.web.presentation;
|
||||
|
||||
import de.muehlencord.shared.account.business.config.boundary.ConfigService;
|
||||
import de.muehlencord.shared.account.business.config.entity.ConfigException;
|
||||
import javax.ejb.EJB;
|
||||
import javax.enterprise.context.ApplicationScoped;
|
||||
import javax.inject.Named;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Joern Muehlencord <joern at muehlencord.de>
|
||||
*/
|
||||
@Named(value = "instanceView")
|
||||
@ApplicationScoped
|
||||
public class InstanceView {
|
||||
|
||||
private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(InstanceView.class);
|
||||
|
||||
@EJB
|
||||
ConfigService configService;
|
||||
|
||||
public boolean isDevelopmentVersion() {
|
||||
String instanceName = getInstanceName();
|
||||
return !instanceName.equals("Production");
|
||||
}
|
||||
|
||||
public String getInstanceName() {
|
||||
String instanceName;
|
||||
try {
|
||||
instanceName = configService.getConfigValue("base.instance");
|
||||
} catch (ConfigException ex) {
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(ex.toString(), ex);
|
||||
} else {
|
||||
LOGGER.error(ex.toString());
|
||||
}
|
||||
instanceName = "unknown (" + ex.toString() + ")";
|
||||
}
|
||||
if (instanceName == null) {
|
||||
return "unknown";
|
||||
} else {
|
||||
return instanceName;
|
||||
}
|
||||
}
|
||||
}
|
||||
package de.muehlencord.shared.account.web.presentation;
|
||||
|
||||
import de.muehlencord.shared.account.business.config.boundary.ConfigService;
|
||||
import de.muehlencord.shared.account.business.config.entity.ConfigException;
|
||||
import javax.ejb.EJB;
|
||||
import javax.enterprise.context.ApplicationScoped;
|
||||
import javax.inject.Named;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* TODO - move to shared-account and remove from all applications and archetype
|
||||
* @author Joern Muehlencord <joern at muehlencord.de>
|
||||
*/
|
||||
@Named(value = "instanceView")
|
||||
@ApplicationScoped
|
||||
public class InstanceView {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(InstanceView.class);
|
||||
|
||||
@EJB
|
||||
ConfigService configService;
|
||||
|
||||
public boolean isDevelopmentVersion() {
|
||||
String instanceName = getInstanceName();
|
||||
return !instanceName.equals("Production");
|
||||
}
|
||||
|
||||
public String getInstanceName() {
|
||||
String instanceName;
|
||||
try {
|
||||
instanceName = configService.getConfigValue("base.instance");
|
||||
} catch (ConfigException ex) {
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug(ex.toString(), ex);
|
||||
} else {
|
||||
LOGGER.error(ex.toString());
|
||||
}
|
||||
instanceName = "unknown (" + ex.toString() + ")";
|
||||
}
|
||||
if (instanceName == null) {
|
||||
return "unknown";
|
||||
} else {
|
||||
return instanceName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
<dependency>
|
||||
<groupId>javax</groupId>
|
||||
<artifactId>javaee-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user