Re: ant git commit: bz-62952 Make AntClassLoader multi-release jar aware when it deals with java.util.jar.JarFile

2018-12-12 Thread Stefan Bodewig
[sorry for the delay, am pretty much swamped right now, I know this
makes dialogue difficult]

On 2018-12-09, Jaikiran Pai wrote:

> On 09/12/18 3:18 PM, Stefan Bodewig wrote:
>> On 2018-12-05,  wrote:

>>> Repository: ant
>>> Updated Branches:
>>>   refs/heads/master ac46ff190 -> 593aff2d2

>>> bz-62952 Make AntClassLoader multi-release jar aware when it deals with 
>>> java.util.jar.JarFile

>> An alternative approach to using reflection when creating the JarFile
>> instance would be to create different AntClassLoader instances. We did
>> so for Java 2.x and Java 5.x respectively when the baselines were 1.1 or
>> anything lower than 1.5.

> I did check it out before going with this approach. I decided to go with
> this approach because at this point, for just this change, this looked a
> bit more simpler than having to introduce the new classloader which then
> would have to use the new Java 9 JarFile API at compile time and would
> involve build file updates.

Good. It's not been my intention to push you in any direction, just
wanted to mention the alternative that we've used in the past. If you've
been aware of it and decided against it for good reasons that is
fine. Applying YAGNI and taking a more invasive approach once it is
called for but not right now is fine with me.

Stefan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant pull request #80: Added tasks for JDK's jmod and jlink tools.

2018-12-12 Thread bodewig
Github user bodewig commented on a diff in the pull request:

https://github.com/apache/ant/pull/80#discussion_r241292280
  
