Skip to content

Commit decf6c1

Browse files
committed
Merged package refactoring to follow maven guidelines
2 parents 256d04c + 91b501f commit decf6c1

66 files changed

Lines changed: 293 additions & 425 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/java.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2525
restore-keys: ${{ runner.os }}-m2
2626

27-
- name: Deploy to Maven Central
28-
run: mvn clean deploy --settings ./.github/settings.xml
27+
- name: Test
28+
run: mvn clean test --settings ./.github/settings.xml
2929
env:
3030
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
3131
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
32-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
32+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

pom.xml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<url>https://github.com/Universal-Variability-Language/java-fm-metamodel</url>
1414
<licenses>
1515
<license>
16-
<name>MIT License</name>
17-
<url>https://github.com/Universal-Variability-Language/uvl-parser/blob/master/LICENSE</url>
16+
<name>MIT</name>
17+
<url>https://opensource.org/licenses/mit</url>
1818
<distribution>repo</distribution>
1919
</license>
2020
</licenses>
@@ -24,7 +24,7 @@
2424
<name>Stefan Vill</name>
2525
<email>stefan.vill@uni-ulm.de</email>
2626
<organization>University of Ulm</organization>
27-
<organizationUrl>ww.uni-ulm.de</organizationUrl>
27+
<organizationUrl>https://www.uni-ulm.de/</organizationUrl>
2828
</developer>
2929
<developer>
3030
<name>José A. Galindo</name>
@@ -36,7 +36,7 @@
3636
<name>Chico Sundermann</name>
3737
<email>chico.sundermann@uni-ulm.de</email>
3838
<organization>University of Ulm</organization>
39-
<organizationUrl>https://www.uni-ulm.de/</organizationUrl>
39+
<organizationUrl>https://www.uni-ulm.de/in/sp/team/chico-sundermann/</organizationUrl>
4040
</developer>
4141
<developer>
4242
<name>Kevin Feichtinger</name>
@@ -45,11 +45,11 @@
4545
<organizationUrl>https://www.jku.at/</organizationUrl>
4646
</developer>
4747
</developers>
48-
49-
<scm><!-- TODO-->
50-
<connection>scm:git:git@github.com:Universal-Variability-Language/java-fm-metamodel.git</connection>
51-
<developerConnection>scm:git:git@github.com:Universal-Variability-Language/java-fm-metamodel.git</developerConnection>
52-
<url>https://github.com/Universal-Variability-Language/java-fm-metamodel</url>
48+
49+
<scm><!-- TODO-->
50+
<connection>scm:git:git@github.com:Universal-Variability-Language/java-uvl-metamodel.git</connection>
51+
<developerConnection>scm:git:git@github.com:Universal-Variability-Language/java-uvl-metamodel.git</developerConnection>
52+
<url>https://github.com/Universal-Variability-Language/java-uvl-metamodel</url>
5353
</scm>
5454

5555
<distributionManagement>
@@ -62,11 +62,13 @@
6262
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
6363
</repository>
6464
</distributionManagement>
65-
65+
6666
<properties>
6767
<antlr4.version>4.13.1</antlr4.version>
6868
<maven.compiler.source>8</maven.compiler.source>
6969
<maven.compiler.target>8</maven.compiler.target>
70+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
71+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
7072
</properties>
7173

7274
<dependencies>
@@ -84,11 +86,7 @@
8486
<groupId>org.junit.jupiter</groupId>
8587
<artifactId>junit-jupiter</artifactId>
8688
<version>5.8.2</version>
87-
</dependency>
88-
<dependency>
89-
<groupId>org.junit.jupiter</groupId>
90-
<artifactId>junit-jupiter-api</artifactId>
91-
<version>5.8.2</version>
89+
<scope>test</scope>
9290
</dependency>
9391
<dependency>
9492
<groupId>com.google.guava</groupId>
@@ -98,9 +96,6 @@
9896
</dependencies>
9997

10098
<build>
101-
<sourceDirectory>src/</sourceDirectory>
102-
<testSourceDirectory>src/test</testSourceDirectory>
103-
10499
<plugins>
105100
<plugin>
106101
<groupId>org.apache.maven.plugins</groupId>
@@ -129,22 +124,22 @@
129124
<target>${maven.compiler.target}</target>
130125
</configuration>
131126
</plugin>
132-
127+
133128
<plugin>
134129
<groupId>org.apache.maven.plugins</groupId>
135130
<artifactId>maven-gpg-plugin</artifactId>
136131
<version>1.5</version>
137132
<executions>
138133
<execution>
139-
<id>sign-artifacts</id>
140-
<phase>verify</phase>
141-
<goals>
142-
<goal>sign</goal>
143-
</goals>
134+
<id>sign-artifacts</id>
135+
<phase>verify</phase>
136+
<goals>
137+
<goal>sign</goal>
138+
</goals>
144139
</execution>
145140
</executions>
146141
</plugin>
147-
142+
148143
<plugin>
149144
<groupId>org.sonatype.plugins</groupId>
150145
<artifactId>nexus-staging-maven-plugin</artifactId>
@@ -174,9 +169,6 @@
174169
<groupId>org.apache.maven.plugins</groupId>
175170
<artifactId>maven-javadoc-plugin</artifactId>
176171
<version>3.2.0</version>
177-
<configuration>
178-
<sourcepath>${project.basedir}/src/</sourcepath>
179-
</configuration>
180172
<executions>
181173
<execution>
182174
<id>attach-javadocs</id>
File renamed without changes.

