[JBoss JIRA] (SHRINKRES-291) ShrinkWrap Resolver for Gradle is not compatible with Java 10.0.2
by Thomas Schnell (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-291?page=com.atlassian.jira.plu... ]
Thomas Schnell updated SHRINKRES-291:
-------------------------------------
Description:
I'm trying to use the ShrinkWrap Resolver for Gradle with Java 10.0.2 and Gradle 4.9. Unfortunately, I get following error: {{Could not determine java version from '10.0.2'.}} as soon as I call:
{code:java}
ShrinkWrap.create(EmbeddedGradleImporter.class).forThisProjectDirectory().importBuildOutput().as(WebArchive.class);
{code}
I guess the used Gradle Tooling API in 3.1.3 is outdated, as you can see in [pom.xml|https://github.com/shrinkwrap/resolver/blob/master/pom.xml]. Also I would like to point out, that the Tooling API will be removed in [Gradle 5.0|https://docs.gradle.org/current/userguide/embedding.html#java_version].
The ShrinkWrap works fine with Java 8.
was:
I'm trying to use the ShrinkWrap Resolver for Gradle with Java 10.0.2 and Gradle 4.9. Unfortunately, I get following error: {{Could not determine java version from '10.0.2'.}} as soon as I call:
{code:java}
ShrinkWrap.create(EmbeddedGradleImporter.class).forThisProjectDirectory().importBuildOutput().as(WebArchive.class);
{code}
I guess the used Gradle Tooling API in 3.1.3 is outdated, as you can see in [pom.xml|https://github.com/shrinkwrap/resolver/blob/master/pom.xml]. Also I would like to point out, that the Tooling API will be removed in [Gradle 5.0|https://docs.gradle.org/current/userguide/embedding.html#java_version].
> ShrinkWrap Resolver for Gradle is not compatible with Java 10.0.2
> -----------------------------------------------------------------
>
> Key: SHRINKRES-291
> URL: https://issues.jboss.org/browse/SHRINKRES-291
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Components: api, gradle
> Affects Versions: 3.1.3
> Environment: - {{org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-gradle:3.1.3}}.
> - {{org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-gradle-depchain:3.1.3}}.
> - {{Java 10.0.2 2018-07-17}}.
> - {{Gradle 4.9}}.
> Reporter: Thomas Schnell
> Attachments: stacktrace.log
>
>
> I'm trying to use the ShrinkWrap Resolver for Gradle with Java 10.0.2 and Gradle 4.9. Unfortunately, I get following error: {{Could not determine java version from '10.0.2'.}} as soon as I call:
> {code:java}
> ShrinkWrap.create(EmbeddedGradleImporter.class).forThisProjectDirectory().importBuildOutput().as(WebArchive.class);
> {code}
> I guess the used Gradle Tooling API in 3.1.3 is outdated, as you can see in [pom.xml|https://github.com/shrinkwrap/resolver/blob/master/pom.xml]. Also I would like to point out, that the Tooling API will be removed in [Gradle 5.0|https://docs.gradle.org/current/userguide/embedding.html#java_version].
> The ShrinkWrap works fine with Java 8.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
5 years, 8 months
[JBoss JIRA] (SHRINKRES-291) ShrinkWrap Resolver for Gradle is not compatible with Java 10.0.2
by Thomas Schnell (JIRA)
Thomas Schnell created SHRINKRES-291:
----------------------------------------
Summary: ShrinkWrap Resolver for Gradle is not compatible with Java 10.0.2
Key: SHRINKRES-291
URL: https://issues.jboss.org/browse/SHRINKRES-291
Project: ShrinkWrap Resolvers
Issue Type: Feature Request
Components: api, gradle
Affects Versions: 3.1.3
Environment: - {{org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-gradle:3.1.3}}.
- {{org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-gradle-depchain:3.1.3}}.
- {{Java 10.0.2 2018-07-17}}.
- {{Gradle 4.9}}.
Reporter: Thomas Schnell
Attachments: stacktrace.log
I'm trying to use the ShrinkWrap Resolver for Gradle with Java 10.0.2 and Gradle 4.9. Unfortunately, I get following error: {{Could not determine java version from '10.0.2'.}} as soon as I call:
{code:java}
ShrinkWrap.create(EmbeddedGradleImporter.class).forThisProjectDirectory().importBuildOutput().as(WebArchive.class);
{code}
I guess the used Gradle Tooling API in 3.1.3 is outdated, as you can see in [pom.xml|https://github.com/shrinkwrap/resolver/blob/master/pom.xml]. Also I would like to point out, that the Tooling API will be removed in [Gradle 5.0|https://docs.gradle.org/current/userguide/embedding.html#java_version].
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
5 years, 8 months
[JBoss JIRA] (SHRINKRES-290) Shrinkwrap resolver does not honor war dependencies
by Mark S (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-290?page=com.atlassian.jira.plu... ]
Mark S commented on SHRINKRES-290:
----------------------------------
Since this is related to SHRINKRES-263, what are your thoughts on this [~mjobanek] and [~florian.besser] ?
> Shrinkwrap resolver does not honor war dependencies
> ---------------------------------------------------
>
> Key: SHRINKRES-290
> URL: https://issues.jboss.org/browse/SHRINKRES-290
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Components: maven
> Affects Versions: 3.0.0-alpha-3, 2.2.6
> Environment: * Windows 10
> * Eclipse Photon (4.8.0)
> * org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-impl-maven/2.2.6/shrinkwrap-resolver-impl-maven-2.2.6.jar
> Reporter: Mark S
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> The recent code changes breaks Eclipse Arquillian's use of ShrinkWrap for importing *.war dependencies.
> The File "root" variable gets incorrectly created for a war ("C:\dev\source\myproject\myproject-engine\target\classes" becomes "C:\dev\source\myproject\myproject-engine\target\myproject-engine-0.0.1-SNAPSHOT"), which results in the following exception being thrown
> {code:java}
> Caused by: java.lang.IllegalArgumentException: [SHRINKWRAP-93] Cannot use this JDK-based implementation to export as ZIP an archive with no content: myproject-engine-7035561881071493650.war: 0 assets
> {code}
> Looking at the code there seems to be a couple of issues
> * If you don't build with Maven you may NOT create the war artifact in the expected location.
> * If the Maven war artifact has been defined in the pom.xml with a final name it will not be found. For example - {code:xml}<build>
> <finalName>myproject-engine</finalName>
> </build>{code}
> * There is no fallback mechanism, if the war build location is not found. What I think should happen is that it falls back to default classes directory (Such as when Eclipse outputs to the classes directory)
> _*This is no such issue with shrinkwrap-resolver-impl-maven-2.2.4.jar*_
> *+Code Details+*
> * https://github.com/shrinkwrap/resolver/compare/2.2.4...2.2.6
> * impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/MavenResolvedArtifactImpl.java
> *+Details+*
> {code:java}
> File root = new File(artifact.getFile().getParentFile(), "target/classes");
> if (!Validate.isNullOrEmpty(classifier) && "tests".equals(classifier)) {
> // SHRINKRES-102, allow test classes to be packaged as well
> root = new File(artifact.getFile().getParentFile(), "target/test-classes");
> } else if ("war".equals(artifact.getProperty(ArtifactProperties.TYPE, null))) {
> // SHRINKRES-263, allow .war files to be packaged as well
> root = new File(artifact.getFile().getParentFile(), "target/" + artifactId + "-" + artifact.getVersion());
> }
> try {
> File archive = File.createTempFile(artifactId + "-", "." + extension);
> archive.deleteOnExit();
> PackageDirHelper.packageDirectories(archive, root);
> return archive;
> } catch (IOException e) {
> throw new IllegalArgumentException("Unable to get artifact " + artifactId + " from the classpath", e);
> }
> {code}
> This issue is related to SHRINKRES-263
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
5 years, 8 months
[JBoss JIRA] (SHRINKRES-290) Shrinkwrap resolver does not honor war dependencies
by Mark S (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-290?page=com.atlassian.jira.plu... ]
Mark S updated SHRINKRES-290:
-----------------------------
Affects Version/s: 3.0.0-alpha-3
> Shrinkwrap resolver does not honor war dependencies
> ---------------------------------------------------
>
> Key: SHRINKRES-290
> URL: https://issues.jboss.org/browse/SHRINKRES-290
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Components: maven
> Affects Versions: 3.0.0-alpha-3, 2.2.6
> Environment: * Windows 10
> * Eclipse Photon (4.8.0)
> * org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-impl-maven/2.2.6/shrinkwrap-resolver-impl-maven-2.2.6.jar
> Reporter: Mark S
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> The recent code changes breaks Eclipse Arquillian's use of ShrinkWrap for importing *.war dependencies.
> The File "root" variable gets incorrectly created for a war ("C:\dev\source\myproject\myproject-engine\target\classes" becomes "C:\dev\source\myproject\myproject-engine\target\myproject-engine-0.0.1-SNAPSHOT"), which results in the following exception being thrown
> {code:java}
> Caused by: java.lang.IllegalArgumentException: [SHRINKWRAP-93] Cannot use this JDK-based implementation to export as ZIP an archive with no content: myproject-engine-7035561881071493650.war: 0 assets
> {code}
> Looking at the code there seems to be a couple of issues
> * If you don't build with Maven you may NOT create the war artifact in the expected location.
> * If the Maven war artifact has been defined in the pom.xml with a final name it will not be found. For example - {code:xml}<build>
> <finalName>myproject-engine</finalName>
> </build>{code}
> * There is no fallback mechanism, if the war build location is not found. What I think should happen is that it falls back to default classes directory (Such as when Eclipse outputs to the classes directory)
> _*This is no such issue with shrinkwrap-resolver-impl-maven-2.2.4.jar*_
> *+Code Details+*
> * https://github.com/shrinkwrap/resolver/compare/2.2.4...2.2.6
> * impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/MavenResolvedArtifactImpl.java
> *+Details+*
> {code:java}
> File root = new File(artifact.getFile().getParentFile(), "target/classes");
> if (!Validate.isNullOrEmpty(classifier) && "tests".equals(classifier)) {
> // SHRINKRES-102, allow test classes to be packaged as well
> root = new File(artifact.getFile().getParentFile(), "target/test-classes");
> } else if ("war".equals(artifact.getProperty(ArtifactProperties.TYPE, null))) {
> // SHRINKRES-263, allow .war files to be packaged as well
> root = new File(artifact.getFile().getParentFile(), "target/" + artifactId + "-" + artifact.getVersion());
> }
> try {
> File archive = File.createTempFile(artifactId + "-", "." + extension);
> archive.deleteOnExit();
> PackageDirHelper.packageDirectories(archive, root);
> return archive;
> } catch (IOException e) {
> throw new IllegalArgumentException("Unable to get artifact " + artifactId + " from the classpath", e);
> }
> {code}
> This issue is related to SHRINKRES-263
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
5 years, 8 months
[JBoss JIRA] (SHRINKRES-290) Shrinkwrap resolver does not honor war dependencies
by Mark S (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-290?page=com.atlassian.jira.plu... ]
Mark S updated SHRINKRES-290:
-----------------------------
Component/s: maven
> Shrinkwrap resolver does not honor war dependencies
> ---------------------------------------------------
>
> Key: SHRINKRES-290
> URL: https://issues.jboss.org/browse/SHRINKRES-290
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Components: maven
> Affects Versions: 2.2.6
> Environment: * Windows 10
> * Eclipse Photon (4.8.0)
> * org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-impl-maven/2.2.6/shrinkwrap-resolver-impl-maven-2.2.6.jar
> Reporter: Mark S
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> The recent code changes breaks Eclipse Arquillian's use of ShrinkWrap for importing *.war dependencies.
> The File "root" variable gets incorrectly created for a war ("C:\dev\source\myproject\myproject-engine\target\classes" becomes "C:\dev\source\myproject\myproject-engine\target\myproject-engine-0.0.1-SNAPSHOT"), which results in the following exception being thrown
> {code:java}
> Caused by: java.lang.IllegalArgumentException: [SHRINKWRAP-93] Cannot use this JDK-based implementation to export as ZIP an archive with no content: myproject-engine-7035561881071493650.war: 0 assets
> {code}
> Looking at the code there seems to be a couple of issues
> * If you don't build with Maven you may NOT create the war artifact in the expected location.
> * If the Maven war artifact has been defined in the pom.xml with a final name it will not be found. For example - {code:xml}<build>
> <finalName>myproject-engine</finalName>
> </build>{code}
> * There is no fallback mechanism, if the war build location is not found. What I think should happen is that it falls back to default classes directory (Such as when Eclipse outputs to the classes directory)
> _*This is no such issue with shrinkwrap-resolver-impl-maven-2.2.4.jar*_
> *+Code Details+*
> * https://github.com/shrinkwrap/resolver/compare/2.2.4...2.2.6
> * impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/MavenResolvedArtifactImpl.java
> *+Details+*
> {code:java}
> File root = new File(artifact.getFile().getParentFile(), "target/classes");
> if (!Validate.isNullOrEmpty(classifier) && "tests".equals(classifier)) {
> // SHRINKRES-102, allow test classes to be packaged as well
> root = new File(artifact.getFile().getParentFile(), "target/test-classes");
> } else if ("war".equals(artifact.getProperty(ArtifactProperties.TYPE, null))) {
> // SHRINKRES-263, allow .war files to be packaged as well
> root = new File(artifact.getFile().getParentFile(), "target/" + artifactId + "-" + artifact.getVersion());
> }
> try {
> File archive = File.createTempFile(artifactId + "-", "." + extension);
> archive.deleteOnExit();
> PackageDirHelper.packageDirectories(archive, root);
> return archive;
> } catch (IOException e) {
> throw new IllegalArgumentException("Unable to get artifact " + artifactId + " from the classpath", e);
> }
> {code}
> This issue is related to SHRINKRES-263
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
5 years, 8 months
[JBoss JIRA] (SHRINKRES-290) Shrinkwrap resolver does not honor war dependencies
by Mark S (JIRA)
Mark S created SHRINKRES-290:
--------------------------------
Summary: Shrinkwrap resolver does not honor war dependencies
Key: SHRINKRES-290
URL: https://issues.jboss.org/browse/SHRINKRES-290
Project: ShrinkWrap Resolvers
Issue Type: Bug
Affects Versions: 2.2.6
Environment: * Windows 10
* Eclipse Photon (4.8.0)
* org/jboss/shrinkwrap/resolver/shrinkwrap-resolver-impl-maven/2.2.6/shrinkwrap-resolver-impl-maven-2.2.6.jar
Reporter: Mark S
The recent code changes breaks Eclipse Arquillian's use of ShrinkWrap for importing *.war dependencies.
The File "root" variable gets incorrectly created for a war ("C:\dev\source\myproject\myproject-engine\target\classes" becomes "C:\dev\source\myproject\myproject-engine\target\myproject-engine-0.0.1-SNAPSHOT"), which results in the following exception being thrown
{code:java}
Caused by: java.lang.IllegalArgumentException: [SHRINKWRAP-93] Cannot use this JDK-based implementation to export as ZIP an archive with no content: myproject-engine-7035561881071493650.war: 0 assets
{code}
Looking at the code there seems to be a couple of issues
* If you don't build with Maven you may NOT create the war artifact in the expected location.
* If the Maven war artifact has been defined in the pom.xml with a final name it will not be found. For example - {code:xml}<build>
<finalName>myproject-engine</finalName>
</build>{code}
* There is no fallback mechanism, if the war build location is not found. What I think should happen is that it falls back to default classes directory (Such as when Eclipse outputs to the classes directory)
_*This is no such issue with shrinkwrap-resolver-impl-maven-2.2.4.jar*_
*+Code Details+*
* https://github.com/shrinkwrap/resolver/compare/2.2.4...2.2.6
* impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/MavenResolvedArtifactImpl.java
*+Details+*
{code:java}
File root = new File(artifact.getFile().getParentFile(), "target/classes");
if (!Validate.isNullOrEmpty(classifier) && "tests".equals(classifier)) {
// SHRINKRES-102, allow test classes to be packaged as well
root = new File(artifact.getFile().getParentFile(), "target/test-classes");
} else if ("war".equals(artifact.getProperty(ArtifactProperties.TYPE, null))) {
// SHRINKRES-263, allow .war files to be packaged as well
root = new File(artifact.getFile().getParentFile(), "target/" + artifactId + "-" + artifact.getVersion());
}
try {
File archive = File.createTempFile(artifactId + "-", "." + extension);
archive.deleteOnExit();
PackageDirHelper.packageDirectories(archive, root);
return archive;
} catch (IOException e) {
throw new IllegalArgumentException("Unable to get artifact " + artifactId + " from the classpath", e);
}
{code}
This issue is related to SHRINKRES-263
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
5 years, 8 months