i have dependency jreddit.jar in local repo. when build project has reference jreddit in it's pom, keep getting error when server startup because can't find jreddit.jar in target web inf. check target web inf, , jreddit there, folder , not jar. looks 'jreddit.jar' folder not jar. if copy , paste actual jar in server works, need build correctly. inside local repo jreddit there jar , looks normal.
i not sure why happening because 1 day working, next can't build or deploy correctly.
<dependency> <groupid>com.github.jreddit</groupid> <artifactid>jreddit</artifactid> <version>1.0.5</version> </dependency>
i havent changed since broke, think fine
whole pom
<?xml version="1.0" encoding="utf-8"?> <!-- jboss, home of professional open source copyright 2013, red hat, inc. and/or affiliates, , individual contributors @authors tag. see copyright.txt in distribution full listing of individual contributors. licensed under apache license, version 2.0 (the "license"); may not use file except in compliance license. may obtain copy of license @ http://www.apache.org/licenses/license-2.0 unless required applicable law or agreed in writing, software distributed under license distributed on "as is" basis, without warranties or conditions of kind, either express or implied. see license specific language governing permissions , limitations under license. --> <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/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <groupid>org.jreddit.service</groupid> <artifactid>jredditservice</artifactid> <version>0.0.1-snapshot</version> <packaging>war</packaging> <name>wildfly quickstarts: jredditservice</name> <description>a starter java ee 7 webapp project use on jboss wildfly / wildfly, generated jboss-javaee6-webapp archetype</description> <url>http://wildfly.org</url> <licenses> <license> <name>apache license, version 2.0</name> <distribution>repo</distribution> <url>http://www.apache.org/licenses/license-2.0.html</url> </license> </licenses> <properties> <!-- explicitly declaring source encoding eliminates following message: --> <!-- [warning] using platform encoding (utf-8 actually) copy filtered resources, i.e. build platform dependent! --> <project.build.sourceencoding>utf-8</project.build.sourceencoding> <!-- jboss dependency versions --> <version.wildfly.maven.plugin>1.0.2.final</version.wildfly.maven.plugin> <!-- define version of jboss boms want import specify tested stacks. --> <version.jboss.bom>8.2.1.final</version.jboss.bom> <!-- other plugin versions --> <version.compiler.plugin>3.1</version.compiler.plugin> <version.surefire.plugin>2.16</version.surefire.plugin> <version.war.plugin>2.5</version.war.plugin> <!-- maven-compiler-plugin --> <maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.source>1.7</maven.compiler.source> </properties> <dependencymanagement> <dependencies> <!-- jboss distributes complete set of java ee 7 apis including bill of materials (bom). bom specifies versions of "stack" (or collection) of artifacts. use here correct versions of artifacts. here use jboss-javaee-7.0-with-tools stack (you can read jboss stack of java ee 7 apis, extras tools project, such arquillian testing) , jboss-javaee-7.0-with-hibernate stack can read jboss stack of java ee 7 apis, extras hibernate family of projects) --> <dependency> <groupid>org.wildfly.bom</groupid> <artifactid>jboss-javaee-7.0-with-tools</artifactid> <version>${version.jboss.bom}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupid>org.wildfly.bom</groupid> <artifactid>jboss-javaee-7.0-with-hibernate</artifactid> <version>${version.jboss.bom}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencymanagement> <dependencies> <dependency> <groupid>com.github.jreddit</groupid> <artifactid>jreddit</artifactid> <version>1.0.5</version> <!-- <scope>provided</scope> --> </dependency> <dependency> <groupid>com.fasterxml.jackson.core</groupid> <artifactid>jackson-databind</artifactid> <version>2.5.4</version> </dependency> <dependency> <groupid>com.googlecode.json-simple</groupid> <artifactid>json-simple</artifactid> <version>1.1</version> </dependency> <!-- first declare apis depend on , need compilation. of them provided jboss wildfly --> <!-- import cdi api, use provided scope api included in jboss wildfly --> <dependency> <groupid>javax.enterprise</groupid> <artifactid>cdi-api</artifactid> <scope>provided</scope> </dependency> <!-- import common annotations api (jsr-250), use provided scope api included in jboss wildfly --> <dependency> <groupid>org.jboss.spec.javax.annotation</groupid> <artifactid>jboss-annotations-api_1.2_spec</artifactid> <scope>provided</scope> </dependency> <!-- import jax-rs api, use provided scope api included in jboss wildfly --> <dependency> <groupid>org.jboss.resteasy</groupid> <artifactid>jaxrs-api</artifactid> <scope>provided</scope> </dependency> <!-- import jpa api, use provided scope api included in jboss wildfly --> <dependency> <groupid>org.hibernate.javax.persistence</groupid> <artifactid>hibernate-jpa-2.1-api</artifactid> <scope>provided</scope> </dependency> <!-- import ejb api, use provided scope api included in jboss wildfly --> <dependency> <groupid>org.jboss.spec.javax.ejb</groupid> <artifactid>jboss-ejb-api_3.2_spec</artifactid> <scope>provided</scope> </dependency> <!-- jsr-303 (bean validation) implementation --> <!-- provides portable constraints such @email --> <!-- hibernate validator shipped in jboss wildfly --> <dependency> <groupid>org.hibernate</groupid> <artifactid>hibernate-validator</artifactid> <scope>provided</scope> <exclusions> <exclusion> <groupid>org.slf4j</groupid> <artifactid>slf4j-api</artifactid> </exclusion> </exclusions> </dependency> <!-- import jsf api, use provided scope api included in jboss wildfly --> <dependency> <groupid>org.jboss.spec.javax.faces</groupid> <artifactid>jboss-jsf-api_2.2_spec</artifactid> <scope>provided</scope> </dependency> <!-- declare tools needed --> <!-- annotation processor generate jpa 2.0 metamodel classes typesafe criteria queries --> <dependency> <groupid>org.hibernate</groupid> <artifactid>hibernate-jpamodelgen</artifactid> <scope>provided</scope> </dependency> <!-- annotation processor raising compilation errors whenever constraint annotations incorrectly used. --> <dependency> <groupid>org.hibernate</groupid> <artifactid>hibernate-validator-annotation-processor</artifactid> <scope>provided</scope> </dependency> <!-- needed running tests (you may use testng) --> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <scope>test</scope> </dependency> <!-- optional, highly recommended --> <!-- arquillian allows test enterprise code such ejbs , transactional(jta) jpa junit/testng --> <dependency> <groupid>org.jboss.arquillian.junit</groupid> <artifactid>arquillian-junit-container</artifactid> <scope>test</scope> </dependency> <dependency> <groupid>org.jboss.arquillian.protocol</groupid> <artifactid>arquillian-protocol-servlet</artifactid> <scope>test</scope> </dependency> </dependencies> <build> <!-- maven append version finalname (which name given generated war, , hence context root) --> <finalname>${project.artifactid}</finalname> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-jar-plugin</artifactid> <version>2.4</version> <configuration> <archive> <manifest> <addclasspath>true</addclasspath> <mainclass>org.jreddit.service.rest.jaxrsactivator</mainclass> <classpathprefix>dependency-jars/</classpathprefix> </manifest> </archive> </configuration> </plugin> <plugin> <artifactid>maven-war-plugin</artifactid> <version>${version.war.plugin}</version> <configuration> <failonmissingwebxml>false</failonmissingwebxml> <archive> <manifest> <addclasspath>true</addclasspath> </manifest> </archive> </configuration> </plugin> <!-- wildfly plugin deploys war local wildfly container --> <!-- use, run: mvn package wildfly:deploy --> <plugin> <groupid>org.wildfly.plugins</groupid> <artifactid>wildfly-maven-plugin</artifactid> <version>${version.wildfly.maven.plugin}</version> </plugin> </plugins> </build> <profiles> <profile> <!-- default profile skips tests, though can tune run unit tests based on custom pattern --> <!-- seperate profiles provided running tests, including arquillian tests execute in specified container --> <id>default</id> <activation> <activebydefault>true</activebydefault> </activation> <build> <plugins> <plugin> <artifactid>maven-surefire-plugin</artifactid> <version>${version.surefire.plugin}</version> <configuration> <skip>true</skip> </configuration> </plugin> </plugins> </build> </profile> <profile> <!-- optional arquillian testing profile executes tests in wildfly instance --> <!--
this profile start new wildfly instance, , execute test, shutting down when done --> arq-wildfly-managed org.wildfly wildfly-arquillian-container-managed test
<profile> <!-- optional arquillian testing profile executes tests in remote wildfly instance --> <!-- run with: mvn clean test -parq-wildfly-remote --> <id>arq-wildfly-remote</id> <dependencies> <dependency> <groupid>org.wildfly</groupid> <artifactid>wildfly-arquillian-container-remote</artifactid> <scope>test</scope> </dependency> </dependencies> </profile> </profiles>
this relevant jreddits pom
<parent> <groupid>org.sonatype.oss</groupid> <artifactid>oss-parent</artifactid> <version>7</version> </parent> <groupid>com.github.jreddit</groupid> <artifactid>jreddit</artifactid> <version>1.0.5</version> <name>jreddit</name> <description>jreddit wrapper reddit api written in java. </description> <url>https://github.com/karan/jreddit</url>
Comments
Post a Comment