title: maven not creating jar correctly, creates folder instead?
body: <p>I have a dependency jReddit.jar in my local repo. When I build my project that has a reference to jReddit in it's pom, I keep getting error when server startup because it can't find jReddit.jar in the target web inf. I check the target web inf, and the jReddit is there, only its a folder and not a jar. It looks like 'jReddit.jar' but it is a folder not a jar. If I copy and paste the actual jar in my server it works, but I need it to build correctly. Inside my local repo the jReddit is there as a jar and looks normal.</p>
  
  <p>I am not sure why this is happening because one day everything was working, then the next I can't build or deploy correctly. </p>
  
  <pre><code>          &lt;dependency&gt;
              &lt;groupId&gt;com.github.jreddit&lt;/groupId&gt;
              &lt;artifactId&gt;jreddit&lt;/artifactId&gt;
              &lt;version&gt;1.0.5&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>I havent changed this since it broke, so I think its fine</p>
  
  <p>whole pom </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!--
      JBoss, Home of Professional Open Source
      Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
      contributors by the @authors tag. See the copyright.txt in the
      distribution for a full listing of individual contributors.
  
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
  --&gt;
  &lt;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"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;org.jreddit.service&lt;/groupId&gt;
      &lt;artifactId&gt;jRedditService&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;name&gt;WildFly Quickstarts: jRedditService&lt;/name&gt;
      &lt;description&gt;A starter Java EE 7 webapp project for use on JBoss WildFly / WildFly, generated from the jboss-javaee6-webapp archetype&lt;/description&gt;
  
      &lt;url&gt;http://wildfly.org&lt;/url&gt;
      &lt;licenses&gt;
          &lt;license&gt;
              &lt;name&gt;Apache License, Version 2.0&lt;/name&gt;
              &lt;distribution&gt;repo&lt;/distribution&gt;
              &lt;url&gt;http://www.apache.org/licenses/LICENSE-2.0.html&lt;/url&gt;
          &lt;/license&gt;
      &lt;/licenses&gt;
  
      &lt;properties&gt;
          &lt;!-- Explicitly declaring the source encoding eliminates the following 
              message: --&gt;
          &lt;!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
              resources, i.e. build is platform dependent! --&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  
          &lt;!-- JBoss dependency versions --&gt;
          &lt;version.wildfly.maven.plugin&gt;1.0.2.Final&lt;/version.wildfly.maven.plugin&gt;
  
          &lt;!-- Define the version of the JBoss BOMs we want to import to specify 
              tested stacks. --&gt;
          &lt;version.jboss.bom&gt;8.2.1.Final&lt;/version.jboss.bom&gt;
  
          &lt;!-- other plugin versions --&gt;
          &lt;version.compiler.plugin&gt;3.1&lt;/version.compiler.plugin&gt;
          &lt;version.surefire.plugin&gt;2.16&lt;/version.surefire.plugin&gt;
          &lt;version.war.plugin&gt;2.5&lt;/version.war.plugin&gt;
  
          &lt;!-- maven-compiler-plugin --&gt;
          &lt;maven.compiler.target&gt;1.7&lt;/maven.compiler.target&gt;
          &lt;maven.compiler.source&gt;1.7&lt;/maven.compiler.source&gt;
      &lt;/properties&gt;
  
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;!-- JBoss distributes a complete set of Java EE 7 APIs including a Bill
                  of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection) 
                  of artifacts. We use this here so that we always get the correct versions 
                  of artifacts. Here we use the jboss-javaee-7.0-with-tools stack (you can
                  read this as the JBoss stack of the Java EE 7 APIs, with some extras tools
                  for your project, such as Arquillian for testing) and the jboss-javaee-7.0-with-hibernate
                  stack you can read this as the JBoss stack of the Java EE 7 APIs, with extras
                  from the Hibernate family of projects) --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.wildfly.bom&lt;/groupId&gt;
                  &lt;artifactId&gt;jboss-javaee-7.0-with-tools&lt;/artifactId&gt;
                  &lt;version&gt;${version.jboss.bom}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.wildfly.bom&lt;/groupId&gt;
                  &lt;artifactId&gt;jboss-javaee-7.0-with-hibernate&lt;/artifactId&gt;
                  &lt;version&gt;${version.jboss.bom}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;dependencies&gt;
  
                &lt;dependency&gt;
                  &lt;groupId&gt;com.github.jreddit&lt;/groupId&gt;
                  &lt;artifactId&gt;jreddit&lt;/artifactId&gt;
                  &lt;version&gt;1.0.5&lt;/version&gt;
  &lt;!--                 &lt;scope&gt;provided&lt;/scope&gt;                 --&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
      &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
      &lt;version&gt;2.5.4&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
      &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
      &lt;version&gt;1.1&lt;/version&gt;
  &lt;/dependency&gt;
  
          &lt;!-- First declare the APIs we depend on and need for compilation. All 
              of them are provided by JBoss WildFly --&gt;
  
          &lt;!-- Import the CDI API, we use provided scope as the API is included in 
              JBoss WildFly --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
              &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Import the Common Annotations API (JSR-250), we use provided scope 
              as the API is included in JBoss WildFly --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.annotation&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-annotations-api_1.2_spec&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Import the JAX-RS API, we use provided scope as the API is included 
              in JBoss WildFly --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
              &lt;artifactId&gt;jaxrs-api&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Import the JPA API, we use provided scope as the API is included in 
              JBoss WildFly --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-jpa-2.1-api&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Import the EJB API, we use provided scope as the API is included in 
              JBoss WildFly --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.ejb&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-ejb-api_3.2_spec&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- JSR-303 (Bean Validation) Implementation --&gt;
          &lt;!-- Provides portable constraints such as @Email --&gt;
          &lt;!-- Hibernate Validator is shipped in JBoss WildFly --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Import the JSF API, we use provided scope as the API is included in 
              JBoss WildFly --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec.javax.faces&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-jsf-api_2.2_spec&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Now we declare any tools needed --&gt;
  
          &lt;!-- Annotation processor to generate the JPA 2.0 metamodel classes for 
              typesafe criteria queries --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-jpamodelgen&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Annotation processor that raising compilation errors whenever constraint 
              annotations are incorrectly used. --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator-annotation-processor&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Needed for running tests (you may also use TestNG) --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Optional, but highly recommended --&gt;
          &lt;!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA) 
              JPA from JUnit/TestNG --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.arquillian.junit&lt;/groupId&gt;
              &lt;artifactId&gt;arquillian-junit-container&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.arquillian.protocol&lt;/groupId&gt;
              &lt;artifactId&gt;arquillian-protocol-servlet&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;!-- Maven will append the version to the finalName (which is the name 
              given to the generated war, and hence the context root) --&gt;
          &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
          &lt;plugins&gt;
  
            &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
              &lt;configuration&gt;
                &lt;archive&gt;
                  &lt;manifest&gt;
                  &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                  &lt;mainClass&gt;org.jReddit.service.rest.JaxRsActivator&lt;/mainClass&gt;
                  &lt;classpathPrefix&gt;dependency-jars/&lt;/classpathPrefix&gt;
                  &lt;/manifest&gt;
                &lt;/archive&gt;
              &lt;/configuration&gt;
            &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${version.war.plugin}&lt;/version&gt;
                  &lt;configuration&gt;
                            &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
  
                      &lt;archive&gt;
                          &lt;manifest&gt;
                            &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
  
              &lt;!-- The WildFly plugin deploys your war to a local WildFly container --&gt;
              &lt;!-- To use, run: mvn package wildfly:deploy --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.wildfly.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;wildfly-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${version.wildfly.maven.plugin}&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;!-- The default profile skips all tests, though you can tune it to run 
                  just unit tests based on a custom pattern --&gt;
              &lt;!-- Seperate profiles are provided for running all tests, including Arquillian 
                  tests that execute in the specified container --&gt;
              &lt;id&gt;default&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                          &lt;version&gt;${version.surefire.plugin}&lt;/version&gt;
                          &lt;configuration&gt;
                              &lt;skip&gt;true&lt;/skip&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
  
              &lt;!-- An optional Arquillian testing profile that executes tests
                  in your WildFly instance --&gt;
              &lt;!--
  </code></pre>
  
  <p>This profile will start a new WildFly instance, and execute the
                  test, shutting it down when done -->
              
              arq-wildfly-managed
              
                  
                      org.wildfly
                      wildfly-arquillian-container-managed
                      test
                  
              
          </p>
  
  <pre><code>    &lt;profile&gt;
          &lt;!-- An optional Arquillian testing profile that executes tests
              in a remote WildFly instance --&gt;
          &lt;!-- Run with: mvn clean test -Parq-wildfly-remote --&gt;
          &lt;id&gt;arq-wildfly-remote&lt;/id&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.wildfly&lt;/groupId&gt;
                  &lt;artifactId&gt;wildfly-arquillian-container-remote&lt;/artifactId&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/profile&gt;
  
  
  &lt;/profiles&gt;
  </code></pre>
  
  <p></p>
  
  <p>this is relevant jReddits pom</p>
  
  <pre><code>   &lt;parent&gt;
          &lt;groupId&gt;org.sonatype.oss&lt;/groupId&gt;
          &lt;artifactId&gt;oss-parent&lt;/artifactId&gt;
          &lt;version&gt;7&lt;/version&gt;
      &lt;/parent&gt;
  
  &lt;groupId&gt;com.github.jreddit&lt;/groupId&gt;
  &lt;artifactId&gt;jreddit&lt;/artifactId&gt;
  &lt;version&gt;1.0.5&lt;/version&gt;
  &lt;name&gt;jReddit&lt;/name&gt;
  &lt;description&gt;jReddit is a wrapper for the Reddit API written in Java.      &lt;/description&gt;
  &lt;url&gt;https://github.com/karan/jReddit&lt;/url&gt;
  </code></pre>
  
  <p><a href="http://i.imgur.com/5MqfMvX.jpg" rel="nofollow">Imgur</a></p>