+ pom template

+ few fixes in comments
This commit is contained in:
cbonar 2012-02-13 00:39:17 +01:00
parent 53eb4c5996
commit 02eeb842a0
6 changed files with 99 additions and 11 deletions

View file

@ -1,9 +1,9 @@
<ivy-module version="2.0"> <ivy-module version="2.0">
<info organisation="plugnauth" module="ciform" revision="1.0-SNAPSHOT" status="integration"> <info organisation="plugnauth" module="ciform" revision="1.0-SNAPSHOT" status="integration">
<license name="LGPL" url="http://plugnauth.sf.net/ciform/license"/> <license name="LGPL" url="http://www.gnu.org/licenses/lgpl.html"/>
<ivyauthor name="Nicolas BONARDELLE" url="http://nicobo.net/contact?subject=ciform+ivy"/> <ivyauthor name="Nicolas BONARDELLE" url="http://nicobo.net/contact?subject=ciform+ivy"/>
<description homepage="http://plugnauth.sourceforge.net/ciform"> <description homepage="http://ciform.googlecode.com">
Ciform encrypts web forms before they are submitted, so data is not sent in clear text over the Internet. Ciform encrypts HTML forms before they are submitted, so data is not sent in clear text over the Internet.
</description> </description>
</info> </info>
<configurations> <configurations>

35
ciform/pom.xml Normal file
View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>plugnauth.ciform</groupId>
<artifactId>ciform</artifactId>
<packaging>js</packaging>
<name>${ivy.pom.name}</name>
<version>${ivy.pom.version}</version>
<description>${ivy.pom.description}</description>
<url>${ivy.pom.url}</url>
<licenses>
<license>
<name>GNU Lesser General Public License, Version 3, 29 June 2007</name>
<url>http://www.gnu.org/licenses/lgpl.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>http://ciform.googlecode.com/hg</url>
<connection>scm:hg:http://ciform.googlecode.com/hg</connection>
</scm>
<developers>
<developer>
<id>cbonar</id>
<name>Nicolas BONARDELLE</name>
<email>http://nicobo.net/contact</email>
</developer>
</developers>
</project>

View file

@ -52,7 +52,7 @@ define("CIFORM_SCHEMES_DEFAULT",array(
new Ciform_schemes_Base16(), new Ciform_schemes_Base16(),
new Ciform_schemes_Base64(), new Ciform_schemes_Base64(),
new Ciform_schemes_RSA() new Ciform_schemes_RSA()
); ));

View file

@ -2,7 +2,7 @@
// //
// Ciform // Ciform
// //
// Copyright © 2008 Nicolas BONARDELLE <http://nicobo.net/contact> // Copyright (c) 2008 Nicolas BONARDELLE <http://nicobo.net/contact>
// //
/** /**
@ -16,7 +16,7 @@
* *
* @package ciform * @package ciform
* @subpackage ciphers * @subpackage ciphers
* @link http://plugnauth.sourceforge.net/ciform * @link http://ciform.googlecode.com
* @author Nicolas BONARDELLE <http://nicobo.net/contact> * @author Nicolas BONARDELLE <http://nicobo.net/contact>
*/ */

View file

@ -6,10 +6,10 @@
exit; exit;
} }
set_include_path("/opt/PEAR/".PATH_SEPARATOR.get_include_path()); set_include_path( "/opt/PEAR/" . PATH_SEPARATOR . get_include_path() );
set_include_path(get_include_path().PATH_SEPARATOR."../src/"); set_include_path( get_include_path() . PATH_SEPARATOR . "../src/" );
define("CIFORM_AUTODECRYPT",FALSE); // for demo purpose only define("CIFORM_AUTODECRYPT",FALSE); // for demo purpose only
require_once("ciform.php"); require_once("ciform/ciform.php");
?><html> ?><html>
<head> <head>
<link rel="stylesheet" href="ciform.css" media="screen"> <link rel="stylesheet" href="ciform.css" media="screen">

View file

