Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

spring-roo-1.1.5.RELEASE compatible version #1

Merged
merged 10 commits into from over 2 years ago

2 participants

Marcello Teodori Jeremy Grelle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
2  docbkx/resources/xsl/fopdf.xsl
@@ -106,7 +106,7 @@
106 106
         <xsl:param name="gentext-key" select="''"/>
107 107
         <xsl:variable name="Version">
108 108
             <xsl:if test="//releaseinfo">
109  
-                <xsl:value-of select="//releaseinfo" /><xsl:text>
  109
+                <xsl:value-of select="//releaseinfo" />
110 110
             </xsl:if>
111 111
         </xsl:variable>
112 112
         <xsl:choose>
9  org.springframework.flex.roo.addon/pom.xml
@@ -372,10 +372,9 @@
372 372
 				<extensions>true</extensions>
373 373
 				<configuration>
374 374
 					<instructions>
375  
-						<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
376  
-						<Bundle-Copyright>Copyright ${pom.organization.name}. All Rights
377  
-							Reserved.</Bundle-Copyright>
378  
-						<Bundle-DocURL>${pom.url}</Bundle-DocURL>
  375
+						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
  376
+						<Bundle-Copyright>Copyright ${project.organization.name}. All Rights Reserved.</Bundle-Copyright>
  377
+						<Bundle-DocURL>${project.url}</Bundle-DocURL>
379 378
 						<Export-Package>!org.springframework.flex.roo.addon.as.classpath.as3parser,org.springframework.flex.roo.addon.*</Export-Package>
380 379
 						<Import-Package>!uk.co.badgersinfoil.*,!org.antlr.*,!antlr.*,*</Import-Package>
381 380
 					</instructions>
@@ -437,7 +436,7 @@
437 436
 	</build>
438 437
 
439 438
 	<properties>
440  
-		<roo.version>1.1.2.RELEASE</roo.version>
  439
+		<roo.version>1.1.5.RELEASE</roo.version>
441 440
 	</properties>
442 441
 
443 442
 </project>
26  org.springframework.flex.roo.addon/src/main/java/org/springframework/flex/roo/addon/FlexOperationsImpl.java
@@ -19,7 +19,6 @@
19 19
 import java.io.ByteArrayOutputStream;
20 20
 import java.io.IOException;
21 21
 import java.io.InputStream;
22  
-import java.io.OutputStreamWriter;
23 22
 import java.lang.reflect.Modifier;
24 23
 import java.net.URL;
25 24
 import java.util.ArrayList;
@@ -65,6 +64,7 @@
65 64
 import org.springframework.roo.project.ProjectMetadata;
66 65
 import org.springframework.roo.project.ProjectOperations;
67 66
 import org.springframework.roo.project.ProjectType;
  67
+import org.springframework.roo.project.Property;
68 68
 import org.springframework.roo.project.Repository;
69 69
 import org.springframework.roo.support.osgi.UrlFindingUtils;
70 70
 import org.springframework.roo.support.util.Assert;
