problem about maven-war-plugin-Collection of common programming errors


  • djsumdog
    java maven alfresco alfresco-share maven-war-plugin
    Alfresco 3.2c has a tracking image that’s injected into the page footer using Javascript that I need to remove for a project. The javascript is actually hard coded in the SDK in the alfresco-share-src.zip in the class org/alfresco/web/scripts/MessagesWebScript.java. We’re currently building Alfresco using a Maven project and it pulls most of Alfresco and Share from maven plugins and repositories, giving us a clean root build additions in. However since this class is hard coded and we don’t want to touch the original jars/zips, I thought I could just add a new copy of the file to share/src/main/java/org/alfresco/web/scripts/MessagesWebScript.java, compiling it into the war file’s WEB-INF and thereby overriding what would get loaded from the jar (yes, I know a bad way of doing it).However, if I just add the file, I get the error /share/src/main/java/org/alfresco/web/scripts/MessagesWebScript.java:[48,80] error: cannot find symbol on the line public class MessagesWebScript extends org.springframework.extensions.webscripts.MessagesWebScriptWhich leads me to believe it’s not pulling in the same dependencies used to build the war file (namely the spring-surf-parent dependency). If I try to add that dependency to the share.pom file (shown below), maven successfully builds, but the dependency somehow pulls in the servlet API jar files, adds them to the war and then

Originally posted 2013-11-06 03:34:15.