Great, I will apply this to my project and see if I can make it work too.

Anyhow I created a JIRA ticket for this:

https://issues.apache.org/jira/browse/SLING-1364

-Andy

On Feb 9, 2010, at 2:57 PM, Justin Edelson wrote:

> I need to some additional cleanup, but you can see what a working project
> looks like here:
> 
> http://github.com/justinedelson/sling-it-demo
> 
> Supports either:
> $ mvn jetty:run-war
> or
> $ mvn verify
> 
> I should be able to get this into SVN tomorrow.
> 
> Justin
> 
> 
> On Tue, Feb 9, 2010 at 5:13 PM, Justin Edelson <[email protected]>wrote:
> 
>> I think this is going to take some tweaking of the launchpad plugin.
>> Mind creating a JIRA?
>> 
>> On 2/9/10 2:00 PM, Andreas Schaefer wrote:
>>> Hi Felix
>>> 
>>> Thanks for your help. I am not quite sure what you mean it the "it
>> classes" but anyhow I made some progress. I finally could create the
>> launchpad-bundles (needed to set the packaging to war) and create the web
>> application but when I try to run the tests Sling does not get deployed
>> inside Cargo/Jetty. This is a snippet of my POM that handles the integration
>> test:
>>> 
>>>        <profile>
>>>            <!--
>>>                Run the cargo-based integration tests.
>>>            -->
>>>            <id>cargoIntegrationTesting</id>
>>>            <activation>
>>>                <property>
>>>                    <name>!maven.test.skip</name>
>>>                </property>
>>>            </activation>
>>>            <build>
>>>                <plugins>
>>> 
>>>                    <plugin>
>>>                        <groupId>org.apache.sling</groupId>
>>>                        <artifactId>maven-launchpad-plugin</artifactId>
>>>                        <executions>
>>>                            <execution>
>>>                                <id>prepare-launch-package</id>
>>>                                <phase>pre-integration-test</phase>
>>>                                <goals>
>>>                                    <goal>prepare-package</goal>
>>>                                </goals>
>>>                                <configuration>
>>>                                    <defaultBundleList>
>>>                                        <version>6-SNAPSHOT</version>
>>>                                    </defaultBundleList>
>>>                                    <packaging>war</packaging>
>>> 
>>>                                    <additionalBundles>
>>>                                        <additionalBundle>
>>>                                            <groupId>com.XXX.sn
>> </groupId>
>>> 
>> <artifactId>sling-service-web-bundle</artifactId>
>>>                                            <version>1.0</version>
>>>                                            <startLevel>0</startLevel>
>>>                                        </additionalBundle>
>>>                                    </additionalBundles>
>>>                                </configuration>
>>>                            </execution>
>>>                        </executions>
>>>                    </plugin>
>>> 
>>> 
>>> On Feb 9, 2010, at 12:05 AM, Felix Meschberger wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I don't have such a POM set up.
>>>> 
>>>> A first approach I would test would be:
>>>> 
>>>> * create your integration test classes in src/test/java
>>>> * exclude the it classes from unit testing
>>>> * package the it classes using the test-jar goal
>>>>   excluding the regular unit test classes
>>>> 
>>>> In the integration test you would then include the generated test
>>>> package for the tests to run ...
>>>> 
>>>> Regards
>>>> Felix
>>>> 
>>>> On 09.02.2010 03:24, Andreas Schaefer wrote:
>>>>> Hi
>>>>> 
>>>>> After getting my first Sling bundle deployed and tested with an
>> integration test (more or less taken from what I found in the launchpad
>> testing project) I was wondering if it would be possible to have the bundle
>> code and its test code inside the same project / POM. Currently I need a
>> second project in order to build the web test environment and to run it. For
>> now I am stuck that the target/launchpad-bundles is not created.
>>>>> 
>>>>> Does anybody has a example POM to set that up if possible ?
>>>>> 
>>>>> Thanks - Andy Schaefer
>>>>> 
>>> 
>> 
>> 

Reply via email to