src/de/vill/conversion/ConvertAggregateFunction.java renamed to src/main/java/de/vill/conversion/ConvertAggregateFunction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ private void traverseFeatures(Feature feature) {
149149
}
150150

151151
private void removeAggregateFunctionFromAttributes(Feature feature) {
152-
Attribute attributeConstraint = feature.getAttributes().get("constraint");
153-
Attribute attributeConstraintList = feature.getAttributes().get("constraints");
152+
Attribute<?> attributeConstraint = feature.getAttributes().get("constraint");
153+
Attribute<?> attributeConstraintList = feature.getAttributes().get("constraints");
154154
if (attributeConstraint != null) {
155155
if (attributeConstraint.getValue() instanceof Constraint) {
156156
searchAggregateFunctionInConstraint((Constraint) attributeConstraint.getValue());

src/de/vill/conversion/ConvertFeatureCardinality.java renamed to src/main/java/de/vill/conversion/ConvertFeatureCardinality.java

File renamed without changes.

src/de/vill/conversion/ConvertGroupCardinality.java renamed to src/main/java/de/vill/conversion/ConvertGroupCardinality.java

File renamed without changes.

src/de/vill/conversion/ConvertNumericConstraints.java renamed to src/main/java/de/vill/conversion/ConvertNumericConstraints.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.util.Set;
2020

2121
public class ConvertNumericConstraints implements IConversionStrategy {
22-
private final Map<String, Map<String, Attribute>> featuresToBeUpdated = new HashMap<>();
22+
private final Map<String, Map<String, Attribute<?>>> featuresToBeUpdated = new HashMap<>();
2323
private FeatureModel rootFeatureModel;
2424

2525
@Override
@@ -137,7 +137,7 @@ private void traverseFeatures(final Feature feature) {
137137
}
138138

139139
private void addAttribute(final AggregateFunctionExpression aggregateFunctionExpression, final String key, final Object value) {
140-
final Map<String, Attribute> currentAttributes =
140+
final Map<String, Attribute<?>> currentAttributes =
141141
this.rootFeatureModel.getFeatureMap().get(aggregateFunctionExpression.getRootFeatureName()).getAttributes();
142142
currentAttributes.put(
143143
key,

src/de/vill/conversion/ConvertSMTLevel.java renamed to src/main/java/de/vill/conversion/ConvertSMTLevel.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ private Constraint createDisjunction(Set<Constraint> constraints) {
123123
}
124124

125125
private void removeEquationFromAttributes(Feature feature) {
126-
Attribute attributeConstraint = feature.getAttributes().get("constraint");
127-
Attribute attributeConstraintList = feature.getAttributes().get("constraints");
126+
Attribute<?> attributeConstraint = feature.getAttributes().get("constraint");
127+
Attribute<?> attributeConstraintList = feature.getAttributes().get("constraints");
128128
if (attributeConstraint != null) {
129129
if (attributeConstraint.getValue() instanceof ExpressionConstraint) {
130130
Constraint equationReplacement = convertEquationToConstraint((ExpressionConstraint) attributeConstraint.getValue());
131-
feature.getAttributes().put("constraint", new Attribute("constraint", equationReplacement));
131+
feature.getAttributes().put("constraint", new Attribute<>("constraint", equationReplacement));
132132
}
133133
}
134134
if (attributeConstraintList != null && attributeConstraintList.getValue() instanceof List<?>) {
@@ -141,7 +141,7 @@ private void removeEquationFromAttributes(Feature feature) {
141141
newConstraintList.add(constraint);
142142
}
143143
}
144-
feature.getAttributes().put("constraints", new Attribute("constraints", newConstraintList));
144+
feature.getAttributes().put("constraints", new Attribute<>("constraints", newConstraintList));
145145
}
146146
}
147147

src/de/vill/conversion/ConvertStringConstraints.java renamed to src/main/java/de/vill/conversion/ConvertStringConstraints.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.util.Set;
2323

2424
public class ConvertStringConstraints implements IConversionStrategy {
25-
private final Map<String, Map<String, Attribute>> featuresToBeUpdated = new HashMap<>();
25+
private final Map<String, Map<String, Attribute<?>>> featuresToBeUpdated = new HashMap<>();
2626
private FeatureModel rootFeatureModel;
2727

2828
@Override
@@ -117,7 +117,7 @@ private void traverseFeatures(final Feature feature) {
117117
}
118118

119119
private void addAttribute(final AggregateFunctionExpression aggregateFunctionExpression) {
120-
final Map<String, Attribute> currentAttributes =
120+
final Map<String, Attribute<?>> currentAttributes =
121121
this.rootFeatureModel.getFeatureMap().get(aggregateFunctionExpression.getRootFeatureName()).getAttributes();
122122
currentAttributes.put(
123123
Constants.TYPE_LEVEL_LENGTH,

src/de/vill/conversion/ConvertTypeLevel.java renamed to src/main/java/de/vill/conversion/ConvertTypeLevel.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import de.vill.model.Attribute;
44
import de.vill.model.Feature;
55
import de.vill.model.FeatureModel;
6-
import de.vill.model.FeatureType;
76
import de.vill.model.Group;
87
import de.vill.model.LanguageLevel;
98
import de.vill.model.constraint.Constraint;

0 commit comments

Comments
 (0)