Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SHRINKRES-141 Fixed behavior when missing resources directory
- Loading branch information
Showing
7 changed files
with
143 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?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/maven-v4_0_0.xsd"> | ||
|
||
<!-- Model Version --> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<!-- Artifact Configuration --> | ||
<groupId>org.jboss.shrinkwrap.resolver.test</groupId> | ||
<artifactId>shrinkwrap-resolver-impl-maven-test-jar-without-resources-sample</artifactId> | ||
<version>1.0.0</version> | ||
<packaging>jar</packaging> | ||
<name>ShrinkWrap Resolver Maven Importer Implementation Tests: Jar Without Resources</name> | ||
|
||
<dependencies> | ||
<!-- External Projects --> | ||
<dependency> | ||
<groupId>commons-codec</groupId> | ||
<artifactId>commons-codec</artifactId> | ||
<version>1.7</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
<version>4.10</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jboss.spec</groupId> | ||
<artifactId>jboss-javaee-web-6.0</artifactId> | ||
<version>3.0.2.Final</version> | ||
<scope>provided</scope> | ||
<type>pom</type> | ||
<exclusions> | ||
<!-- xalan is not in Maven Central --> | ||
<exclusion> | ||
<groupId>xalan</groupId> | ||
<artifactId>xalan</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>2.3.2</version> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
13 changes: 13 additions & 0 deletions
13
impl-maven-archive/src/it/jar-without-resources/src/main/java/test/JarClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package test; | ||
|
||
import javax.ejb.Stateless; | ||
|
||
@Stateless | ||
public class JarClass { | ||
|
||
public static final String GREETINGS = "Hello from MavenImporter imported class"; | ||
|
||
public String greet() { | ||
return GREETINGS; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...-maven-archive/src/it/jar-without-resources/src/main/java/test/nested/NestedJarClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package test.nested; | ||
|
||
import java.nio.charset.Charset; | ||
|
||
import org.apache.commons.codec.binary.Base64; | ||
|
||
import test.JarClass; | ||
|
||
// this file greets in Base64 | ||
public class NestedJarClass extends JarClass { | ||
|
||
public static final String GREETINGS = "Hello from MavenImporter imported nested class"; | ||
|
||
@Override | ||
public String greet() { | ||
return Base64.encodeBase64String(GREETINGS.getBytes(Charset.defaultCharset())); | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
impl-maven-archive/src/it/jar-without-resources/src/test/java/test/JarTestCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2010, Red Hat Middleware LLC, 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. | ||
*/ | ||
package test; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test cases for MavenImporter with Jar | ||
* | ||
* @author <a href="kpiwko@redhat.com>Karel Piwko</a> | ||
* | ||
*/ | ||
public class JarTestCase { | ||
|
||
@Test | ||
public void testJar() { | ||
Assert.assertTrue(true); | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
impl-maven-archive/src/it/jar-without-resources/src/test/resources/test.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test.property=value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters