Nice find :-) Will stop Eclipse complaining at me so much
Rob On Mar 28, 2012, at 2:20 PM, Andy Seaborne wrote: > On 28/03/12 22:03, Andy Seaborne wrote: >> >>>> I also get m2e errors - the antrun plugin is "not covered by lifecycle >>>> configuration" >>>> >>> >>> You can fix that by using the QuickFix suggestion and ignoring that >>> goal. That just means if you want that goal to run, you have to use >>> the command line maven [1]. Below is a diff to apply that fix to ARQ. >>> I've been debating checking this in for all the projects, as it will >>> only affect those running m2e. >> >> The alternative is to not need antrun -- it exists only to get the >> timestamp in the way that used to be recommended. >> >> Maven now has property: >> maven.build.timestamp >> which takes a format. Just the XSD format is sufficient. >> >> <maven.build.timestamp.format >> >yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format> >> >> Andy > > ... which does not work. > > http://jira.codehaus.org/browse/MRESOURCES-99 > > is still broken in maven 3.0.4. > > The workaround works. > > Andy > > ==== arq-properties.xml: > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> > > <properties version="1.0"> > <comment>ARQ System Properties</comment> > <entry key="com.hp.hpl.jena.sparql.version">${project.version}</entry> > <entry > key="com.hp.hpl.jena.sparql.build.datetime">${arq.buildDateTime}</entry> > </properties> > > ==== POM patch: > > ### Eclipse Workspace Patch 1.0 > #P ARQ > Index: pom.xml > =================================================================== > --- pom.xml (revision 1305900) > +++ pom.xml (working copy) > @@ -48,6 +48,8 @@ > <ver.httpclient>4.1.2</ver.httpclient> > <ver.httpcore>4.1.3</ver.httpcore> > <ver.commons-codec>1.5</ver.commons-codec> > + > <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format> > + <arq.buildDateTime>${maven.build.timestamp}</arq.buildDateTime> > </properties> > > <dependencies> > @@ -102,11 +104,6 @@ > </dependencies> > > <build> > - <!-- The filter file is written by antrun --> > - <filters> > - <filter>${project.basedir}/target/filter.properties</filter> > - </filters> > - > <resources> > <resource> > <filtering>false</filtering> > @@ -201,39 +198,6 @@ > <artifactId>maven-resources-plugin</artifactId> > </plugin> > > - <plugin> > - <groupId>org.apache.maven.plugins</groupId> > - <artifactId>maven-antrun-plugin</artifactId> > - <executions> > - <execution> > - <id>ant-timestamp</id> > - <phase>initialize</phase> > - <configuration> > - <target> > - <mkdir dir="${project.basedir}/target" /> > - <tstamp> > - <format property="build.time.xsd" > pattern="yyyy-MM-dd'T'HH:mm:ssZ" /> > - <format property="build.time.txt" pattern="yyyy-MM-dd > HH:mm z" /> > - </tstamp> > - <!-- Do not indent (it does not work) --> > - <echo file="${project.basedir}/target/filter.properties"> > -#begin > -build.time.xsd=${build.time.xsd} > -build.time.txt=${build.time.txt} > -#end > - </echo> > - <echo message="version=${project.version}" /> > - <echo message="build.time=${build.time.txt}" /> > - </target> > - </configuration> > - <goals> > - <goal>run</goal> > - </goals> > - </execution> > - <!-- Another task, another execution --> > - </executions> > - </plugin> > - > <!-- > <plugin> > <groupId>org.apache.maven.plugins</groupId>
