fixed broken POM which included javaee-api into application scope

This commit is contained in:
2018-12-17 18:14:23 +01:00
parent 0b123bec0f
commit c3fafa4331
3 changed files with 197 additions and 195 deletions

View File

@ -1,149 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>shared</artifactId> <artifactId>shared</artifactId>
<groupId>de.muehlencord</groupId> <groupId>de.muehlencord</groupId>
<version>1.1-SNAPSHOT</version> <version>1.1-SNAPSHOT</version>
</parent> </parent>
<groupId>de.muehlencord.shared</groupId> <groupId>de.muehlencord.shared</groupId>
<artifactId>shared-account-ui</artifactId> <artifactId>shared-account-ui</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<name>shared-account-ui</name> <name>shared-account-ui</name>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<timestamp>${maven.build.timestamp}</timestamp> <timestamp>${maven.build.timestamp}</timestamp>
<applicationUuid>143a2bd3-7e0b-4162-a76e-3031331c7dfe</applicationUuid> <applicationUuid>143a2bd3-7e0b-4162-a76e-3031331c7dfe</applicationUuid>
<maven.compiler.source>10</maven.compiler.source> <maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target> <maven.compiler.target>10</maven.compiler.target>
<!-- default filter if not selected via profile --> <!-- default filter if not selected via profile -->
<filter.name>development</filter.name> <filter.name>development</filter.name>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.primefaces</groupId> <groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId> <artifactId>primefaces</artifactId>
</dependency> </dependency>
<!-- Admin faces template --> <!-- Admin faces template -->
<dependency> <dependency>
<groupId>com.github.adminfaces</groupId> <groupId>com.github.adminfaces</groupId>
<artifactId>admin-template</artifactId> <artifactId>admin-template</artifactId>
<version>1.0.0-RC19</version> <version>1.0.0-RC19</version>
</dependency> </dependency>
<!-- Omnifaces, faces utils --> <!-- Omnifaces, faces utils -->
<dependency> <dependency>
<groupId>org.omnifaces</groupId> <groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId> <artifactId>omnifaces</artifactId>
<version>3.2</version> <version>3.2</version>
</dependency> </dependency>
<!-- Apache Shiro, Security API --> <!-- Apache Shiro, Security API -->
<dependency> <dependency>
<groupId>org.apache.shiro</groupId> <groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId> <artifactId>shiro-core</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.shiro</groupId> <groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId> <artifactId>shiro-web</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.muehlencord.shared</groupId> <groupId>de.muehlencord.shared</groupId>
<artifactId>shared-shiro-faces</artifactId> <artifactId>shared-shiro-faces</artifactId>
<version>1.1-SNAPSHOT</version> <version>1.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.muehlencord.shared</groupId> <groupId>de.muehlencord.shared</groupId>
<artifactId>shared-account</artifactId> <artifactId>shared-account</artifactId>
<version>1.1-SNAPSHOT</version> <version>1.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.muehlencord.shared</groupId> <groupId>de.muehlencord.shared</groupId>
<artifactId>shared-util</artifactId> <artifactId>shared-util</artifactId>
<version>1.1-SNAPSHOT</version> <version>1.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.muehlencord.shared</groupId> <groupId>de.muehlencord.shared</groupId>
<artifactId>shared-jeeutil</artifactId> <artifactId>shared-jeeutil</artifactId>
<version>1.1-SNAPSHOT</version> <version>1.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.muehlencord.sf</groupId> <groupId>de.muehlencord.sf</groupId>
<artifactId>filter</artifactId> <artifactId>filter</artifactId>
<version>1.0</version> <version>1.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax</groupId> <groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId> <artifactId>javaee-web-api</artifactId>
<version>7.0</version> <version>7.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<filters> <filters>
<filter>${basedir}/src/main/filters/${filter.name}.properties</filter> <filter>${basedir}/src/main/filters/${filter.name}.properties</filter>
</filters> </filters>
<resources> <resources>
<!-- fill buildinformation file --> <!-- fill buildinformation file -->
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<filtering>true</filtering> <filtering>true</filtering>
<includes> <includes>
<include>**/*.properties</include> <include>**/*.properties</include>
<include>**/*.xml</include> <include>**/*.xml</include>
</includes> </includes>
</resource> </resource>
</resources> </resources>
<finalName>account</finalName> <finalName>account</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>10</source> <source>10</source>
<target>10</target> <target>10</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version> <version>3.2.2</version>
<configuration> <configuration>
<failOnMissingWebXml>false</failOnMissingWebXml> <failOnMissingWebXml>false</failOnMissingWebXml>
<webResources> <webResources>
<resource> <resource>
<directory>${basedir}/src/main/webapp</directory> <directory>${basedir}/src/main/webapp</directory>
<filtering>true</filtering> <filtering>true</filtering>
<includes> <includes>
<include>WEB-INF/web.xml</include> <include>WEB-INF/web.xml</include>
<include>WEB-INF/shiro.ini</include> <include>WEB-INF/shiro.ini</include>
</includes> </includes>
</resource> </resource>
</webResources> </webResources>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<profiles> <profiles>
<profile> <profile>
<id>development</id> <id>development</id>
<properties> <properties>
<filter.name>development</filter.name> <filter.name>development</filter.name>
</properties> </properties>
</profile> </profile>
<profile> <profile>
<id>production</id> <id>production</id>
<properties> <properties>
<filter.name>production</filter.name> <filter.name>production</filter.name>
</properties> </properties>
</profile> </profile>
</profiles> </profiles>
</project> </project>

