[JBoss JIRA] (SHRINKWRAP-484) improved simpler api's
by Caleb Cushing (JIRA)
[ https://issues.jboss.org/browse/SHRINKWRAP-484?page=com.atlassian.jira.pl... ]
Caleb Cushing updated SHRINKWRAP-484:
-------------------------------------
Description:
I'd like to see API's such as the following, that just put the file in the right place with the right name on the classpath.
Archive.addPersistenceXML("path/to/persistence.xml")
Archive.addBeansXML("path/to/beans.xml"); // create empty instance if null passed, or maybe just have a variant without a parameter
(obviously corresponding API's using File and such are fine)
having this code, seems silly when the underlying logic could figure it out, once it knows what to return.
{code:java}
public static JavaArchive testJarH2() {
return testJar()
.addPackage( "com.lm.repository.sql" )
.addAsManifestResource(
"wildfly/persistence.xml",
"persistence.xml"
);
}
public static WebArchive testWarH2() {
return testWar()
.addPackage( "com.lm.repository.sql" )
.addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" )
.addAsResource(
"wildfly/persistence.xml",
"META-INF/persistence.xml"
);
}
{code}
was:
I'd like to see API's such as the following, that just put the file in the right place with the right name on the classpath.
Archive.addPersistenceXML("path/to/persistence.xml")
Archive.addBeansXML("path/to/beans.xml"); // create empty instance if null passed, or maybe just have a variant without a parameter
(obviously corresponding API's using File and such are fine)
having this code, seems silly when the underlying logic could figure it out, once it knows what to return.
public static JavaArchive testJarH2() {
return testJar()
.addPackage( "com.lm.repository.sql" )
.addAsManifestResource(
"wildfly/persistence.xml",
"persistence.xml"
);
}
public static WebArchive testWarH2() {
return testWar()
.addPackage( "com.lm.repository.sql" )
.addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" )
.addAsResource(
"wildfly/persistence.xml",
"META-INF/persistence.xml"
);
}
> improved simpler api's
> ----------------------
>
> Key: SHRINKWRAP-484
> URL: https://issues.jboss.org/browse/SHRINKWRAP-484
> Project: ShrinkWrap
> Issue Type: Feature Request
> Reporter: Caleb Cushing
>
> I'd like to see API's such as the following, that just put the file in the right place with the right name on the classpath.
> Archive.addPersistenceXML("path/to/persistence.xml")
> Archive.addBeansXML("path/to/beans.xml"); // create empty instance if null passed, or maybe just have a variant without a parameter
> (obviously corresponding API's using File and such are fine)
> having this code, seems silly when the underlying logic could figure it out, once it knows what to return.
> {code:java}
> public static JavaArchive testJarH2() {
> return testJar()
> .addPackage( "com.lm.repository.sql" )
> .addAsManifestResource(
> "wildfly/persistence.xml",
> "persistence.xml"
> );
> }
> public static WebArchive testWarH2() {
> return testWar()
> .addPackage( "com.lm.repository.sql" )
> .addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" )
> .addAsResource(
> "wildfly/persistence.xml",
> "META-INF/persistence.xml"
> );
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
9 years, 11 months
[JBoss JIRA] (SHRINKWRAP-484) improved simpler api's
by Caleb Cushing (JIRA)
Caleb Cushing created SHRINKWRAP-484:
----------------------------------------
Summary: improved simpler api's
Key: SHRINKWRAP-484
URL: https://issues.jboss.org/browse/SHRINKWRAP-484
Project: ShrinkWrap
Issue Type: Feature Request
Reporter: Caleb Cushing
I'd like to see API's such as the following, that just put the file in the right place with the right name on the classpath.
Archive.addPersistenceXML("path/to/persistence.xml")
Archive.addBeansXML("path/to/beans.xml"); // create empty instance if null passed, or maybe just have a variant without a parameter
(obviously corresponding API's using File and such are fine)
having this code, seems silly when the underlying logic could figure it out, once it knows what to return.
public static JavaArchive testJarH2() {
return testJar()
.addPackage( "com.lm.repository.sql" )
.addAsManifestResource(
"wildfly/persistence.xml",
"persistence.xml"
);
}
public static WebArchive testWarH2() {
return testWar()
.addPackage( "com.lm.repository.sql" )
.addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" )
.addAsResource(
"wildfly/persistence.xml",
"META-INF/persistence.xml"
);
}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
9 years, 11 months
[JBoss JIRA] (SHRINKRES-182) ShrinkWrap Resolver sometimes can't resolve a dependency with EJB packaging
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-182?page=com.atlassian.jira.plu... ]
Karel Piwko closed SHRINKRES-182.
---------------------------------
> ShrinkWrap Resolver sometimes can't resolve a dependency with EJB packaging
> ---------------------------------------------------------------------------
>
> Key: SHRINKRES-182
> URL: https://issues.jboss.org/browse/SHRINKRES-182
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Components: impl-maven
> Affects Versions: 2.1.0
> Reporter: Ron Šmeral
> Assignee: Karel Piwko
> Fix For: 2.1.1, 2.2.0-alpha-3
>
>
> Several Seam example integration tests fail when creating the deployment for testing, due to an exception in resoution of the {{org.jboss.seam:jboss-seam}} artifact, which is an artifact with EJB packaging.
> {noformat}
> java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.Archive org.jboss.seam.example.booking.test.BookingTest.createDeployment()
> ...
> Caused by: org.jboss.shrinkwrap.resolver.api.NoResolvedResultException: Unable to collect/resolve dependency tree for a resolution due to: Could not find artifact org.jboss.seam:jboss-seam:ejb:2.3.4.Final-redhat-1 in wfk2-enterprise-repository
> ...
> Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact org.jboss.seam:jboss-seam:ejb:2.3.4.Final-redhat-1 in wfk2-enterprise-repository
> ...
> Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.jboss.seam:jboss-seam:ejb:2.3.4.Final-redhat-1 in wfk2-enterprise-repository
> ...
> Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.jboss.seam:jboss-seam:ejb:2.3.4.Final-redhat-1 in wfk2-enterprise-repository
> {noformat}
> It is quite suspicious, that SWR tries to download a file with an {{ejb}} extension, which would be obviously wrong:
> {noformat}
> WARNING: Failed downloading org/jboss/seam/jboss-seam/2.3.4.Final-redhat-1/jboss-seam-2.3.4.Final-redhat-1.ejb from file:///qa/hudson_workspace/workspace/wfk-2.x-seam-2.3-eap6-itest/dc63a4c9/wfk-qa/build/configuration/../../../jboss-wfk-2.6.0-maven-repository/.
> {noformat}
> This behaviour is seemingly not consistent, but is deterministic - it happens only in some projects, but in those, it happens every time.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
9 years, 12 months