[JBoss JIRA] (SHRINKRES-242) Files without license headers
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-242?page=com.atlassian.jira.plu... ]
Matous Jobanek updated SHRINKRES-242:
-------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/shrinkwrap/resolver/pull/105
> Files without license headers
> -----------------------------
>
> Key: SHRINKRES-242
> URL: https://issues.jboss.org/browse/SHRINKRES-242
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Affects Versions: 2.2.2
> Environment: Fedora Linux
> Reporter: gil cattaneo
> Assignee: Matous Jobanek
>
> Hi
> The following source files are without license headers:
> ./api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/repository/MavenChecksumPolicy.java
> ./api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/repository/MavenUpdatePolicy.java
> ./api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/repository/MavenRemoteRepository.java
> ./api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/repository/MavenRemoteRepositories.java
> ./api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/repository/MavenRemoteRepositoryImpl.java
> ./api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/MavenArtifactInfo.java
> ./impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/MavenArtifactInfoImpl.java
> ./impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/GetTcclAction.java
> ./impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/MavenResolveStageBaseImpl.java
> ./impl-gradle-embedded-archive/src/it/jar-sample/src/main/java/test/JarClass.java
> ./impl-gradle-embedded-archive/src/it/jar-sample/src/main/java/test/nested/NestedJarClass.java
> ./impl-gradle-embedded-archive/src/it/multi-module-sample/module-one/src/main/java/test/JarClass.java
> ./impl-gradle-embedded-archive/src/it/war-sample/src/main/java/test/nested/NestedWarClass.java
> ./impl-maven-archive/src/it/jar-sample/src/main/java/test/JarClass.java
> ./impl-maven-archive/src/it/jar-sample/src/main/java/test/nested/NestedJarClass.java
> ./impl-maven-archive/src/it/jar-with-mf-sample/src/main/java/test/JarClass.java
> ./impl-maven-archive/src/it/jar-without-resources/src/main/java/test/JarClass.java
> ./impl-maven-archive/src/it/jar-without-resources/src/main/java/test/nested/NestedJarClass.java
> ./impl-maven-archive/src/it/war-sample/src/main/java/test/nested/NestedWarClass.java
> ./impl-maven-integration-tests/jar-sample/src/main/java/test/JarClass.java
> ./maven-plugin/src/it/context-propagation/src/test/java/org/jboss/shrinkwrap/resolver/plugin/test/PluginIntegrationTestCase.java
> ./maven-plugin/src/it/context-propagation/src/test/java/org/jboss/shrinkwrap/resolver/plugin/test/ExecutionPropagationTestCase.java
> Please, add license header
> https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging...
> Thanks in advance
> Regards
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (SHRINKRES-250) Resolve (transitive) dependencies for WAR artifacts
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-250?page=com.atlassian.jira.plu... ]
Matous Jobanek commented on SHRINKRES-250:
------------------------------------------
Hi,
first of all, I'd like to apologize for the delay of our answer.
The behavior you described above is caused by Aether. Aether is a library for working with artifact repositories. This library is used by Resolver and it basically does the same things as Maven itself.
It is same in this case as well - Maven doesn't resolve transitive dependencies of a war declared as dependency of a project. There is also a issue related to this use-case: https://issues.apache.org/jira/browse/MNG-1991
If you tried to get a dependency tree of a project that contains your dependency:
{code:xml}
<dependency>
<groupId>io.fabric8.jube</groupId>
<artifactId>war</artifactId>
<version>2.2.0</version>
<type>war</type>
</dependency>
{code}
then the tree that you get would look like this:
{noformat}
[INFO] my.reproducer:SHRINKRES-250:jar:1.0-SNAPSHOT
[INFO] \- io.fabric8.jube:war:war:2.2.0:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
{noformat}
As you can see, there is no discrepancy in behavior of Maven and Resolver.
But if you changed the type to {{pom}}, then all transitive dependencies would be resolved. Same it is in case of Resolver - if you used this:
{code:java}
Maven.resolver().resolve("io.fabric8.jube:war:pom:2.2.0").withTransitivity().asResolvedArtifact();
{code}
then all transitive deps would be resolved.
> Resolve (transitive) dependencies for WAR artifacts
> ---------------------------------------------------
>
> Key: SHRINKRES-250
> URL: https://issues.jboss.org/browse/SHRINKRES-250
> Project: ShrinkWrap Resolvers
> Issue Type: Feature Request
> Affects Versions: 2.2.2
> Reporter: Willem Salembier
> Attachments: ShrinkWrapTest.java
>
>
> Is there a way to resolve the (transitive) dependencies of a WAR artifacts, using the default resolve method? The behavior seems different in comparison to JAR artifacts. Is this intentional?
> It does work if you start a resolver from a pom file.
> {code}
> System.out.println("JAR dependencies via resolve");
> MavenResolvedArtifact[] artifacts = Maven.resolver().resolve("io.fabric8:fabric8-cxf:jar:2.2.0").withTransitivity().asResolvedArtifact();
> for (MavenResolvedArtifact artifact : artifacts) {
> System.out.println(artifact);
> }
> System.out.println("No WAR dependencies via resolve");
> artifacts = Maven.resolver().resolve("io.fabric8.jube:war:war:2.2.0").withTransitivity().asResolvedArtifact();
> for (MavenResolvedArtifact artifact : artifacts) {
> System.out.println(artifact);
> }
> System.out.println("All WAR dependencies via pom file");
> artifacts = Maven.resolver().loadPomFromFile(artifacts[0].asFile().getAbsolutePath().replace(".war", ".pom")).importRuntimeDependencies().resolve().withTransitivity().asResolvedArtifact();
> for (MavenResolvedArtifact artifact : artifacts) {
> System.out.println(artifact);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (SHRINKRES-258) java.io.StreamCorruptedException when using EmbeddedGradleImporter
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-258?page=com.atlassian.jira.plu... ]
Matous Jobanek closed SHRINKRES-258.
------------------------------------
Assignee: Matous Jobanek
Resolution: Cannot Reproduce Bug
Hi, I'm closing this issue as it doesn't seem to be a bug in ShrinkWrap Resolver.
Feel free to reopen it if you don't agree or if you find something new.
> java.io.StreamCorruptedException when using EmbeddedGradleImporter
> ------------------------------------------------------------------
>
> Key: SHRINKRES-258
> URL: https://issues.jboss.org/browse/SHRINKRES-258
> Project: ShrinkWrap Resolvers
> Issue Type: Support Request
> Components: gradle
> Affects Versions: 3.0.0-alpha-1, 2.2.4
> Environment: Windows 7, Wildfly10, Gradle 2.11, JVM 1.8.0_73
> Reporter: Michael McLean
> Assignee: Matous Jobanek
>
> Started om the example https://github.com/mmatloka/arquillian-gradle-sample/tree/master/single-m.... Works fine.
> I setup basically the same example code in a moderately complex app with about 25 dependencies in build.gradle.
> With more complex dependencies running "gradle test" produces
> {code:java}
> java.lang.IllegalStateException: Error launching test com.capitalroad.arquillian.tests.PartyImportGradleImporter public void com.capitalroad.arquillian.tests.PartyImportGradleImporter.shouldCreateGreeting()
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:104)
> at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ...
> Caused by: java.io.StreamCorruptedException: invalid stream header: 3C21444F
> at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:806)
> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:194)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:121)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:99)
> ... 96 more
> {code}
> If I change from
> {code:java}
> @Deployment
> public static WebArchive createDeployment() {
> return ShrinkWrap.create(EmbeddedGradleImporter.class)
> .forThisProjectDirectory()
> .importBuildOutput().as(WebArchive.class);
> }
> {code}
> back to
> {code:java}
> @Deployment
> public static WebArchive createDeployment() {
> return ShrinkWrap.create(WebArchive.class)
> .addClass(Greeter.class)
> .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> {code}
>
> the Greeter test runs successfully.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (SHRINKRES-132) MavenImport should have different name
by Matous Jobanek (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-132?page=com.atlassian.jira.plu... ]
Matous Jobanek updated SHRINKRES-132:
-------------------------------------
Fix Version/s: 3.0.0-alpha-3
(was: 3.0.0-alpha-2)
> MavenImport should have different name
> --------------------------------------
>
> Key: SHRINKRES-132
> URL: https://issues.jboss.org/browse/SHRINKRES-132
> Project: ShrinkWrap Resolvers
> Issue Type: Feature Request
> Components: maven
> Affects Versions: 2.0.0
> Reporter: Karel Piwko
> Assignee: Matous Jobanek
> Priority: Minor
> Fix For: 3.0.0-alpha-3
>
>
> MavenImporter is now able to build the project from pom.xml. This means that MavenImporter name is no longer valid, as it does not promote the fact that project will be build from scratch.
> It might be MavenBuilder instead.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (SHRINKRES-258) java.io.StreamCorruptedException when using EmbeddedGradleImporter
by Michael McLean (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-258?page=com.atlassian.jira.plu... ]
Michael McLean commented on SHRINKRES-258:
------------------------------------------
Thanks for taking a look. I exported the war file with
{code:java}
war.as(ZipExporter.class).exportTo(
new File("c:\\temp\\test.zip"), true);
{code}
I compared to the war file from the usual build and it is identical. So not a SHRINKRES issue.
I haven't been able to google up anything else relevant. Any pointers on forums to try would be appreciated.
Thanks for your time.
> java.io.StreamCorruptedException when using EmbeddedGradleImporter
> ------------------------------------------------------------------
>
> Key: SHRINKRES-258
> URL: https://issues.jboss.org/browse/SHRINKRES-258
> Project: ShrinkWrap Resolvers
> Issue Type: Support Request
> Components: gradle
> Affects Versions: 3.0.0-alpha-1, 2.2.4
> Environment: Windows 7, Wildfly10, Gradle 2.11, JVM 1.8.0_73
> Reporter: Michael McLean
>
> Started om the example https://github.com/mmatloka/arquillian-gradle-sample/tree/master/single-m.... Works fine.
> I setup basically the same example code in a moderately complex app with about 25 dependencies in build.gradle.
> With more complex dependencies running "gradle test" produces
> {code:java}
> java.lang.IllegalStateException: Error launching test com.capitalroad.arquillian.tests.PartyImportGradleImporter public void com.capitalroad.arquillian.tests.PartyImportGradleImporter.shouldCreateGreeting()
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:104)
> at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ...
> Caused by: java.io.StreamCorruptedException: invalid stream header: 3C21444F
> at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:806)
> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:194)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:121)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:99)
> ... 96 more
> {code}
> If I change from
> {code:java}
> @Deployment
> public static WebArchive createDeployment() {
> return ShrinkWrap.create(EmbeddedGradleImporter.class)
> .forThisProjectDirectory()
> .importBuildOutput().as(WebArchive.class);
> }
> {code}
> back to
> {code:java}
> @Deployment
> public static WebArchive createDeployment() {
> return ShrinkWrap.create(WebArchive.class)
> .addClass(Greeter.class)
> .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> {code}
>
> the Greeter test runs successfully.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (SHRINKRES-258) java.io.StreamCorruptedException when using EmbeddedGradleImporter
by Andrew Rubinger (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-258?page=com.atlassian.jira.plu... ]
Andrew Rubinger commented on SHRINKRES-258:
-------------------------------------------
Haven't yet seen, but I don't see evidence of this being a SHRINKRES issue yet :)
> java.io.StreamCorruptedException when using EmbeddedGradleImporter
> ------------------------------------------------------------------
>
> Key: SHRINKRES-258
> URL: https://issues.jboss.org/browse/SHRINKRES-258
> Project: ShrinkWrap Resolvers
> Issue Type: Support Request
> Components: gradle
> Affects Versions: 3.0.0-alpha-1, 2.2.4
> Environment: Windows 7, Wildfly10, Gradle 2.11, JVM 1.8.0_73
> Reporter: Michael McLean
>
> Started om the example https://github.com/mmatloka/arquillian-gradle-sample/tree/master/single-m.... Works fine.
> I setup basically the same example code in a moderately complex app with about 25 dependencies in build.gradle.
> With more complex dependencies running "gradle test" produces
> {code:java}
> java.lang.IllegalStateException: Error launching test com.capitalroad.arquillian.tests.PartyImportGradleImporter public void com.capitalroad.arquillian.tests.PartyImportGradleImporter.shouldCreateGreeting()
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:104)
> at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ...
> Caused by: java.io.StreamCorruptedException: invalid stream header: 3C21444F
> at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:806)
> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:194)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:121)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:99)
> ... 96 more
> {code}
> If I change from
> {code:java}
> @Deployment
> public static WebArchive createDeployment() {
> return ShrinkWrap.create(EmbeddedGradleImporter.class)
> .forThisProjectDirectory()
> .importBuildOutput().as(WebArchive.class);
> }
> {code}
> back to
> {code:java}
> @Deployment
> public static WebArchive createDeployment() {
> return ShrinkWrap.create(WebArchive.class)
> .addClass(Greeter.class)
> .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> {code}
>
> the Greeter test runs successfully.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months
[JBoss JIRA] (SHRINKRES-258) java.io.StreamCorruptedException when using EmbeddedGradleImporter
by Michal Matloka (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-258?page=com.atlassian.jira.plu... ]
Michal Matloka commented on SHRINKRES-258:
------------------------------------------
I've googled a bit:
1) https://developer.jboss.org/thread/241757 similar exception, but tomcat, jdk 7, gradle, just creating zip file from ready war using plain shrinkwrap
2) https://gist.github.com/bobmcwhirter/6d36f8e27e03cf22be5e6e3d78d3ba45 wildfly swarm with arquillian and spring boot
Maybe it's something related to archive size, related rather to arq core? [~alrubinger] [~aslak] [~bmajsak] have you encountered something similar?
> java.io.StreamCorruptedException when using EmbeddedGradleImporter
> ------------------------------------------------------------------
>
> Key: SHRINKRES-258
> URL: https://issues.jboss.org/browse/SHRINKRES-258
> Project: ShrinkWrap Resolvers
> Issue Type: Support Request
> Components: gradle
> Affects Versions: 3.0.0-alpha-1, 2.2.4
> Environment: Windows 7, Wildfly10, Gradle 2.11, JVM 1.8.0_73
> Reporter: Michael McLean
>
> Started om the example https://github.com/mmatloka/arquillian-gradle-sample/tree/master/single-m.... Works fine.
> I setup basically the same example code in a moderately complex app with about 25 dependencies in build.gradle.
> With more complex dependencies running "gradle test" produces
> {code:java}
> java.lang.IllegalStateException: Error launching test com.capitalroad.arquillian.tests.PartyImportGradleImporter public void com.capitalroad.arquillian.tests.PartyImportGradleImporter.shouldCreateGreeting()
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:104)
> at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:109)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ...
> Caused by: java.io.StreamCorruptedException: invalid stream header: 3C21444F
> at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:806)
> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.execute(ServletMethodExecutor.java:194)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:121)
> at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:99)
> ... 96 more
> {code}
> If I change from
> {code:java}
> @Deployment
> public static WebArchive createDeployment() {
> return ShrinkWrap.create(EmbeddedGradleImporter.class)
> .forThisProjectDirectory()
> .importBuildOutput().as(WebArchive.class);
> }
> {code}
> back to
> {code:java}
> @Deployment
> public static WebArchive createDeployment() {
> return ShrinkWrap.create(WebArchive.class)
> .addClass(Greeter.class)
> .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> {code}
>
> the Greeter test runs successfully.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 5 months