Moved source plugins to main plugin
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@378781 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
9329c2c354
commit
009e7bceab
23 files changed
+1363
No files matched your search
@@ -0,0 +1,56 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<project xmlns:j="jelly:core"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:assert="assert"
|
||||
xmlns:maven="jelly:maven">
|
||||
|
||||
<preGoal name="java:compile">
|
||||
<!-- Invoke fake xdoclet plugin and update maven.compile.src.set -->
|
||||
<path id="fake.xdoclet.compile.src.set" location="src/xdoclet/java"/>
|
||||
<maven:addPath id="maven.compile.src.set" refid="fake.xdoclet.compile.src.set"/>
|
||||
</preGoal>
|
||||
|
||||
<goal name="testPlugin" prereqs="source:source,test-source">
|
||||
<attainGoal name="clean"/>
|
||||
</goal>
|
||||
|
||||
<goal name="test-source">
|
||||
|
||||
<j:set var="sourceFile" value="${maven.build.dir}/${maven.source.final.name}"/>
|
||||
<!-- tests that the source is generated -->
|
||||
<assert:assertFileExists file="${sourceFile}"/>
|
||||
|
||||
<!-- unzip the source and look for the App in the right package structure -->
|
||||
<j:set var="unzipDir" value= "${maven.build.dir}/sourceTest"/>
|
||||
<mkdir dir="${unzipDir}"/>
|
||||
<unzip src="${sourceFile}" dest="${unzipDir}"/>
|
||||
|
||||
<!-- check for source -->
|
||||
<assert:assertFileExists file="${unzipDir}/org/apache/maven/plugin/source/test/FakeSessionBean.java"
|
||||
msg="FakeSessionBean.java was not bundled"/>
|
||||
|
||||
<!-- check for generated code -->
|
||||
<assert:assertFileExists file="${unzipDir}/org/apache/maven/plugin/source/test/FakeSessionLocal.java"
|
||||
msg="FakeSessionLocal.java was not bundled"/>
|
||||
<assert:assertFileExists file="${unzipDir}/org/apache/maven/plugin/source/test/FakeSessionLocalHome.java"
|
||||
msg="FakeSessionLocalHome.java was not bundled"/>
|
||||
|
||||
</goal>
|
||||
</project>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<project>
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>test-maven-source-plugin-codeGenerationTest</id>
|
||||
<name>Code Generation Test Case for Maven Source Plugin</name>
|
||||
<groupId>maven</groupId>
|
||||
<currentVersion>1.0-SNAPSHOT</currentVersion>
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://www.apache.org/</url>
|
||||
<logo>http://maven.apache.org/images/apache-maven-project.png</logo>
|
||||
</organization>
|
||||
<inceptionYear>2006</inceptionYear>
|
||||
<package>org.apache.maven</package>
|
||||
<logo>http://maven.apache.org/images/maven.gif</logo>
|
||||
<description>Test for Maven Source plugin</description>
|
||||
<shortDescription>Test for Maven Source plugin</shortDescription>
|
||||
<url>http://maven.apache.org/maven-1.x/reference/plugins/source/</url>
|
||||
<siteDirectory>/www/maven.apache.org/maven-1.x/reference/plugins/source/</siteDirectory>
|
||||
<repository>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/source/</connection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/source/</url>
|
||||
</repository>
|
||||
<build>
|
||||
<defaultGoal>testPlugin</defaultGoal>
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
</build>
|
||||
</project>
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package org.apache.maven.plugin.source.test;
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright 2001-2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:snicoll@apache.org">Stephane Nicoll</a>
|
||||
* @version $Id: App.java 232640 2005-08-14 20:46:54Z snicoll $
|
||||
*/
|
||||
public class FakeSessionBean
|
||||
{
|
||||
|
||||
// Only for testing purposes!!
|
||||
private FakeSessionLocal local;
|
||||
|
||||
public FakeSessionBean()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package org.apache.maven.plugin.source.test;
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright 2001-2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:snicoll@apache.org">Stephane Nicoll</a>
|
||||
* @version $Id: App.java 232640 2005-08-14 20:46:54Z snicoll $
|
||||
*/
|
||||
public class FakeSessionLocal
|
||||
{
|
||||
// Fake just as if xdoclet generated it
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package org.apache.maven.plugin.source.test;
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright 2001-2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:snicoll@apache.org">Stephane Nicoll</a>
|
||||
* @version $Id: App.java 232640 2005-08-14 20:46:54Z snicoll $
|
||||
*/
|
||||
public class FakeSessionLocalHome
|
||||
{
|
||||
// Fake just as if xdoclet generated it
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<project
|
||||
xmlns:maven="jelly:maven">
|
||||
|
||||
<goal name="testPlugin">
|
||||
<maven:reactor basedir="${basedir}"
|
||||
includes="*Test/project.xml"
|
||||
goals="testPlugin"
|
||||
banner="Test"
|
||||
ignoreFailures="false"/>
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<project>
|
||||
<pomVersion>3</pomVersion>
|
||||
<name>Test project for Maven Source Plugin</name>
|
||||
<groupId>maven</groupId>
|
||||
<currentVersion>1.0</currentVersion>
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://www.apache.org/</url>
|
||||
<logo>http://maven.apache.org/images/apache-maven-project.png</logo>
|
||||
</organization>
|
||||
<inceptionYear>2006</inceptionYear>
|
||||
<package>org.apache.maven</package>
|
||||
<logo>http://maven.apache.org/images/maven.gif</logo>
|
||||
<description>Test for Maven Source plugin</description>
|
||||
<shortDescription>Test for Maven Source plugin</shortDescription>
|
||||
<url>http://maven.apache.org/maven-1.x/reference/plugins/source/</url>
|
||||
<siteDirectory>/www/maven.apache.org/maven-1.x/reference/plugins/source/</siteDirectory>
|
||||
<repository>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/source/</connection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/source/</url>
|
||||
</repository>
|
||||
<build>
|
||||
<defaultGoal>testPlugin</defaultGoal>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,43 @@
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<project xmlns:j="jelly:core"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:assert="assert">
|
||||
|
||||
<goal name="testPlugin" prereqs="source:source,test-source">
|
||||
<attainGoal name="clean"/>
|
||||
</goal>
|
||||
|
||||
<goal name="test-source">
|
||||
|
||||
<j:set var="sourceFile" value="${maven.build.dir}/${maven.source.final.name}"/>
|
||||
<!-- tests that the source is generated -->
|
||||
<assert:assertFileExists file="${sourceFile}"/>
|
||||
|
||||
<!-- unzip the source and look for the App in the right package structure -->
|
||||
<j:set var="unzipDir" value= "${maven.build.dir}/sourceTest"/>
|
||||
<mkdir dir="${unzipDir}"/>
|
||||
<unzip src="${sourceFile}" dest="${unzipDir}"/>
|
||||
|
||||
<!-- check for source -->
|
||||
<assert:assertFileExists file="${unzipDir}/org/apache/maven/plugin/source/test/App.java"
|
||||
msg="App.java was not bundled"/>
|
||||
|
||||
</goal>
|
||||
</project>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<project>
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>test-maven-source-plugin-simpleTest</id>
|
||||
<name>Simple Test Case for Maven Source Plugin</name>
|
||||
<groupId>maven</groupId>
|
||||
<currentVersion>1.0-SNAPSHOT</currentVersion>
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://www.apache.org/</url>
|
||||
<logo>http://maven.apache.org/images/apache-maven-project.png</logo>
|
||||
</organization>
|
||||
<inceptionYear>2006</inceptionYear>
|
||||
<package>org.apache.maven</package>
|
||||
<logo>http://maven.apache.org/images/maven.gif</logo>
|
||||
<description>Test for Maven Source plugin</description>
|
||||
<shortDescription>Test for Maven Source plugin</shortDescription>
|
||||
<url>http://maven.apache.org/maven-1.x/reference/plugins/source/</url>
|
||||
<siteDirectory>/www/maven.apache.org/maven-1.x/reference/plugins/source/</siteDirectory>
|
||||
<repository>
|
||||
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/source/</connection>
|
||||
<url>http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/source/</url>
|
||||
</repository>
|
||||
<build>
|
||||
<defaultGoal>testPlugin</defaultGoal>
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
</build>
|
||||
</project>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package org.apache.maven.plugin.source.test;
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright 2001-2005 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:snicoll@apache.org">Stephane Nicoll</a>
|
||||
* @version $Id: App.java 232640 2005-08-14 20:46:54Z snicoll $
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user