After installing and setting last Maven version (3.3.1) this does not work well
on Windows (I miss the maven-compiler-plugin I guess)
Anyway I think we should really discuss before going in this direction.
I, for instance, am strongly against moving to Maven when we have Ant already
embedded and so friendly.
Also I'd not like to have to move Maven related changes to Attic in a year or
two because it's unfinished...
tested: ant clean && mvn clean compile && ant start
Jacques
PS:
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
org.apache.ofbiz:ofbiz-start:jar:TRUNK
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ org.apache.ofbiz:ofbiz-parent:TRUNK,
C:\projectsASF\ofbiz\pom.xml, line 58, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ org.apache.ofbiz:ofbiz-start:[unknown-version],
C:\projectsASF\ofbiz\framework\start\pom.xml, line 34, colu
mn 15
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
org.apache.ofbiz:ofbiz-parent:pom:TRUNK
[WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 58, column 15
[WARNING] The expression ${artifactId} is deprecated. Please use
${project.artifactId} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten
the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] ofbiz-parent
[INFO] ofbiz-start
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ofbiz-parent TRUNK
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ ofbiz-parent ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ofbiz-start TRUNK
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ ofbiz-start ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
ofbiz-start ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 8 resources
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ ofbiz-start ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e.
build is platform dependent!
[INFO] Compiling 8 source files to
C:\projectsASF\ofbiz\framework\start\build\classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ofbiz-parent ....................................... SUCCESS [ 0.160 s]
[INFO] ofbiz-start ........................................ SUCCESS [ 1.012 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.303 s
[INFO] Finished at: 2015-04-17T10:26:24+02:00
[INFO] Final Memory: 13M/308M
[INFO] ------------------------------------------------------------------------
"C:\Program Files\Java\jdk1.7.0_45\bin\java" -jar "c:\projectsASF\ofbiz\\framework\base\lib\ant-1.9.0-ant-launcher.jar" -lib
"c:\projectsASF\ofbiz\\framework\base\lib\ant" start -Dportoffset 1
Buildfile: c:\projectsASF\ofbiz\build.xml
start:
[java] Error: Unable to access jarfile c:\projectsASF\ofbiz\ofbiz.jar
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 1 second
Le 17/04/2015 10:08, Jacques Le Roux a écrit :
Do you intend to convert to use Maven for building? I mean to replace Ant?
Else what does this add compared to Ant?
BTW are you aware of our policy of creating Jira in order to capture releases
changes?
https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Committers+Roles+and+Responsibilities#OFBizCommittersRolesandResponsibilities-Followingchanges
Jacques
Le 17/04/2015 07:52, doo...@apache.org a écrit :
Author: doogie
Date: Fri Apr 17 05:52:32 2015
New Revision: 1674216
URL: http://svn.apache.org/r1674216
Log:
Well, this is the start of converting ofbiz to use maven for building
and packaging. There's a workable parent-pom, and I have converted
framework/start to maven as well. To use this, the following commands
are useful:
* mvn clean
* mvn compile
* mvn package
All 3 can be run in either ${ofbiz.home.dir}, or in framework/start.
The trick that made this simple, was that I was able to redefine maven's
default file layout away from src/main/java and target/*, to something
more ofbiz specific. This way of doing things is just to get things
going; eventually, we should adopt a more standard maven like layout.
Another thing not dealt with in these first 2 files, is downloading of
dependencies. The top-level and framework/start have no external
requirements, so it allowed me to get going quite quickly.
Added:
ofbiz/trunk/framework/start/pom.xml
ofbiz/trunk/pom.xml
Added: ofbiz/trunk/framework/start/pom.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/pom.xml?rev=1674216&view=auto
==============================================================================
--- ofbiz/trunk/framework/start/pom.xml (added)
+++ ofbiz/trunk/framework/start/pom.xml Fri Apr 17 05:52:32 2015
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+ <parent>
+ <groupId>org.apache.ofbiz</groupId>
+ <artifactId>ofbiz-parent</artifactId>
+ <version>TRUNK</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>ofbiz-start</artifactId>
+
+ <build>
+ <finalName>ofbiz</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Manifest-Version>1.0</Manifest-Version>
+ <Implementation-Title>Apache OFBiz Startup</Implementation-Title>
+ <Implementation-Vendor>The Apache Open for Business
Project</Implementation-Vendor>
+ <Main-Class>org.ofbiz.base.start.Start</Main-Class>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <copy todir="${project.parent.relativePath}/..">
+ <fileset dir="${project.build.directory}"
includes="ofbiz.jar"/>
+ </copy>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: ofbiz/trunk/pom.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/pom.xml?rev=1674216&view=auto
==============================================================================
--- ofbiz/trunk/pom.xml (added)
+++ ofbiz/trunk/pom.xml Fri Apr 17 05:52:32 2015
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.ofbiz</groupId>
+ <artifactId>ofbiz-parent</artifactId>
+ <version>TRUNK</version>
+ <packaging>pom</packaging>
+
+ <build>
+ <directory>build/lib</directory>
+ <outputDirectory>build/classes</outputDirectory>
+ <finalName>${artifactId}</finalName>
+ <sourceDirectory>src</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.groovy</include>
+ <include>**/*.xml</include>
+ <include>**/*.bsh</include>
+ <include>**/*.logic</include>
+ <include>**/*.hs</include>
+ <include>**/*.jacl</include>
+ <include>**/*.py</include>
+ <include>META-INF/**</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>${project.parent.relativePath}/..</directory>
+ <includes>
+ <include>LICENSE</include>
+ <include>NOTICE</include>
+ </includes>
+ </resource>
+ </resources>
+ <scriptSourceDirectory>scripts</scriptSourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.7</source>
+ <target>1.7</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <outputDirectory>target/site</outputDirectory>
+ </reporting>
+
+ <modules>
+ <module>framework/start</module>
+ </modules>
+</project>