4
Netbeans에서 간단한 Maven 웹 응용 프로그램을 작성했습니다. 내 프로젝트는 Glassfish 서버의 localhost에서 잘 작동합니다. 나는 Heroku에 프로젝트를 업로드하려고했지만 달성 할 수 없다. 나에게 적합한 Procfile은 무엇입니까?글래스 피쉬에서 Maven 웹 응용 프로그램을위한 Heroku Procfile은 무엇입니까?
의 pom.xml 나는이 작동하지 않습니다 BU 시도
<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>
<groupId>com.mycompany</groupId>
<artifactId>tutorialspoint_jsf_2</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>tutorialspoint_jsf_2</name>
<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
: 당신이 당신의 응용 프로그램이 실행하려면
web: java -cp target/dependency/*:target/classes com.mycompany.tutorialspoint_jsf_2.jsfYonetimliNesne
미안 내 영어
내가 내 프로젝트에 코드를 추가하지만 난이 얻을 오류 : '스레드 "main"의 예외 java.lang.NoClassDefFoundError : org/glassfish/embeddable/GlassFishException at java.lang.Class.getDeclaredMethods0 (기본 메소드)java.lang.Class.getMethod에서 java.lang.Class.getMethod0 (Class.java:2694) 에서 java.lang.Class.privateGetDeclaredMethods (Class.java:2451) (Class.java:1622) 에서 15,에서 java.lang.ClassNotFoundException가 : sun.launcher.LauncherHelper.getMainMethod (LauncherHelper.java:494) sun.launcher.LauncherHelper.checkAndLoadMain (LauncherHelper.java:486)에서 는 ' – ekremk
'에 의해 발생 org.glassfish.embeddable. java.security.AccessController.doPrivileged (기본 방법) 에서 이는 java.net.URLClassLoader $ 1.run (URLClassLoader.java:355) 에서에서 이는 java.net.URLClassLoader $의 1.run에서 GlassFishException (URLClassLoader.java:366) java.net.URLClassLoader.findClass (URLClassLoader.java:354) at java.lang.ClassLoader.loadClass (ClassLoader.java:423) at sun.misc.Launcher $ AppClassLoader.loadClass (Launcher.java:308) at java.lang.ClassLoader.loadClass (ClassLoader.java:356) ' – ekremk
두 개의 별도 프로젝트가 있습니까? 하나는 glassfish 서버를 시작하고 war 파일을 배포하는 것입니다. 그리고 귀하의 webapp에 대한 다른 프로젝트 (배포 예정) – Detached