@ -4,7 +4,7 @@
To use it, projects must import this file into their own build.xml and define all variables. To use it, projects must import this file into their own build.xml and define all variables.
--> -->
<!-- TODO define all base targets as extension-point and make javascript.* targets --> <!-- TODO define all base targets as extension-point and make javascript.* targets -->
<project name="javascript" default="package" xmlns:ivy="antlib:org.apache.ivy.ant"> <project name="javascript" default="package" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<!-- <!--
Loads default properties : simple convenience (not specific to Javascript) Loads default properties : simple convenience (not specific to Javascript)
@ -169,7 +169,7 @@
<!-- TODO Works but misses minified artifact amongst other things ; see http://ant.1045680.n5.nabble.com/Review-Needed-for-quot-Publishing-Maven-Artifacts-with-Ivy-quot-Doc-td3204659.html --> <!-- TODO Works but misses minified artifact amongst other things ; see http://ant.1045680.n5.nabble.com/Review-Needed-for-quot-Publishing-Maven-Artifacts-with-Ivy-quot-Doc-td3204659.html -->
<target name="build-pom" extensionOf="package" depends="validate" description="Builds a Maven POM."> <target name="build-pom" extensionOf="package" depends="validate" description="Builds a Maven POM.">
<ivy:makepom ivyfile="${basedir}/ivy.xml" pomfile="${target.dir}/${ivy.module}.pom"> <ivy:makepom ivyfile="${basedir}/ivy.xml" pomfile="${target.dir}/${ivy.module}.pom" templatefile="pom.xml">
<mapping conf="default" scope="test"/> <mapping conf="default" scope="test"/>
<mapping conf="minified" scope="compile"/> <mapping conf="minified" scope="compile"/>
</ivy:makepom> </ivy:makepom>
@ -202,6 +202,59 @@
<delete dir="${pub.dir}" includeemptydirs="true" deleteonexit="true" failonerror="false" /> <delete dir="${pub.dir}" includeemptydirs="true" deleteonexit="true" failonerror="false" />
</target> </target>
<!--
MAVEN
-->
<!-- TODO Use the latest artifact:deploy plugin -->
<macrodef name="maven-deploy" description="Deploy artifact to Maven repository">
<attribute name="repositoryurl" />
<attribute name="repositoryid" />
<attribute name="pom" default="pom.xml" />
<attribute name="artifact" />
<attribute name="classifier" default="" />
<sequential>
<artifact:mvn if="@{classifier}">
<arg value="org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy-file" />
<arg value="-Durl=@{repositoryurl}" />
<arg value="-DrepositoryId=@{repositoryid}" />
<arg value="-DpomFile=@{pom}" />
<arg value="-Dfile=@{artifact}" />
<arg value="-Dclassifier=@{classifier}" />
<arg value="-Pgpg" />
</artifact:mvn>
<artifact:mvn unless="@{classifier}">
<arg value="org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy-file" />
<arg value="-Durl=@{repositoryurl}" />
<arg value="-DrepositoryId=@{repositoryid}" />
<arg value="-DpomFile=@{pom}" />
<arg value="-Dfile=@{artifact}" />
<arg value="-Pgpg" />
</artifact:mvn>
</sequential>
</macrodef>
<target name="sonatype-deploy-snapshot" description="Deploys a snapshot to Sonatype's Maven repository" >
<!-- TODO Use Ivy to retrieve artifacts list -->
<!-- The user must have the repository defined with this id in its settings -->
<local name="artifact" />
<local name="file.exists" />
<!-- main artifact -->
<property name="file" value="${target.lib.dir}/${ivy.module}.js" />
<available property="file.exists" file="${artifact}" />
<echo unless="file.exists" message="${artifact} does not exist : skipping publication." />
<mavendeploy if="file.exists" repositoryurl="https://oss.sonatype.org/content/repositories/snapshots/" repositoryid="sonatype-nexus-snapshots" pom="${target.dir}/${ivy.module}.pom" artifact="${artifact}" />
<!-- 'standalone' artifact -->
<property name="file" value="${target.lib.dir}/lib${ivy.module}.js" />
<available property="file.exists" file="${artifact}" />
<echo unless="file.exists" message="${artifact} does not exist : skipping publication." />
<mavendeploy if="file.exists" repositoryurl="https://oss.sonatype.org/content/repositories/snapshots/" repositoryid="sonatype-nexus-snapshots" pom="${target.dir}/${ivy.module}.pom" artifact="${artifact}" />
</target>
<!-- TEST ; not quite useful --> <!-- TEST ; not quite useful -->
<target name="ant2dot" description="(internal)" > <target name="ant2dot" description="(internal)" >