Skip to content

Commit

Permalink
TAP5-2718: missing version in Tapestry announcement log entries
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagohp committed Jun 8, 2022
1 parent 6fc6de2 commit 0c25984
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 21 deletions.
6 changes: 0 additions & 6 deletions tapestry-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ sourceSets {
// Not sure why this is necessary:
compileTestGroovy.dependsOn compileTestJava

jar {
from("src/main/filtered-resources") {
filter(ReplaceTokens, tokens: [version: project.version])
}
}

test {
// Needed to have XMLTokenStreamTests.testStreamEncoding() passing on Java 9+
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_1_9)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ public class SymbolConstants
/**
* The version number of the core Tapestry framework, or UNKNOWN if the version number is not available (which
* should only occur when developing Tapestry).
* This is an alias for {@link TapestryHttpSymbolConstants#CHARSET}.
* This is an alias for {@link TapestryHttpSymbolConstants#TAPESTRY_VERSION}.
*/
public static final String TAPESTRY_VERSION = TapestryHttpConstants.TAPESTRY_VERSION;
public static final String TAPESTRY_VERSION = TapestryHttpSymbolConstants.TAPESTRY_VERSION;

/**
* The location of the application-wide component messages catalog, relative to the web application context. This
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.tapestry5.func.F;
import org.apache.tapestry5.func.Mapper;
import org.apache.tapestry5.http.Link;
import org.apache.tapestry5.http.TapestryHttpConstants;
import org.apache.tapestry5.http.TapestryHttpSymbolConstants;
import org.apache.tapestry5.http.services.BaseURLSource;
import org.apache.tapestry5.http.services.RequestGlobals;
Expand Down Expand Up @@ -72,7 +71,7 @@ public class ExceptionReport extends AbstractInternalPage implements ExceptionRe
private boolean productionMode;

@Inject
@Symbol(TapestryHttpConstants.TAPESTRY_VERSION)
@Symbol(TapestryHttpSymbolConstants.TAPESTRY_VERSION)
@Property(write = false)
private String tapestryVersion;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.apache.tapestry5.Block;
import org.apache.tapestry5.annotations.*;
import org.apache.tapestry5.corelib.base.AbstractInternalPage;
import org.apache.tapestry5.http.TapestryHttpConstants;
import org.apache.tapestry5.http.TapestryHttpSymbolConstants;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.ioc.annotations.Symbol;
Expand All @@ -32,7 +31,7 @@
public class T5Dashboard extends AbstractInternalPage
{
@Inject
@Symbol(TapestryHttpConstants.TAPESTRY_VERSION)
@Symbol(TapestryHttpSymbolConstants.TAPESTRY_VERSION)
@Property
private String frameworkVersion;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@
import org.apache.tapestry5.commons.util.AvailableValues;
import org.apache.tapestry5.commons.util.CollectionFactory;
import org.apache.tapestry5.commons.util.StrategyRegistry;
import org.apache.tapestry5.commons.util.VersionUtils;
import org.apache.tapestry5.corelib.data.SecureOption;
import org.apache.tapestry5.grid.GridConstants;
import org.apache.tapestry5.grid.GridDataSource;
import org.apache.tapestry5.http.Link;
import org.apache.tapestry5.http.TapestryHttpConstants;
import org.apache.tapestry5.http.TapestryHttpSymbolConstants;
import org.apache.tapestry5.http.internal.TapestryHttpInternalConstants;
import org.apache.tapestry5.http.internal.TapestryHttpInternalSymbols;
Expand Down Expand Up @@ -1780,7 +1778,7 @@ public void contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter>
@Symbol(SymbolConstants.OMIT_GENERATOR_META)
final boolean omitGeneratorMeta,

@Symbol(TapestryHttpConstants.TAPESTRY_VERSION)
@Symbol(TapestryHttpSymbolConstants.TAPESTRY_VERSION)
final String tapestryVersion,

@Symbol(TapestryHttpSymbolConstants.PRODUCTION_MODE)
Expand Down
2 changes: 1 addition & 1 deletion tapestry-http/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ compileTestGroovy.dependsOn compileTestJava

jar {
from("src/main/filtered-resources") {
filter(ReplaceTokens, tokens: [version: project.version])
filter(ReplaceTokens, tokens: [version: project.parent.version])
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ final public class TapestryHttpConstants {
/**
* The version number of the core Tapestry framework, or UNKNOWN if the version number is not available (which
* should only occur when developing Tapestry).
* @deprecated use {@link TapestryHttpSymbolConstants#TAPESTRY_VERSION} instead.
*/
public static final String TAPESTRY_VERSION = "tapestry.version";
public static final String TAPESTRY_VERSION = TapestryHttpSymbolConstants.TAPESTRY_VERSION;

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.apache.tapestry5.commons.services.CoercionTuple;
import org.apache.tapestry5.commons.util.VersionUtils;
import org.apache.tapestry5.http.OptimizedSessionPersistedObject;
import org.apache.tapestry5.http.TapestryHttpConstants;
import org.apache.tapestry5.http.TapestryHttpSymbolConstants;
import org.apache.tapestry5.http.internal.AsyncRequestService;
import org.apache.tapestry5.http.internal.TypeCoercerHttpRequestBodyConverter;
Expand Down Expand Up @@ -127,7 +126,7 @@ public static void contributeFactoryDefaults(MappedConfiguration<String, Object>
configuration.add(TapestryHttpSymbolConstants.APPLICATION_VERSION, "0.0.1");
configuration.add(TapestryHttpSymbolConstants.GZIP_COMPRESSION_ENABLED, true);
configuration.add(TapestryHttpSymbolConstants.MIN_GZIP_SIZE, 100);
configuration.add(TapestryHttpConstants.TAPESTRY_VERSION,
configuration.add(TapestryHttpSymbolConstants.TAPESTRY_VERSION,
VersionUtils.readVersionNumber("META-INF/gradle/org.apache.tapestry/tapestry-http/project.properties"));

configuration.add(TapestryHttpSymbolConstants.CORS_ENABLED, "false");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.apache.tapestry5.annotations.Import;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.http.TapestryHttpConstants;
import org.apache.tapestry5.http.TapestryHttpSymbolConstants;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.ioc.annotations.Symbol;

Expand All @@ -28,7 +28,7 @@ public class InternalLayout
private String title;

@Inject
@Symbol(TapestryHttpConstants.TAPESTRY_VERSION)
@Symbol(TapestryHttpSymbolConstants.TAPESTRY_VERSION)
@Property
private String frameworkVersion;

Expand Down

0 comments on commit 0c25984

Please sign in to comment.