Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

spring-roo-1.1.5.RELEASE compatible version #1

Merged
merged 10 commits into from

2 participants

This page is out of date. Refresh to see the latest.
View
2  docbkx/resources/xsl/fopdf.xsl
@@ -106,7 +106,7 @@
<xsl:param name="gentext-key" select="''"/>
<xsl:variable name="Version">
<xsl:if test="//releaseinfo">
- <xsl:value-of select="//releaseinfo" /><xsl:text>
+ <xsl:value-of select="//releaseinfo" />
</xsl:if>
</xsl:variable>
<xsl:choose>
View
9 org.springframework.flex.roo.addon/pom.xml
@@ -372,10 +372,9 @@
<extensions>true</extensions>
<configuration>
<instructions>
- <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
- <Bundle-Copyright>Copyright ${pom.organization.name}. All Rights
- Reserved.</Bundle-Copyright>
- <Bundle-DocURL>${pom.url}</Bundle-DocURL>
+ <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+ <Bundle-Copyright>Copyright ${project.organization.name}. All Rights Reserved.</Bundle-Copyright>
+ <Bundle-DocURL>${project.url}</Bundle-DocURL>
<Export-Package>!org.springframework.flex.roo.addon.as.classpath.as3parser,org.springframework.flex.roo.addon.*</Export-Package>
<Import-Package>!uk.co.badgersinfoil.*,!org.antlr.*,!antlr.*,*</Import-Package>
</instructions>
@@ -437,7 +436,7 @@
</build>
<properties>
- <roo.version>1.1.2.RELEASE</roo.version>
+ <roo.version>1.1.5.RELEASE</roo.version>
</properties>
</project>
View
26 ...k.flex.roo.addon/src/main/java/org/springframework/flex/roo/addon/FlexOperationsImpl.java
@@ -19,7 +19,6 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStreamWriter;
import java.lang.reflect.Modifier;
import java.net.URL;
import java.util.ArrayList;
@@ -65,6 +64,7 @@
import org.springframework.roo.project.ProjectMetadata;
import org.springframework.roo.project.ProjectOperations;
import org.springframework.roo.project.ProjectType;
+import org.springframework.roo.project.Property;
import org.springframework.roo.project.Repository;
import org.springframework.roo.support.osgi.UrlFindingUtils;
import org.springframework.roo.support.util.Assert;
@@ -144,7 +144,7 @@ public void createScaffoldApp() {
StringTemplate scaffoldTemplate = this.templateGroup.getInstanceOf(TEMPLATE_PATH + "/appname_scaffold");
scaffoldTemplate.setAttribute("presentationPackage", presentationPackage);
// TODO - Extract this value from services-config.xml?
- scaffoldTemplate.setAttribute("amfRemotingUrl", "http://localhost:8080/" + projectMetadata.getProjectName() + "/messagebroker/amf");
+ scaffoldTemplate.setAttribute("amfRemotingUrl", "messagebroker/amf");
this.fileManager.createOrUpdateTextFileIfRequired(scaffoldAppFileId, scaffoldTemplate.toString(), true);
// Create the HTML wrapper
@@ -317,6 +317,7 @@ private void updateDependencies() {
dependencies.add(new Dependency(dependency));
}
this.projectOperations.addDependencies(dependencies);
+ this.projectOperations.addProperty(new Property("flex.version", "4.0.0.14159"));
fixBrokenFlexDependency();
@@ -327,12 +328,10 @@ private void updateDependencies() {
// ultimately should be fixed in Roo itself
private void fixBrokenFlexDependency() {
String pomPath = getPathResolver().getIdentifier(Path.ROOT, "pom.xml");
- MutableFile pomMutableFile = null;
Document pomDoc;
try {
- pomMutableFile = this.fileManager.updateFile(pomPath);
- pomDoc = XmlUtils.getDocumentBuilder().parse(pomMutableFile.getInputStream());
+ pomDoc = XmlUtils.getDocumentBuilder().parse(this.fileManager.getInputStream(pomPath));
} catch (Exception e) {
throw new IllegalStateException(e);
}
@@ -344,10 +343,10 @@ private void fixBrokenFlexDependency() {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
XmlUtils.writeXml(XmlUtils.createIndentingTransformer(), byteArrayOutputStream, pomDoc);
- String mxmlContent = byteArrayOutputStream.toString();
+ String pomContent = byteArrayOutputStream.toString();
try {
- FileCopyUtils.copy(mxmlContent, new OutputStreamWriter(pomMutableFile.getOutputStream()));
+ this.fileManager.createOrUpdateTextFileIfRequired(pomPath, pomContent, false);
} catch (Exception e) {
throw new IllegalStateException(e);
}
@@ -359,12 +358,10 @@ private void fixBrokenFlexDependency() {
// itself
private void fixBrokenFlexPlugin() {
String pomPath = getPathResolver().getIdentifier(Path.ROOT, "pom.xml");
- MutableFile pomMutableFile = null;
Document pomDoc;
try {
- pomMutableFile = this.fileManager.updateFile(pomPath);
- pomDoc = XmlUtils.getDocumentBuilder().parse(pomMutableFile.getInputStream());
+ pomDoc = XmlUtils.getDocumentBuilder().parse(this.fileManager.getInputStream(pomPath));
} catch (Exception e) {
throw new IllegalStateException(e);
}
@@ -392,10 +389,10 @@ private void fixBrokenFlexPlugin() {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
XmlUtils.writeXml(XmlUtils.createIndentingTransformer(), byteArrayOutputStream, pomDoc);
- String mxmlContent = byteArrayOutputStream.toString();
+ String pomContent = byteArrayOutputStream.toString();
try {
- FileCopyUtils.copy(mxmlContent, new OutputStreamWriter(pomMutableFile.getOutputStream()));
+ this.fileManager.createOrUpdateTextFileIfRequired(pomPath, pomContent, false);
} catch (Exception e) {
throw new IllegalStateException(e);
}
@@ -413,6 +410,9 @@ private void configureFlexBuild() {
if (!projectMetadata.isRepositoryRegistered(flexRepository)) {
this.projectOperations.addRepository(flexRepository);
}
+ if (!projectMetadata.isPluginRepositoryRegistered(flexRepository)) {
+ this.projectOperations.addPluginRepository(flexRepository);
+ }
InputStream templateInputStream = TemplateUtils.getTemplate(getClass(), "plugins.xml");
Assert.notNull(templateInputStream, "Could not acquire plugins.xml file");
@@ -497,4 +497,4 @@ private void copyDirectoryContents(String sourceAntPath, String targetDirectory)
}
}
}
-}
+}
View
3  ...flex.roo.addon/src/main/java/org/springframework/flex/roo/addon/FlexScaffoldMetadata.java
@@ -271,7 +271,8 @@ private MethodMetadata getUpdateMethod() {
InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
bodyBuilder.appendFormalLine("if (" + this.entityReference + " == null) throw new IllegalArgumentException(\"A " + this.entityReference
+ " is required\");");
- bodyBuilder.appendFormalLine(this.entityReference + "." + this.entityMetadata.getMergeMethod().getMethodName() + "();");
+ // fix for https://jira.springsource.org/browse/ROOFLEX-16
+ bodyBuilder.appendFormalLine(this.entityReference + "=" + this.entityReference + "." + this.entityMetadata.getMergeMethod().getMethodName() + "();");
bodyBuilder.appendFormalLine("return " + this.entityReference + ";");
return new MethodMetadataBuilder(getId(), Modifier.PUBLIC, methodName, this.entity, paramTypes, paramNames, bodyBuilder).build();
View
7 ....addon/src/main/java/org/springframework/flex/roo/addon/FlexScaffoldMetadataProvider.java
@@ -17,10 +17,11 @@
package org.springframework.flex.roo.addon;
import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.osgi.service.component.ComponentContext;
import org.springframework.roo.addon.entity.EntityMetadata;
-import org.springframework.roo.addon.web.mvc.controller.details.WebMetadataUtils;
+import org.springframework.roo.addon.web.mvc.controller.details.WebMetadataService;
import org.springframework.roo.classpath.PhysicalTypeIdentifier;
import org.springframework.roo.classpath.PhysicalTypeMetadata;
import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails;
@@ -41,6 +42,8 @@
@Service
public class FlexScaffoldMetadataProvider extends AbstractItdMetadataProvider {
+ @Reference private WebMetadataService webMetadataService;
+
protected void activate(ComponentContext context) {
this.metadataDependencyRegistry.registerDependency(PhysicalTypeIdentifier.getMetadataIdentiferType(), getProvidesType());
addMetadataTrigger(new JavaType(RooFlexScaffold.class.getName()));
@@ -90,7 +93,7 @@ protected ItdTypeDetailsProvidingMetadataItem getMetadata(String metadataIdentif
MemberDetails entityMemberDetails = memberDetailsScanner.getMemberDetails(getClass().getName(), entityClassOrInterfaceDetails);
return new FlexScaffoldMetadata(metadataIdentificationString, aspectName, governorPhysicalTypeMetadata, annotationValues, entityMetadata,
- WebMetadataUtils.getDynamicFinderMethodsAndFields(entityType, entityMemberDetails, metadataService, metadataIdentificationString, metadataDependencyRegistry));
+ webMetadataService.getDynamicFinderMethodsAndFields(entityType, entityMemberDetails, metadataIdentificationString));
}
public String getItdUniquenessFilenameSuffix() {
View
4 ...ork.flex.roo.addon/src/main/resources/org/springframework/flex/roo/addon/dependencies.xml
@@ -4,13 +4,13 @@
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
- <version>4.0.0.14159</version>
+ <version>${flex.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.flex</groupId>
<artifactId>spring-flex-core</artifactId>
- <version>1.5.0.BUILD-SNAPSHOT</version>
+ <version>1.5.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.flex.roo.addon</groupId>
View
4 ...work.flex.roo.addon/src/main/resources/org/springframework/flex/roo/addon/flex-config.xml
@@ -6,11 +6,11 @@
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/flex
- http://www.springframework.org/schema/flex/spring-flex-1.0.xsd">
+ http://www.springframework.org/schema/flex/spring-flex-1.5.xsd">
<flex:message-broker mapping-order="1">
<flex:mapping pattern="/messagebroker/*"/>
<flex:message-service default-channels="longpolling-amf" />
</flex:message-broker>
-</beans>
+</beans>
View
4 ...ramework.flex.roo.addon/src/main/resources/org/springframework/flex/roo/addon/plugins.xml
@@ -10,7 +10,7 @@
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
- <version>4.0.0.14159</version>
+ <version>${flex.version}</version>
<type>pom</type>
</dependency>
</dependencies>
@@ -59,4 +59,4 @@
</plugin>
</springFlex>
-</plugins>
+</plugins>
View
8 ....addon/src/main/resources/org/springframework/flex/roo/addon/services-config-template.xml
@@ -46,13 +46,9 @@
</channels>
<logging>
- <target class="flex.messaging.log.ConsoleTarget" level="Warn">
+ <target class="org.springframework.flex.core.CommonsLoggingTarget" level="All">
<properties>
- <prefix>[BlazeDS] </prefix>
- <includeDate>false</includeDate>
- <includeTime>false</includeTime>
- <includeLevel>false</includeLevel>
- <includeCategory>false</includeCategory>
+ <categoryPrefix>blazeds</categoryPrefix>
</properties>
<filters>
<pattern>Endpoint.*</pattern>
View
4 pom.xml
@@ -77,7 +77,7 @@
<entities>
<entity>
<name>version</name>
- <value>${pom.version}</value>
+ <value>${project.version}</value>
</entity>
</entities>
<postProcess>
@@ -106,4 +106,4 @@
</build>
</profile>
</profiles>
-</project>
+</project>
Something went wrong with that request. Please try again.