Nearly impossible to make head or tail of why Maven build is failing.

Description

The build gets most of the way but fails. I was trying to edit some of the .jsp files but found these edits were not flowing through to the built packages after a rebuild (packages still had the old versions of the .jsp files). Then I deleted out the "target" directories which are not part of the GIT tracked tree and did a rebuild. Most of it worked by maven has twisted knickers trying to rebuild the web application.

Normally this sort of thing doesn't bother me except it really pisses me off when a build system gives such deeply unfathomable gibberish rather than just giving some sort of error message to actually tell you what went wrong.

I'll attach the output files from these commands:

./compile.pl > /tmp/complete.rubbish 2>&1

./maven/bin/mvn org.mortbay.jetty:maven-jetty-jspc-plugin:6.1.24:jspc -e -X -rf :opennms-webapp > /tmp/more.complete.rubbish 2>&1

Environment

Ubuntu Linux, building OpenNMS from git tree.

Acceptance / Success Criteria

None

Attachments

2

Lucidchart Diagrams

Activity

Show:

Seth Leger August 31, 2011 at 7:00 PM

This problem was caused because the jetty JSP compiler plugin was throwing the wrong exception when a JSP compilation failed and Maven3 was eating the error message that showed you which JSP was failing to compile and why. We worked with Jetty to resolve the issue and upgraded to a version with the fix back in April. Marking as fixed in 1.9.8.

commit 735ec60c8749eea209e3dc494a2d33d543fe63f8

Telford Tendys February 8, 2011 at 9:16 PM

Tried this – but made no difference to the output, seemed worth a try.

bart@hermes:~/opennms-git$ git diff
diff --git a/opennms-webapp/pom.xml b/opennms-webapp/pom.xml
index 37358c7..83cb1de 100644
— a/opennms-webapp/pom.xml
+++ b/opennms-webapp/pom.xml
@@ -90,7 +90,7 @@
<configuration>
<destdir>${project.build.directory}/xsds</destdir>
<srcdir>${basedir}/src/main/java</srcdir>

  • <verbose>false</verbose>
    + <verbose>true</verbose>
    <includes>
    <include>org/opennms/web/snmpinfo/*.java</include>
    </includes>

Telford Tendys February 8, 2011 at 9:06 PM

Seems to complain about missing metadata, e.g.

[DEBUG] Could not find metadata org.opennms.lib:org.opennms.lib.joesnmp/maven-metadata.xml

However, I can download the metadata just fine, e.g.

wget http://maven.opennms.org/content/groups/opennms.org-release/org/opennms/lib/org.opennms.lib.joesnmp/maven-metadata.xml

Also, there is already a metadata file:

/home/bart/.m2/repository/org/opennms/lib/org.opennms.lib.joesnmp/maven-metadata-opennms-repo.xml

Maybe the real problem is elsewhere? Maybe there's something wrong with the metadata?

The file contents are as follows (looks OK to me, but I have no idea):

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>org.opennms.lib</groupId>
<artifactId>org.opennms.lib.joesnmp</artifactId>
<version>1.7.1</version>
<versioning>
<latest>2.0.1</latest>
<release>2.0.0</release>
<versions>
<version>1.7.1</version>
<version>2.0.0</version>
<version>2.0.1</version>
</versions>
<lastUpdated>20100520013745</lastUpdated>
</versioning>
</metadata>

Telford Tendys February 8, 2011 at 8:56 PM

This is the first time I've used JIRA and it seems OK, I'll just have to puzzle out how to add attachments.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created February 8, 2011 at 8:54 PM
Updated January 27, 2017 at 4:19 PM
Resolved August 31, 2011 at 7:00 PM