Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSHADE-351] make constructors public #45

Merged
merged 1 commit into from
Apr 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions src/it/projects/MSHADE-351/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
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.
-->

<project>
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.maven.its.shade.srt</groupId>
<artifactId>test</artifactId>
<version>1.0</version>

<name>MSHADE-351</name>
<description>
Test the merging of META-INF/services/** entries.
</description>

<dependencies>
<dependency>
<groupId>org.apache.maven.its.shade.srt</groupId>
<artifactId>one</artifactId>
<version>0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.its.shade.srt</groupId>
<artifactId>two</artifactId>
<version>0.1</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>@project.version@</version>
<executions>
<execution>
<id>attach-shade</id>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<transformers>
<transformer implementation=
"org.apache.maven.plugins.shade.resource.properties.OpenWebBeansPropertiesTransformer" />
<transformer implementation=
"org.apache.maven.plugins.shade.resource.properties.MicroprofileConfigTransformer" />
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
26 changes: 26 additions & 0 deletions src/it/projects/MSHADE-351/verify.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* 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.
*/
import java.io.*;
import java.util.jar.*;
import org.codehaus.plexus.util.*;

JarFile jarFile = new JarFile( new File( basedir, "target/test-1.0.jar" ) );
JarEntry jarEntry = jarFile.getEntry( "META-INF/services/org.apache.maven.Shade" );
String service = IOUtil.toString( jarFile.getInputStream( jarEntry ), "UTF-8" );
jarFile.close();
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
public class MicroprofileConfigTransformer extends PropertiesTransformer
{
protected MicroprofileConfigTransformer()
public MicroprofileConfigTransformer()
{
super( null, "config_ordinal", 1000, false );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
public class OpenWebBeansPropertiesTransformer extends PropertiesTransformer
{
protected OpenWebBeansPropertiesTransformer()
public OpenWebBeansPropertiesTransformer()
{
super( "META-INF/openwebbeans/openwebbeans.properties", "configuration.ordinal", 100, false );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* Internal Properties instance sorting its keys on iterations for store() usages.
* It ensures properties persistence is deterministic.
*
* IMPORTANT: this only overrides methods used accross JVM in store() so ordering is not guaranteed for other cases.
* IMPORTANT: this only overrides methods used across JVM in store() so ordering is not guaranteed for other cases.
*/
public class SortedProperties extends Properties
{
Expand Down