View File

@ -1,46 +1,47 @@
package de.muehlencord.shared.account.web.presentation; package de.muehlencord.shared.account.web.presentation;
import de.muehlencord.shared.account.business.config.boundary.ConfigService; import de.muehlencord.shared.account.business.config.boundary.ConfigService;
import de.muehlencord.shared.account.business.config.entity.ConfigException; import de.muehlencord.shared.account.business.config.entity.ConfigException;
import javax.ejb.EJB; import javax.ejb.EJB;
import javax.enterprise.context.ApplicationScoped; import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named; import javax.inject.Named;
import org.slf4j.LoggerFactory; import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* /**
* @author Joern Muehlencord <joern at muehlencord.de> * TODO - move to shared-account and remove from all applications and archetype
*/ * @author Joern Muehlencord <joern at muehlencord.de>
@Named(value = "instanceView") */
@ApplicationScoped @Named(value = "instanceView")
public class InstanceView { @ApplicationScoped
public class InstanceView {
private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(InstanceView.class);
private static final Logger LOGGER = LoggerFactory.getLogger(InstanceView.class);
@EJB
ConfigService configService; @EJB
ConfigService configService;
public boolean isDevelopmentVersion() {
String instanceName = getInstanceName(); public boolean isDevelopmentVersion() {
return !instanceName.equals("Production"); String instanceName = getInstanceName();
} return !instanceName.equals("Production");
}
public String getInstanceName() {
String instanceName; public String getInstanceName() {
try { String instanceName;
instanceName = configService.getConfigValue("base.instance"); try {
} catch (ConfigException ex) { instanceName = configService.getConfigValue("base.instance");
if (LOGGER.isDebugEnabled()) { } catch (ConfigException ex) {
LOGGER.debug(ex.toString(), ex); if (LOGGER.isDebugEnabled()) {
} else { LOGGER.debug(ex.toString(), ex);
LOGGER.error(ex.toString()); } else {
} LOGGER.error(ex.toString());
instanceName = "unknown (" + ex.toString() + ")"; }
} instanceName = "unknown (" + ex.toString() + ")";
if (instanceName == null) { }
return "unknown"; if (instanceName == null) {
} else { return "unknown";
return instanceName; } else {
} return instanceName;
} }
} }
}

View File

@ -32,6 +32,7 @@
<dependency> <dependency>
<groupId>javax</groupId> <groupId>javax</groupId>
<artifactId>javaee-api</artifactId> <artifactId>javaee-api</artifactId>
<scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>