Author: tchemit Date: 2012-08-10 17:42:31 +0200 (Fri, 10 Aug 2012) New Revision: 1312 Url: http://nuiton.org/repositories/revision/mavenpom/1312 Log: fixes #2246: Can't override animal-sniffer signature Added: trunk/src/ trunk/src/static-site/ trunk/src/static-site/resources/ trunk/src/static-site/resources/css/ trunk/src/static-site/resources/css/mavenpom-site.css trunk/src/static-site/resources/images/ trunk/src/static-site/resources/js/ trunk/src/static-site/resources/js/mavenpom-site.js Modified: trunk/mavenpomdoc/src/site/site.xml trunk/pom.xml Modified: trunk/mavenpomdoc/src/site/site.xml =================================================================== --- trunk/mavenpomdoc/src/site/site.xml 2012-08-08 12:53:55 UTC (rev 1311) +++ trunk/mavenpomdoc/src/site/site.xml 2012-08-10 15:42:31 UTC (rev 1312) @@ -33,9 +33,9 @@ <custom> <fluidoSkin> - <topBarEnabled>true</topBarEnabled> + <topBarEnabled>false</topBarEnabled> <googleSearch/> - <sideBarEnabled>false</sideBarEnabled> + <sideBarEnabled>true</sideBarEnabled> <searchEnabled>true</searchEnabled> <sourceLineNumbersEnabled>true</sourceLineNumbersEnabled> </fluidoSkin> @@ -58,11 +58,11 @@ <head> <script type="text/javascript" - src="http://maven-site.nuiton.org/public/js/maven-site-nuiton.org.js"> + src="http://maven-site.nuiton.org/public/js/mavenpom-site.js"> </script> <link rel="stylesheet" type="text/css" - href="http://maven-site.nuiton.org/public/css/maven-site-nuiton.org.css"/> + href="http://maven-site.nuiton.org/public/css/mavenpom-site.css"/> </head> <breadcrumbs> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2012-08-08 12:53:55 UTC (rev 1311) +++ trunk/pom.xml 2012-08-10 15:42:31 UTC (rev 1312) @@ -742,9 +742,16 @@ <!-- Plugins version from codehaus mojo --> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>animal-sniffer-maven-plugin</artifactId> + <groupId>org.codehaus.mojo</groupId> + <artifactId>animal-sniffer-maven-plugin</artifactId> <version>${animalSnifferPluginVersion}</version> + <configuration> + <signature> + <groupId>org.codehaus.mojo.signature</groupId> + <artifactId>java16</artifactId> + <version>1.0</version> + </signature> + </configuration> </plugin> <plugin> @@ -1006,13 +1013,6 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>animal-sniffer-maven-plugin</artifactId> - <configuration> - <signature> - <groupId>org.codehaus.mojo.signature</groupId> - <artifactId>java16</artifactId> - <version>1.0</version> - </signature> - </configuration> <executions> <execution> <goals> @@ -1989,6 +1989,41 @@ </build> </profile> + <profile> + <id>deploy-static-site-files</id> + <properties> + <deploy.collectedFiles>target/collect-deploy-files.txt + </deploy.collectedFiles> + </properties> + <build> + <defaultGoal>verify</defaultGoal> + + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <executions> + <execution> + <id>collect-deploy-files</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>verify</phase> + <configuration> + <extraFiles>${deployFiles}</extraFiles> + <descriptionFile>${deploy.collectedFiles} + </descriptionFile> + <includeAttached>false</includeAttached> + <includeSiteAttached>false</includeSiteAttached> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> + </profile> + </profiles> </project> Added: trunk/src/static-site/resources/css/mavenpom-site.css =================================================================== --- trunk/src/static-site/resources/css/mavenpom-site.css (rev 0) +++ trunk/src/static-site/resources/css/mavenpom-site.css 2012-08-10 15:42:31 UTC (rev 1312) @@ -0,0 +1,2 @@ +.field .field_name {display: block; font-weight: bold; } +.field .field_body {padding-left: 30px; } \ No newline at end of file Property changes on: trunk/src/static-site/resources/css/mavenpom-site.css ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/src/static-site/resources/js/mavenpom-site.js =================================================================== --- trunk/src/static-site/resources/js/mavenpom-site.js (rev 0) +++ trunk/src/static-site/resources/js/mavenpom-site.js 2012-08-10 15:42:31 UTC (rev 1312) @@ -0,0 +1,77 @@ +$(document).ready(function () { + + var metas = $('#projectMetas'); + var piwikEnabled = metas.attr('piwikEnabled'); + if (piwikEnabled) { + //Piwik Tracking Code + var piwikId = metas.attr('piwikId'); + if (!piwikId) { + + // use default piwikId from platform + var platform = metas.attr('platform'); + if ("nuiton.org" == platform) { + + // default piwikId for nuiton.org + piwikId = 2; + } else if ("chorem.org" == platform) { + + // default piwikId for chorem.org + piwikId = 3; + } else if ("forge.codelutin.com" == platform) { + + // default piwikId for forge.codelutin.com + piwikId = 4; + } + } + + //console.log("use Piwik with id = " + piwikId); + var pkBaseURL = "https:" == document.location.protocol ? + "https://piwik.codelutin.com/" : + "http://piwik.codelutin.com/"; + $.getScript(pkBaseURL + "piwik.js", function (data, textStatus, jqxhr) { + var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", piwikId); + piwikTracker.trackPageView(); + piwikTracker.enableLinkTracking(); + //console.log("piwikTracker loaded = " + piwikTracker); + }); + //Piwik Tracking Code + } + var scmwebeditorenabled = metas.attr('scmwebeditorenabled'); + var scm = metas.attr('scm'); + if (scmwebeditorenabled && + scm.indexOf("/trunk") > -1 && + scm.indexOf("/branches") > -1) { + + // allow scmwebeditor is enabled and on trunk + + // remove scm prefix (scm:svn:) + scm = scm.replace('scm:svn:', ''); + + var scmurl = metas.attr('scmwebeditorurl'); + var projectId = metas.attr('projectId'); + var siteSourcesType = metas.attr('siteSourcesType'); + var path; + var pathname = document.location.pathname; + if (pathname.indexOf('target/site') > 0) { + path = pathname.substr(pathname.indexOf('/site')). + replace('/site/', ''); + } else { + if (pathname == '/' + projectId + '/') { + // on / page + path = 'index.html'; + } else { + path = pathname.substr(pathname.indexOf('/' + projectId)). + replace('/' + projectId + '/', ''); + } + } + path = path.replace('.html', '.' + siteSourcesType); + var url = scmurl + "?address=" + scm + "/src/site/" + siteSourcesType + "/" + path; + console.log("Add scmwebeditor with url = " + url); + var html = "<li class='pull-right'><a href='" + url + + "'>Éditer la page</a></li>" + + "<li class='divider pull-right'>|</li>"; + var ul = $('#publishDate'); + ul.prepend(html); + + } +}); \ No newline at end of file Property changes on: trunk/src/static-site/resources/js/mavenpom-site.js ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native