Skip to content

Commit

Permalink
libraries release version 1.0.25 unstable; thirdparty updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasWBartels committed May 3, 2017
1 parent 40204bd commit ae2879d
Show file tree
Hide file tree
Showing 58 changed files with 529 additions and 366 deletions.
2 changes: 1 addition & 1 deletion commons/advanced/Commons_Advanced/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-advanced</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/advanced/Commons_Image/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-advanced</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
4 changes: 2 additions & 2 deletions commons/advanced/Commons_Json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-advanced</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down Expand Up @@ -89,7 +89,7 @@
<plugin>
<groupId>net.anwiba.commons.tools</groupId>
<artifactId>anwiba-tools-definition-schema-json</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
<executions>
<execution>
<id>generate</id>
Expand Down
2 changes: 1 addition & 1 deletion commons/advanced/Commons_Message/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-advanced</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/advanced/Commons_Model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-advanced</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/advanced/Commons_NLS/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-advanced</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/advanced/Commons_Preferences/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-advanced</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/advanced/Commons_Process/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-advanced</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/advanced/Commons_Workflow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-advanced</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/advanced/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-default</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/core/Commons_Core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-core</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/core/Commons_Ensure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-core</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/core/Commons_Lang/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-core</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import java.util.Collection;
import java.util.List;
import java.util.function.IntFunction;

