maven-embedded-glassfish-plugin无法使用logback

时间:2015-03-08 16:00:18

标签: java glassfish-3 logback glassfish-embedded

我在使用maven-embedded-glassfish-plugin(3.1.2.2)进行回溯时遇到了一个问题,即嵌入式glassfish中没有使用logback的配置。

而且,我发现thisthat是相似的帖子,找不到解决方案。 有人可以帮忙吗? 这是我的pom.xml

<properties>
    <!-- JEE -->
    <jee.version>6.0</jee.version>

    <!-- logger -->
    <logback.version>1.0.13</logback.version>
    <slf4j.version>1.7.5</slf4j.version>

    <!-- maven plugin -->
    <maven-embedded-glassfish-plugin.version>3.1.2.2</maven-embedded-glassfish-plugin.version>
</properties>

<dependencies>
    <!-- JEE -->
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>${jee.version}</version>
        <scope>provided</scope>
    </dependency>

    <!-- logger -->
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback.version}</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>log4j-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jul-to-slf4j</artifactId>
        <version>${slf4j.version}</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.glassfish.embedded</groupId>
            <artifactId>maven-embedded-glassfish-plugin</artifactId>
            <version>${maven-embedded-glassfish-plugin.version}</version>
            <configuration>
                <app>target/${project.artifactId}-${project.version}</app>
                <port>8080</port>
                <ports>
                    <https-listener>8181</https-listener>
                </ports>
                <name>${project.artifactId}</name>
                <contextRoot>/</contextRoot>
                <autoDelete>true</autoDelete>
            </configuration>
        </plugin>
    </plugins>
</build>

0 个答案:

没有答案