-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented ForgeArchive for Arquillian
- Loading branch information
1 parent
fa51917
commit 7b3d536
Showing
23 changed files
with
270 additions
and
136 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
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
17 changes: 17 additions & 0 deletions
17
arquillian-forge-managed/src/main/java/org/jboss/forge/arquillian/archive/ForgeArchive.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,17 @@ | ||
package org.jboss.forge.arquillian.archive; | ||
|
||
import org.jboss.shrinkwrap.api.Archive; | ||
import org.jboss.shrinkwrap.api.container.LibraryContainer; | ||
import org.jboss.shrinkwrap.api.container.ResourceContainer; | ||
import org.jboss.shrinkwrap.api.container.ServiceProviderContainer; | ||
|
||
/** | ||
* Traditional WAR (Java Web Archive) structure. Used in construction of web applications. | ||
* | ||
* @author <a href="mailto:aslak@conduct.no">Aslak Knutsen</a> | ||
* @version $Revision: $ | ||
*/ | ||
public interface ForgeArchive extends Archive<ForgeArchive>, LibraryContainer<ForgeArchive>, | ||
ResourceContainer<ForgeArchive>, ServiceProviderContainer<ForgeArchive> | ||
{ | ||
} |
128 changes: 128 additions & 0 deletions
128
...lian-forge-managed/src/main/java/org/jboss/forge/arquillian/archive/ForgeArchiveImpl.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,128 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2009, 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 org.jboss.forge.arquillian.archive; | ||
|
||
import java.util.logging.Logger; | ||
|
||
import org.jboss.shrinkwrap.api.Archive; | ||
import org.jboss.shrinkwrap.api.ArchivePath; | ||
import org.jboss.shrinkwrap.api.ArchivePaths; | ||
import org.jboss.shrinkwrap.impl.base.container.ContainerBase; | ||
|
||
/** | ||
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a> | ||
*/ | ||
public class ForgeArchiveImpl extends ContainerBase<ForgeArchive> implements ForgeArchive | ||
{ | ||
// -------------------------------------------------------------------------------------|| | ||
// Class Members ----------------------------------------------------------------------|| | ||
// -------------------------------------------------------------------------------------|| | ||
|
||
@SuppressWarnings("unused") | ||
private static final Logger log = Logger.getLogger(ForgeArchiveImpl.class.getName()); | ||
|
||
/** | ||
* Path to the web inside of the Archive. | ||
*/ | ||
private static final ArchivePath PATH_ROOT = ArchivePaths.root(); | ||
|
||
/** | ||
* Path to the classes inside of the Archive. | ||
*/ | ||
private static final ArchivePath PATH_CLASSES = ArchivePaths.create(PATH_ROOT, ""); | ||
|
||
/** | ||
* Path to the libraries inside of the Archive. | ||
*/ | ||
private static final ArchivePath PATH_LIBRARY = ArchivePaths.create(PATH_ROOT, "lib"); | ||
|
||
/** | ||
* Path to the manifests inside of the Archive. | ||
*/ | ||
private static final ArchivePath PATH_MANIFEST = ArchivePaths.create("META-INF"); | ||
|
||
/** | ||
* Path to web archive service providers. | ||
*/ | ||
private static final ArchivePath PATH_SERVICE_PROVIDERS = ArchivePaths.create(PATH_CLASSES, "META-INF/services"); | ||
|
||
// -------------------------------------------------------------------------------------|| | ||
// Instance Members -------------------------------------------------------------------|| | ||
// -------------------------------------------------------------------------------------|| | ||
|
||
// -------------------------------------------------------------------------------------|| | ||
// Constructor ------------------------------------------------------------------------|| | ||
// -------------------------------------------------------------------------------------|| | ||
|
||
/** | ||
* Create a new {@link ForgeArchive} with any type storage engine as backing. | ||
* | ||
* @param delegate The storage backing. | ||
*/ | ||
public ForgeArchiveImpl(final Archive<?> delegate) | ||
{ | ||
super(ForgeArchive.class, delegate); | ||
} | ||
|
||
// -------------------------------------------------------------------------------------|| | ||
// Required Implementations -----------------------------------------------------------|| | ||
// -------------------------------------------------------------------------------------|| | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* @see org.jboss.shrinkwrap.impl.base.container.ContainerBase#getManifestPath() | ||
*/ | ||
@Override | ||
protected ArchivePath getManifestPath() | ||
{ | ||
return PATH_MANIFEST; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* @see org.jboss.shrinkwrap.impl.base.container.ContainerBase#getClassesPath() | ||
*/ | ||
@Override | ||
protected ArchivePath getClassesPath() | ||
{ | ||
return PATH_CLASSES; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* @see org.jboss.shrinkwrap.impl.base.container.ContainerBase#getLibraryPath() | ||
*/ | ||
@Override | ||
protected ArchivePath getLibraryPath() | ||
{ | ||
return PATH_LIBRARY; | ||
} | ||
|
||
protected ArchivePath getServiceProvidersPath() | ||
{ | ||
return PATH_SERVICE_PROVIDERS; | ||
} | ||
|
||
@Override | ||
protected ArchivePath getResourcePath() | ||
{ | ||
return PATH_CLASSES; | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
...aged/src/main/resources/META-INF/services/org.jboss.forge.arquillian.archive.ForgeArchive
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,3 @@ | ||
implementingClassName=org.jboss.forge.arquillian.archive.ForgeArchiveImpl | ||
extension=.jar | ||
archiveFormat=ZIP |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.