import net.anwiba.commons.lang.collection.IObjectList;
import net.anwiba.commons.lang.functional.IAcceptor;
Expand Down Expand Up @@ -56,4 +57,6 @@ public interface IStream<T, E extends Exception> {

public void foreach(IConsumer<T, E> consumer) throws E;

public <O> O[] asArray(IntFunction<O[]> factory) throws E;

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.function.IntFunction;

import net.anwiba.commons.lang.collection.IObjectList;
import net.anwiba.commons.lang.collection.ObjectList;
Expand Down Expand Up @@ -109,4 +110,10 @@ public <O> IOptional<O, E> foreach(final O identity, final IAccumulator<T, O, E>
return Optional.create(this.iterable.foreach(identity, adder));
}

@Override
public <O> O[] asArray(final IntFunction<O[]> factory) throws E {
final List<O> list = asList();
return list.toArray(factory.apply(list.size()));
}

}
2 changes: 1 addition & 1 deletion commons/core/Commons_Logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-core</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/core/Commons_Reflaction/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-core</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/core/Commons_Resource/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-core</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
Expand Down Expand Up @@ -64,4 +64,6 @@ public interface IResourceReferenceHandler {

public abstract String toString(IResourceReference resourceReference);

// public abstract IResourceReference getParent(IResourceReference resourceReference);

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
Expand All @@ -32,13 +32,12 @@ public class FileUtilities {
* Get the extension of a file.
*/
public static String getExtension(final File file) {
final String s = file.getName();
String ext = null;
final int i = s.lastIndexOf('.');
if (i > 0 && i < s.length() - 1) {
ext = s.substring(i + 1).toLowerCase();
}
return ext;
return getExtension(file.getName());
}

public static String getExtension(final String name) {
final int i = name.lastIndexOf('.');
return (i > 0 && i < name.length() - 1) ? name.substring(i + 1).toLowerCase() : null;
}

public static File addExtension(final File file, final String extension) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
Expand All @@ -26,9 +26,7 @@ public interface IFileExtensions {
public static final String ASC = "asc"; //$NON-NLS-1$
public static final String BMP = "bmp"; //$NON-NLS-1$
public static final String BPW = "bpw"; //$NON-NLS-1$
public static final String CPG = "cpg"; //$NON-NLS-1$
public static final String DAT = "dat"; //$NON-NLS-1$
public static final String DBF = "dbf"; //$NON-NLS-1$
public static final String DGM = "dgm"; //$NON-NLS-1$
public static final String GFW = "gfw"; //$NON-NLS-1$
public static final String GIF = "gif"; //$NON-NLS-1$
Expand All @@ -43,11 +41,20 @@ public interface IFileExtensions {
public static final String MDB = "mdb"; //$NON-NLS-1$
public static final String PGW = "pgw"; //$NON-NLS-1$
public static final String PNG = "png"; //$NON-NLS-1$

public static final String DEF = "def"; //$NON-NLS-1$
public static final String CPG = "cpg"; //$NON-NLS-1$
public static final String PRJ = "prj"; //$NON-NLS-1$
public static final String SDAT = "sdat"; //$NON-NLS-1$
public static final String SGRD = "sgrd"; //$NON-NLS-1$

public static final String SHP = "shp"; //$NON-NLS-1$
public static final String DBF = "dbf"; //$NON-NLS-1$
public static final String SBN = "sbn"; //$NON-NLS-1$
public static final String SBX = "sbx"; //$NON-NLS-1$
public static final String SHI = "shi"; //$NON-NLS-1$
public static final String SHX = "shx"; //$NON-NLS-1$

public static final String SDAT = "sdat"; //$NON-NLS-1$
public static final String SGRD = "sgrd"; //$NON-NLS-1$
public static final String TFW = "tfw"; //$NON-NLS-1$
public static final String TIF = "tif"; //$NON-NLS-1$
public static final String TIFF = "tiff"; //$NON-NLS-1$
Expand Down
2 changes: 1 addition & 1 deletion commons/core/Commons_Utilities/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-core</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
Expand Down Expand Up @@ -203,6 +203,36 @@ public static String getReadMe(final URI uri) {
return getFirstFile(uri, readMeFileNames);
}

private static Set<String> authorsNames = new HashSet<>();
static {
authorsNames.add("META-INF/AUTHORS.txt"); //$NON-NLS-1$
authorsNames.add("META-INF/AUTHORS"); //$NON-NLS-1$
authorsNames.add("AUTHORS.txt"); //$NON-NLS-1$
authorsNames.add("AUTHORS"); //$NON-NLS-1$
}

public static String getAuthors(final URI uri) {
if (uri == null) {
return null;
}
return getFirstFile(uri, authorsNames);
}

private static Set<String> newsNames = new HashSet<>();
static {
newsNames.add("META-INF/NEWS.txt"); //$NON-NLS-1$
newsNames.add("META-INF/NEWS"); //$NON-NLS-1$
newsNames.add("NEWS.txt"); //$NON-NLS-1$
newsNames.add("NEWS"); //$NON-NLS-1$
}

public static String getNews(final URI uri) {
if (uri == null) {
return null;
}
return getFirstFile(uri, newsNames);
}

private static String getFirstFile(final URI uri, final Set<String> fileNames) {
try (JarInputStream jarInputStream = new JarInputStream(uri.toURL().openStream())) {
try {
Expand Down Expand Up @@ -270,8 +300,9 @@ public static URI[] getLibraries(final Manifest manifest, final String parent) {
final URI uri = URI.create(string);
if (!uri.isAbsolute()) {
try {
final File file = new File(parent == null
? new File(System.getProperty("user.dir")) : new File(new URI(parent)), string); //$NON-NLS-1$
final File file = new File(
parent == null ? new File(System.getProperty("user.dir")) : new File(new URI(parent)), //$NON-NLS-1$
string);
logger.log(ILevel.DEBUG, "add none absolute file: " + file.getCanonicalFile().toURI()); //$NON-NLS-1$
uris.add(file.getCanonicalFile().toURI());
} catch (final IOException exception) {
Expand Down Expand Up @@ -409,4 +440,5 @@ public static File getFile(final String name, final String folder) {
public static File getFile(final String name) {
return getFile(name, null);
}

}
2 changes: 1 addition & 1 deletion commons/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>net.anwiba.commons</groupId>
<artifactId>anwiba-commons-maven-default</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<scm>
Expand Down
2 changes: 1 addition & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>net.anwiba</groupId>
<artifactId>anwiba-maven-default</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
</parent>

<modules>
Expand Down
Loading

0 comments on commit ae2879d

Please sign in to comment.