--- Diff: src/main/org/apache/tools/ant/taskdefs/modules/Jmod.java ---
@@ -0,0 +1,1282 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.apache.tools.ant.taskdefs.modules;
+
+import java.io.File;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.io.IOException;
+
+import java.nio.file.Files;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.ArrayList;
+
+import java.util.Map;
+import java.util.LinkedHashMap;
+
+import java.util.Collections;
+
+import java.util.spi.ToolProvider;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+
+import org.apache.tools.ant.util.MergingMapper;
+import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.ant.util.ResourceUtils;
+
+import org.apache.tools.ant.types.EnumeratedAttribute;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.ModuleVersion;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.Reference;
+import org.apache.tools.ant.types.Resource;
+import org.apache.tools.ant.types.ResourceCollection;
+
+import org.apache.tools.ant.types.resources.FileResource;
+import org.apache.tools.ant.types.resources.Union;
+
+/**
+ * Creates a linkable .jmod file from a modular jar file, and optionally 
from
+ * other resource files such as native libraries and documents.  Equivalent
+ * to the JDK's
+ * https://docs.oracle.com/en/java/javase/11/tools/jmod.html";>jmod
+ * tool.
+ * 
+ * Supported attributes:
+ * 
+ * {@code destFile}
+ * Required, jmod file to create.
+ * {@code classpath}
+ * {@code classpathref}
+ * Where to locate files to be placed in the jmod file.
+ * {@code modulepath}
+ * {@code modulepathref}
+ * Where to locate dependencies.
+ * {@code commandpath}
+ * {@code commandpathref}
+ * Directories containing native commands to include in jmod.
+ * {@code headerpath}
+ * {@code headerpathref}
+ * Directories containing header files to include in jmod.
+ * {@code configpath}
+ * {@code configpathref}
+ * Directories containing user-editable configuration files
+ * to include in jmod.
+ * {@code legalpath}
+ * {@code legalpathref}
+ * Directories containing legal licenses and notices to include in 
jmod.
+ * {@code nativelibpath}
+ * {@code nativelibpathref}
+ * Directories containing native libraries to include in jmod.
+ * {@code manpath}
+ * {@code manpathref}
+ * Directories containing man pages to include in jmod.
+ * {@code version}
+ * Module https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/module/ModuleDescriptor.Version.html";>version.
+ * {@code mainclass}
+ * Main class of module.
+ * {@code platform}
+ * The target platform for the jmod.  A particular JDK's platform
+ * can be seen by running
+ * jmod describe $JDK_HOME/jmods/java.base.jmod | grep -i 
platform.
+ * {@code hashModulesPattern}
+ * Regular expression for names of modules in the module path
+ * which depend on the jmod being created, and which should have
+ * hashes generated for them and included in the new jmod.
+ * {@code resolveByDefault}
+ * Boolean indicating whether the jmod should be one of
+ * the default resolved modules in an application.  Default is true.
+ * {@code moduleWarnings}
+ * Whether to emit warnings when resolving modules which are
+ * not recommended for use.  Comma-separated list of one of more of
+ * the following:
+ * 
+ * {@code deprecated}
+ * Warn if module is deprecated
+ * {@code leaving}
+ * Warn if module is deprecated for r

[GitHub] ant issue #80: Added tasks for JDK's jmod and jlink tools.

2018-12-12 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/ant/pull/80
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/Ant%20Github-PR-Linux/97/



---

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant issue #80: Added tasks for JDK's jmod and jlink tools.

2018-12-12 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/ant/pull/80
  

Refer to this link for build results (access rights to CI server needed): 
https://builds.apache.org/job/Ant%20Github-PR-Windows/103/



---

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant issue #80: Added tasks for JDK's jmod and jlink tools.

2018-12-12 Thread bodewig
Github user bodewig commented on the issue:

https://github.com/apache/ant/pull/80
  
BSD is perfectly fine, thanks.


---

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant pull request #80: Added tasks for JDK's jmod and jlink tools.

2018-12-12 Thread craigpell
Github user craigpell commented on a diff in the pull request:

https://github.com/apache/ant/pull/80#discussion_r241010770
  
--- Diff: src/main/org/apache/tools/ant/taskdefs/modules/Jmod.java ---
@@ -0,0 +1,1282 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.apache.tools.ant.taskdefs.modules;
+
+import java.io.File;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.io.IOException;
+
+import java.nio.file.Files;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.ArrayList;
+
+import java.util.Map;
+import java.util.LinkedHashMap;
+
+import java.util.Collections;
+
+import java.util.spi.ToolProvider;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+
+import org.apache.tools.ant.util.MergingMapper;
+import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.ant.util.ResourceUtils;
+
+import org.apache.tools.ant.types.EnumeratedAttribute;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.ModuleVersion;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.Reference;
+import org.apache.tools.ant.types.Resource;
+import org.apache.tools.ant.types.ResourceCollection;
+
+import org.apache.tools.ant.types.resources.FileResource;
+import org.apache.tools.ant.types.resources.Union;
+
+/**
+ * Creates a linkable .jmod file from a modular jar file, and optionally 
from
+ * other resource files such as native libraries and documents.  Equivalent
+ * to the JDK's
+ * https://docs.oracle.com/en/java/javase/11/tools/jmod.html";>jmod
+ * tool.
+ * 
+ * Supported attributes:
+ * 
+ * {@code destFile}
+ * Required, jmod file to create.
+ * {@code classpath}
+ * {@code classpathref}
+ * Where to locate files to be placed in the jmod file.
+ * {@code modulepath}
+ * {@code modulepathref}
+ * Where to locate dependencies.
+ * {@code commandpath}
+ * {@code commandpathref}
+ * Directories containing native commands to include in jmod.
+ * {@code headerpath}
+ * {@code headerpathref}
+ * Directories containing header files to include in jmod.
+ * {@code configpath}
+ * {@code configpathref}
+ * Directories containing user-editable configuration files
+ * to include in jmod.
+ * {@code legalpath}
+ * {@code legalpathref}
+ * Directories containing legal licenses and notices to include in 
jmod.
+ * {@code nativelibpath}
+ * {@code nativelibpathref}
+ * Directories containing native libraries to include in jmod.
+ * {@code manpath}
+ * {@code manpathref}
+ * Directories containing man pages to include in jmod.
+ * {@code version}
+ * Module https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/module/ModuleDescriptor.Version.html";>version.
+ * {@code mainclass}
+ * Main class of module.
+ * {@code platform}
+ * The target platform for the jmod.  A particular JDK's platform
+ * can be seen by running
+ * jmod describe $JDK_HOME/jmods/java.base.jmod | grep -i 
platform.
+ * {@code hashModulesPattern}
+ * Regular expression for names of modules in the module path
+ * which depend on the jmod being created, and which should have
+ * hashes generated for them and included in the new jmod.
+ * {@code resolveByDefault}
+ * Boolean indicating whether the jmod should be one of
+ * the default resolved modules in an application.  Default is true.
+ * {@code moduleWarnings}
+ * Whether to emit warnings when resolving modules which are
+ * not recommended for use.  Comma-separated list of one of more of
+ * the following:
+ * 
+ * {@code deprecated}
+ * Warn if module is deprecated
+ * {@code leaving}
+ * Warn if module is deprecated for