@@ -144,7 +144,7 @@ public void createScaffoldApp() {
144 144
         StringTemplate scaffoldTemplate = this.templateGroup.getInstanceOf(TEMPLATE_PATH + "/appname_scaffold");
145 145
         scaffoldTemplate.setAttribute("presentationPackage", presentationPackage);
146 146
         // TODO - Extract this value from services-config.xml?
147  
-        scaffoldTemplate.setAttribute("amfRemotingUrl", "http://localhost:8080/" + projectMetadata.getProjectName() + "/messagebroker/amf");
  147
+        scaffoldTemplate.setAttribute("amfRemotingUrl", "messagebroker/amf");
148 148
         this.fileManager.createOrUpdateTextFileIfRequired(scaffoldAppFileId, scaffoldTemplate.toString(), true);
149 149
 
150 150
         // Create the HTML wrapper
@@ -317,6 +317,7 @@ private void updateDependencies() {
317 317
             dependencies.add(new Dependency(dependency));
318 318
         }
319 319
         this.projectOperations.addDependencies(dependencies);
  320
+        this.projectOperations.addProperty(new Property("flex.version", "4.0.0.14159"));
320 321
 
321 322
         fixBrokenFlexDependency();
322 323
 
@@ -327,12 +328,10 @@ private void updateDependencies() {
327 328
     // ultimately should be fixed in Roo itself
328 329
     private void fixBrokenFlexDependency() {
329 330
         String pomPath = getPathResolver().getIdentifier(Path.ROOT, "pom.xml");
330  
-        MutableFile pomMutableFile = null;
331 331
 
332 332
         Document pomDoc;
333 333
         try {
334  
-            pomMutableFile = this.fileManager.updateFile(pomPath);
335  
-            pomDoc = XmlUtils.getDocumentBuilder().parse(pomMutableFile.getInputStream());
  334
+            pomDoc = XmlUtils.getDocumentBuilder().parse(this.fileManager.getInputStream(pomPath));
336 335
         } catch (Exception e) {
337 336
             throw new IllegalStateException(e);
338 337
         }
@@ -344,10 +343,10 @@ private void fixBrokenFlexDependency() {
344 343
 
345 344
         ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
346 345
         XmlUtils.writeXml(XmlUtils.createIndentingTransformer(), byteArrayOutputStream, pomDoc);
347  
-        String mxmlContent = byteArrayOutputStream.toString();
  346
+        String pomContent = byteArrayOutputStream.toString();
348 347
 
349 348
         try {
350  
-            FileCopyUtils.copy(mxmlContent, new OutputStreamWriter(pomMutableFile.getOutputStream()));
  349
+            this.fileManager.createOrUpdateTextFileIfRequired(pomPath, pomContent, false);
351 350
         } catch (Exception e) {
352 351
             throw new IllegalStateException(e);
353 352
         }
@@ -359,12 +358,10 @@ private void fixBrokenFlexDependency() {
359 358
     // itself
360 359
     private void fixBrokenFlexPlugin() {
361 360
         String pomPath = getPathResolver().getIdentifier(Path.ROOT, "pom.xml");
362  
-        MutableFile pomMutableFile = null;
363 361
 
364 362
         Document pomDoc;
365 363
         try {
366  
-            pomMutableFile = this.fileManager.updateFile(pomPath);
367  
-            pomDoc = XmlUtils.getDocumentBuilder().parse(pomMutableFile.getInputStream());
  364
+            pomDoc = XmlUtils.getDocumentBuilder().parse(this.fileManager.getInputStream(pomPath));
368 365
         } catch (Exception e) {
369 366
             throw new IllegalStateException(e);
370 367
         }
@@ -392,10 +389,10 @@ private void fixBrokenFlexPlugin() {
392 389
 
393 390
         ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
394 391
         XmlUtils.writeXml(XmlUtils.createIndentingTransformer(), byteArrayOutputStream, pomDoc);
395  
-        String mxmlContent = byteArrayOutputStream.toString();
  392
+        String pomContent = byteArrayOutputStream.toString();
396 393
 
397 394
         try {
398  
-            FileCopyUtils.copy(mxmlContent, new OutputStreamWriter(pomMutableFile.getOutputStream()));
  395
+            this.fileManager.createOrUpdateTextFileIfRequired(pomPath, pomContent, false);
399 396
         } catch (Exception e) {
400 397
             throw new IllegalStateException(e);
401 398
         }
@@ -413,6 +410,9 @@ private void configureFlexBuild() {
413 410
         if (!projectMetadata.isRepositoryRegistered(flexRepository)) {
414 411
             this.projectOperations.addRepository(flexRepository);
415 412
         }
  413
+        if (!projectMetadata.isPluginRepositoryRegistered(flexRepository)) {
  414
+            this.projectOperations.addPluginRepository(flexRepository);
  415
+        }
416 416
 
417 417
         InputStream templateInputStream = TemplateUtils.getTemplate(getClass(), "plugins.xml");
418 418
         Assert.notNull(templateInputStream, "Could not acquire plugins.xml file");
@@ -497,4 +497,4 @@ private void copyDirectoryContents(String sourceAntPath, String targetDirectory)
497 497
             }
498 498
         }
499 499
     }
500  
-}
  500
+}
3  ...pringframework.flex.roo.addon/src/main/java/org/springframework/flex/roo/addon/FlexScaffoldMetadata.java
@@ -271,7 +271,8 @@ private MethodMetadata getUpdateMethod() {
271 271
         InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
272 272
         bodyBuilder.appendFormalLine("if (" + this.entityReference + " == null) throw new IllegalArgumentException(\"A " + this.entityReference
273 273
             + " is required\");");
274  
-        bodyBuilder.appendFormalLine(this.entityReference + "." + this.entityMetadata.getMergeMethod().getMethodName() + "();");
  274
+        // fix for https://jira.springsource.org/browse/ROOFLEX-16
  275
+        bodyBuilder.appendFormalLine(this.entityReference + "=" + this.entityReference + "." + this.entityMetadata.getMergeMethod().getMethodName() + "();");
275 276
         bodyBuilder.appendFormalLine("return " + this.entityReference + ";");
276 277
 
277 278
         return new MethodMetadataBuilder(getId(), Modifier.PUBLIC, methodName, this.entity, paramTypes, paramNames, bodyBuilder).build();
7  ...mework.flex.roo.addon/src/main/java/org/springframework/flex/roo/addon/FlexScaffoldMetadataProvider.java
@@ -17,10 +17,11 @@
17 17
 package org.springframework.flex.roo.addon;
18 18
 
19 19
 import org.apache.felix.scr.annotations.Component;
  20
+import org.apache.felix.scr.annotations.Reference;
20 21
 import org.apache.felix.scr.annotations.Service;
21 22
 import org.osgi.service.component.ComponentContext;
22 23
 import org.springframework.roo.addon.entity.EntityMetadata;
23  
-import org.springframework.roo.addon.web.mvc.controller.details.WebMetadataUtils;
  24
+import org.springframework.roo.addon.web.mvc.controller.details.WebMetadataService;
24 25
 import org.springframework.roo.classpath.PhysicalTypeIdentifier;
25 26
 import org.springframework.roo.classpath.PhysicalTypeMetadata;
26 27
 import org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetails;
@@ -41,6 +42,8 @@
41 42
 @Service
42 43
 public class FlexScaffoldMetadataProvider extends AbstractItdMetadataProvider {
43 44
 
  45
+    @Reference private WebMetadataService webMetadataService;
  46
+
44 47
     protected void activate(ComponentContext context) {
45 48
         this.metadataDependencyRegistry.registerDependency(PhysicalTypeIdentifier.getMetadataIdentiferType(), getProvidesType());
46 49
         addMetadataTrigger(new JavaType(RooFlexScaffold.class.getName()));
@@ -90,7 +93,7 @@ protected ItdTypeDetailsProvidingMetadataItem getMetadata(String metadataIdentif
90 93
         MemberDetails entityMemberDetails = memberDetailsScanner.getMemberDetails(getClass().getName(), entityClassOrInterfaceDetails);
91 94
 
92 95
         return new FlexScaffoldMetadata(metadataIdentificationString, aspectName, governorPhysicalTypeMetadata, annotationValues, entityMetadata,
93  
-            WebMetadataUtils.getDynamicFinderMethodsAndFields(entityType, entityMemberDetails, metadataService, metadataIdentificationString, metadataDependencyRegistry));
  96
+            webMetadataService.getDynamicFinderMethodsAndFields(entityType, entityMemberDetails, metadataIdentificationString));
94 97
     }
95 98
 
96 99
     public String getItdUniquenessFilenameSuffix() {
4  org.springframework.flex.roo.addon/src/main/resources/org/springframework/flex/roo/addon/dependencies.xml
@@ -4,13 +4,13 @@
4 4
 		<dependency>
5 5
 			<groupId>com.adobe.flex.framework</groupId>
6 6
 			<artifactId>flex-framework</artifactId>
7  
-			<version>4.0.0.14159</version>
  7
+			<version>${flex.version}</version>
8 8
 			<type>pom</type>
9 9
 		</dependency>
10 10
 		<dependency>
11 11
 			<groupId>org.springframework.flex</groupId>
12 12
 			<artifactId>spring-flex-core</artifactId>
13  
-			<version>1.5.0.BUILD-SNAPSHOT</version>
  13
+			<version>1.5.0.RELEASE</version>
14 14
 		</dependency>
15 15
 		<dependency>
16 16
 			<groupId>org.springframework.flex.roo.addon</groupId>
4  org.springframework.flex.roo.addon/src/main/resources/org/springframework/flex/roo/addon/flex-config.xml
@@ -6,11 +6,11 @@
6 6
 		http://www.springframework.org/schema/beans
7 7
 		http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
8 8
 		http://www.springframework.org/schema/flex 
9  
-		http://www.springframework.org/schema/flex/spring-flex-1.0.xsd">
  9
+		http://www.springframework.org/schema/flex/spring-flex-1.5.xsd">
10 10
   	
11 11
 	<flex:message-broker mapping-order="1">
12 12
 		<flex:mapping pattern="/messagebroker/*"/>
13 13
 		<flex:message-service default-channels="longpolling-amf" />
14 14
 	</flex:message-broker>
15 15
 	
16  
-</beans>
  16
+</beans>
4  org.springframework.flex.roo.addon/src/main/resources/org/springframework/flex/roo/addon/plugins.xml
@@ -10,7 +10,7 @@
10 10
 				<dependency>
11 11
 					<groupId>com.adobe.flex</groupId>
12 12
 					<artifactId>compiler</artifactId>
13  
-					<version>4.0.0.14159</version>
  13
+					<version>${flex.version}</version>
14 14
 					<type>pom</type>
15 15
 				</dependency>
16 16
 			</dependencies>
@@ -59,4 +59,4 @@
59 59
 		</plugin>
60 60
 		
61 61
 	</springFlex>
62  
-</plugins>
  62
+</plugins>
8  ...mework.flex.roo.addon/src/main/resources/org/springframework/flex/roo/addon/services-config-template.xml
@@ -46,13 +46,9 @@
46 46
     </channels>
47 47
 
48 48
     <logging>
49  
-        <target class="flex.messaging.log.ConsoleTarget" level="Warn">
  49
+        <target class="org.springframework.flex.core.CommonsLoggingTarget" level="All">
50 50
             <properties>
51  
-                <prefix>[BlazeDS] </prefix>
52  
-                <includeDate>false</includeDate>
53  
-                <includeTime>false</includeTime>
54  
-                <includeLevel>false</includeLevel>
55  
-                <includeCategory>false</includeCategory>
  51
+                <categoryPrefix>blazeds</categoryPrefix>
56 52
             </properties>
57 53
             <filters>
58 54
                 <pattern>Endpoint.*</pattern>
4  pom.xml
@@ -77,7 +77,7 @@
77 77
                             <entities>
78 78
                                 <entity>
79 79
                                     <name>version</name>
80  
-                                    <value>${pom.version}</value>
  80
+                                    <value>${project.version}</value>
81 81
                                 </entity>
82 82
                             </entities>
83 83
                             <postProcess>
@@ -106,4 +106,4 @@
106 106
             </build>
107 107
         </profile>
108 108
     </profiles>
109  
-</project>
  109
+</project>
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.