[mule-user] Error building from source 1.4.1

0 views
Skip to first unread message

Davide Piazza

unread,
Aug 1, 2007, 9:34:07 AM8/1/07
to us...@mule.codehaus.org
Hi,
I want to build jars from Mule version 1.4.1 source as written at http://mule.codehaus.org/display/MULE/Building+from+Source

I typed
svn co http://svn.codehaus.org/mule/tags/mule-1.4.1/

and then mvn.

mvn -version
Maven version: 2.0.7
Java version: 1.4.2_15
OS name: "linux" version: "2.6.20-16-generic" arch: "i386"


The error I get is:
[INFO] [enforcer:enforce-once {execution: enforce-maven-version}]
[INFO] [buildnumber:create {execution: default}]
[INFO] Checking for local modifications: skipped.
[INFO] Updating project files from SCM: skipped.
[INFO] Storing buildNumber: null
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:393)
        at org.codehaus.mojo.buildNumber.BuildNumberMojo.execute(BuildNumberMojo
.java:346)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo (DefaultPlugi
nManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (DefaultLi
fecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main (MavenCli.java:280)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch (Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)


Also during download step I have several Warnig about pom like this (but I don't know if this important being a maven newbie)
[WARNING] POM for 'xfire:xfire-jsr181-api:pom:1.0-M1:compile' is invalid. It wil
l be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project xfir
e:xfire-jsr181-api at /home/davide/.m2/repository/xfire/xfire-jsr181-api/1.0-M1/
xfire-jsr181-api-1.0-M1.pom

Thanks
Davide.

Andrew Perepelytsya

unread,
Aug 1, 2007, 1:46:52 PM8/1/07
to us...@mule.codehaus.org
Ignore the warnings, they are just what they are - warnings, and do not break the build.

Now, why do you get null for the SVN revision? Which module failed?

Davide Piazza

unread,
Aug 2, 2007, 4:16:22 AM8/2/07
to us...@mule.codehaus.org
I tried using mvn -X. Attached is the full dump of the execution.

Thanks
Davide.


2007/8/1, Andrew Perepelytsya < aper...@gmail.com>:
mvn_mule.out.gz

Dirk Olmes

unread,
Aug 2, 2007, 5:47:46 AM8/2/07
to us...@mule.codehaus.org
Davide Piazza wrote:
> I tried using mvn -X. Attached is the full dump of the execution.

Strange ... do you have the svn executable on the path so the
buildnumber plugin can find it when it runs?

As a temp workaround you could comment out the buildnumber plugin in the
toplevel pom.

-dirk

---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Davide Piazza

unread,
Aug 2, 2007, 8:26:32 AM8/2/07
to us...@mule.codehaus.org
thanks Dirk.
svn is on the PATH.
I tried your workaround and compilation went fine except for some test classes. So I run mvn -fn and now I have all my jars in the corresponding target folders.

One more question, even if it's a bit off topic: how can I tell maven to put also the source java files in the generated jars?

Thanks in advance
Davide.

2007/8/2, Dirk Olmes < dirk....@googlemail.com>:

Dirk Olmes

unread,
Aug 2, 2007, 9:02:00 AM8/2/07
to us...@mule.codehaus.org
Davide Piazza wrote:
> thanks Dirk.
> svn is on the PATH.

Strange thing, then :-(

> I tried your workaround and compilation went fine except for some test
> classes. So I run mvn -fn and now I have all my jars in the
> corresponding target folders.
>
> One more question, even if it's a bit off topic: how can I tell maven to
> put also the source java files in the generated jars?

You would need to run mvn source:jar before mvn install, I guess. Or try
with mvn -DperformRelease=true install, don't remember which one it was.

Davide Piazza

unread,
Aug 3, 2007, 4:38:57 AM8/3/07
to us...@mule.codehaus.org
I commented the maven-compiler-plugin because I don't need compilation and added the maven-source-plugin like this:
          <plugin>
            <inherited>true</inherited>
            <groupId> org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>

            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

then I used mvn source:jar and it worked.

Now I have all the sources jarred in the location that the mule-ide "Mule libraries for project [..]" expects. Thus I can debug sources using the mule ide that was the thing I needed.
Thanks for your help
Davide.

2007/8/2, Dirk Olmes <dirk....@googlemail.com>:
Davide Piazza wrote:
Reply all
Reply to author
Forward
0 new messages