cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r775750 - in /cayenne/main/trunk: build-tools/maven-cayenne-build-plugin/ build-tools/maven-cayenne-build-plugin/.settings/ build-tools/maven-cayenne-build-plugin/src/main/java/org/apache/cayenne/maven/plugin/date/ framework/cayenne-jdk1.5-...
Date Sun, 17 May 2009 20:19:10 GMT
Author: aadamchik
Date: Sun May 17 20:19:10 2009
New Revision: 775750

URL: http://svn.apache.org/viewvc?rev=775750&view=rev
Log:
fixing project property setup procedure for the latest maven

Modified:
    cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/.classpath
    cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/.settings/org.eclipse.jdt.core.prefs
    cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/src/main/java/org/apache/cayenne/maven/plugin/date/DateMojo.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/cayenne-strings.properties

Modified: cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/.classpath
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/.classpath?rev=775750&r1=775749&r2=775750&view=diff
==============================================================================
--- cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/.classpath (original)
+++ cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/.classpath Sun May 17 20:19:10
2009
@@ -1,7 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src/main/java" />
-	<classpathentry kind="src" path="src/test/java" output="target/test-classes" />
-	<classpathentry kind="output" path="target/classes" />
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" />
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER" />
-</classpath>
\ No newline at end of file
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Modified: cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/.settings/org.eclipse.jdt.core.prefs?rev=775750&r1=775749&r2=775750&view=diff
==============================================================================
--- cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/.settings/org.eclipse.jdt.core.prefs
(original)
+++ cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/.settings/org.eclipse.jdt.core.prefs
Sun May 17 20:19:10 2009
@@ -1,9 +1,9 @@
-#Sun Jul 23 18:13:04 EDT 2006
+#Sun May 17 23:03:03 EEST 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.4
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -54,7 +54,7 @@
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.3
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16

Modified: cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/src/main/java/org/apache/cayenne/maven/plugin/date/DateMojo.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/src/main/java/org/apache/cayenne/maven/plugin/date/DateMojo.java?rev=775750&r1=775749&r2=775750&view=diff
==============================================================================
--- cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/src/main/java/org/apache/cayenne/maven/plugin/date/DateMojo.java
(original)
+++ cayenne/main/trunk/build-tools/maven-cayenne-build-plugin/src/main/java/org/apache/cayenne/maven/plugin/date/DateMojo.java
Sun May 17 20:19:10 2009
@@ -26,13 +26,14 @@
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
 
 /**
  * Exports the "project.build.date" and "project.build.time" properties to the
  * environment.
  * 
  * @goal date
- * @phase generate-resources
+ * @phase initialize
  * @requiresProject
  */
 public class DateMojo extends AbstractMojo {
@@ -44,6 +45,15 @@
     static final String BUILD_DATE_FORMAT = "MMM dd yyyy";
     static final String BUILD_TIME_FORMAT = "HH:mm:ss";
 
+    /**
+     * POM
+     * 
+     * @parameter expression="${project}"
+     * @readonly
+     * @required
+     */
+    protected MavenProject project;
+
     public void execute() throws MojoExecutionException, MojoFailureException {
         Format dateFormat = new SimpleDateFormat(BUILD_DATE_FORMAT);
         Format timeFormat = new SimpleDateFormat(BUILD_TIME_FORMAT);
@@ -54,8 +64,10 @@
         calendar.add(Calendar.MILLISECOND, -offset);
         Date gmtTime = calendar.getTime();
 
-        System.setProperty(BUILD_DATE_PROPERTY, dateFormat.format(gmtTime));
-        System.setProperty(BUILD_TIME_PROPERTY, timeFormat.format(gmtTime));
-        System.setProperty(BUILD_YEAR_PROPERTY, String.valueOf(calendar.get(Calendar.YEAR)));
+        project.getProperties().put(BUILD_DATE_PROPERTY, dateFormat.format(gmtTime));
+        project.getProperties().put(BUILD_TIME_PROPERTY, timeFormat.format(gmtTime));
+        project.getProperties().put(
+                BUILD_YEAR_PROPERTY,
+                String.valueOf(calendar.get(Calendar.YEAR)));
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/cayenne-strings.properties
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/cayenne-strings.properties?rev=775750&r1=775749&r2=775750&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/cayenne-strings.properties
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/resources/org/apache/cayenne/cayenne-strings.properties
Sun May 17 20:19:10 2009
@@ -18,4 +18,4 @@
 cayenne.version = ${project.version}
 
 # these properties are coming from maven-cayenne-build plugin.
-cayenne.build.date = ${project.build.date} ${project.build.time}
\ No newline at end of file
+cayenne.build.date = ${project.build.date} ${project.build.time}



Mime
View raw message