You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Normandes Jr <no...@gmail.com> on 2009/09/05 15:33:51 UTC

How to reference parent using some version variable

Hi,

   I would like to reference the parent at a child module using variable at
version.

   I would like to do this, because I have a lot of projects that are child
of parent. And if I change the version of parent, I will have to change all
modules.

   I tried this, but not working:

   <artifactId>my-child</artifactId>

   <parent>
        <artifactId>my-parent</artifactId>
        <groupId>group.my.parent</groupId>
        <version>${pom.version}</version>
    </parent>

   I am using maven 2.2.1.

   Any idea?

   Regards,

Junior.

Re: Blank Page with Jetty Plugin

Posted by Mick Knutson <mi...@gmail.com>.
Create  2 different entries in separate <profile>'s then switch each for the
different IDE's

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Wed, Sep 9, 2009 at 3:10 PM, Neil Chaudhuri <nchaudhuri@potomacfusion.com
> wrote:

> It turns out that the issue is the presence of the following:
>
> <stopKey>foo</stopKey>
> <stopPort>8080</stopPort>
>
> When those are removed, everything works. However, when I remove them,
> Netbeans gets mad, although my beloved IntelliJ is just fine.
>
> Any insight into why these stop elements cause trouble and/or why the 2
> IDEs react differently to them is much appreciated.
>
> Thanks.
>
>
>
>
> -----Original Message-----
> From: mknutson@baselogic.com on behalf of Mick Knutson
> Sent: Wed 9/9/2009 9:50 AM
> To: Maven Users List
> Subject: Re: Blank Page with Jetty Plugin
>
> Not sure about starting Jetty automatically, as I use Tomcat and Cargo for
> that, but to just start Jetty and test manually, I created an index.html
> file with some text to ensure the page was loaded, then I use this
> declaration:
>
>            <plugin>
>                <groupId>org.mortbay.jetty</groupId>
>                <artifactId>jetty-maven-plugin</artifactId>
>                <version>7.0.0.pre5</version>
>                <configuration>
>                    <contextPath>/${finalName}</contextPath>
>                    <scanIntervalSeconds>10</scanIntervalSeconds>
>                    <scanTargetPatterns>
>                        <scanTargetPattern>
>                            <directory>src/main/webapp/WEB-INF</directory>
>                            <excludes>
>                                <exclude>**/*.jsp</exclude>
>                                <exclude>**/*.xhtml</exclude>
>                            </excludes>
>                            <includes>
>                                <include>**/*.properties</include>
>                                <include>**/*.xml</include>
>                            </includes>
>                        </scanTargetPattern>
>                    </scanTargetPatterns>
>                </configuration>
>
>                <dependencies>
>                    <dependency>
>                        <groupId>commons-logging</groupId>
>                        <artifactId>commons-logging</artifactId>
>                        <version>1.1.1</version>
>                        <type>jar</type>
>                        <scope>provided</scope>
>                    </dependency>
>
>                    <dependency>
>                        <groupId>log4j</groupId>
>                        <artifactId>log4j</artifactId>
>                        <version>${log4j.version}</version>
>                        <type>jar</type>
>                        <scope>provided</scope>
>                    </dependency>
>                </dependencies>
>            </plugin>
>
>
> ---
> Thank You.
>
> Mick Knutson, President
>
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
>
> Website: http://baselogic.com
> Linked IN: http://linkedin.com/in/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
>
>
>
> On Wed, Sep 9, 2009 at 10:43 AM, Neil Chaudhuri <
> nchaudhuri@potomacfusion.com> wrote:
>
> > I am trying to get the Jetty plugin to work with Hibernate's c3p0
> > connection pool. The server seems to start just fine with run-war, but
> when
> > I navigate to any URL at localhost:8080, I see nothing but a blank page.
> And
> > I mean ANY. If it is just literally localhost:8080, I see a blank page.
> If I
> > navigate to a "good" URL, I see a blank page. If I navigate to a "bad"
> URL,
> > I a blank page rather than a 404 or a 500 error.
> >
> > Here is my configuration:
> >
> >             <plugin>
> >                <groupId>org.mortbay.jetty</groupId>
> >                <artifactId>maven-jetty-plugin</artifactId>
> >                <version>6.1.11</version>
> >                <configuration>
> >                    <webApp>target/services.war</webApp>
> >                    <webAppConfig>
> >                        <contextPath>/services</contextPath>
> >                    </webAppConfig>
> >
> >  <jettyConfig>src/test/resources/jetty/jetty.xml</jettyConfig>
> >                    <requestLog
> > implementation="org.mortbay.jetty.NCSARequestLog">
> >                        <filename>target/yyyy_mm_dd.request.log</filename>
> >                        <retainDays>90</retainDays>
> >                        <append>true</append>
> >                        <extended>false</extended>
> >                        <logTimeZone>GMT</logTimeZone>
> >                    </requestLog>
> >                    <connectors>
> >                        <connector
> > implementation="org.mortbay.jetty.nio.SelectChannelConnector">
> >                            <port>8080</port>
> >                            <maxIdleTime>60000</maxIdleTime>
> >                        </connector>
> >                    </connectors>
> >                </configuration>
> >                <executions>
> >                    <execution>
> >                        <id>start-jetty</id>
> >                        <phase>pre-integration-test</phase>
> >                        <goals>
> >                            <goal>run</goal>
> >                        </goals>
> >                        <configuration>
> >                            <scanIntervalSeconds>0</scanIntervalSeconds>
> >                            <daemon>true</daemon>
> >                        </configuration>
> >                    </execution>
> >                    <execution>
> >                        <id>stop-jetty</id>
> >                        <phase>post-integration-test</phase>
> >                        <goals>
> >                            <goal>stop</goal>
> >                        </goals>
> >                    </execution>
> >                </executions>
> >                <dependencies>
> >                    <dependency>
> >                        <groupId>c3p0</groupId>
> >                        <artifactId>c3p0</artifactId>
> >                        <version>0.9.1.2</version>
> >                    </dependency>
> >                    <dependency>
> >                        <groupId>com.oracle.jdbc</groupId>
> >                        <artifactId>ojdbc6</artifactId>
> >                        <version>${oracle.driver.version}</version>
> >                    </dependency>
> >                </dependencies>
> >            </plugin>
> >
> > Incidentally, the jetty.xml file in the jettyConfig element contains
> > nothing but c3p0 stuff being bound to a JNDI datasource. Also, the
> request
> > log file is created but blank as well.
> >
> > As you can imagine, failure with no feedback is frustrating. Any insight
> is
> > appreciated.
> >
> > Thanks.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

RE: Blank Page with Jetty Plugin

Posted by Neil Chaudhuri <nc...@potomacfusion.com>.
It turns out that the issue is the presence of the following:

<stopKey>foo</stopKey>
<stopPort>8080</stopPort>

When those are removed, everything works. However, when I remove them, Netbeans gets mad, although my beloved IntelliJ is just fine.

Any insight into why these stop elements cause trouble and/or why the 2 IDEs react differently to them is much appreciated.

Thanks.




-----Original Message-----
From: mknutson@baselogic.com on behalf of Mick Knutson
Sent: Wed 9/9/2009 9:50 AM
To: Maven Users List
Subject: Re: Blank Page with Jetty Plugin
 
Not sure about starting Jetty automatically, as I use Tomcat and Cargo for
that, but to just start Jetty and test manually, I created an index.html
file with some text to ensure the page was loaded, then I use this
declaration:

            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>7.0.0.pre5</version>
                <configuration>
                    <contextPath>/${finalName}</contextPath>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <scanTargetPatterns>
                        <scanTargetPattern>
                            <directory>src/main/webapp/WEB-INF</directory>
                            <excludes>
                                <exclude>**/*.jsp</exclude>
                                <exclude>**/*.xhtml</exclude>
                            </excludes>
                            <includes>
                                <include>**/*.properties</include>
                                <include>**/*.xml</include>
                            </includes>
                        </scanTargetPattern>
                    </scanTargetPatterns>
                </configuration>

                <dependencies>
                    <dependency>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                        <version>1.1.1</version>
                        <type>jar</type>
                        <scope>provided</scope>
                    </dependency>

                    <dependency>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                        <version>${log4j.version}</version>
                        <type>jar</type>
                        <scope>provided</scope>
                    </dependency>
                </dependencies>
            </plugin>


---
Thank You.

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Wed, Sep 9, 2009 at 10:43 AM, Neil Chaudhuri <
nchaudhuri@potomacfusion.com> wrote:

> I am trying to get the Jetty plugin to work with Hibernate's c3p0
> connection pool. The server seems to start just fine with run-war, but when
> I navigate to any URL at localhost:8080, I see nothing but a blank page. And
> I mean ANY. If it is just literally localhost:8080, I see a blank page. If I
> navigate to a "good" URL, I see a blank page. If I navigate to a "bad" URL,
> I a blank page rather than a 404 or a 500 error.
>
> Here is my configuration:
>
>             <plugin>
>                <groupId>org.mortbay.jetty</groupId>
>                <artifactId>maven-jetty-plugin</artifactId>
>                <version>6.1.11</version>
>                <configuration>
>                    <webApp>target/services.war</webApp>
>                    <webAppConfig>
>                        <contextPath>/services</contextPath>
>                    </webAppConfig>
>
>  <jettyConfig>src/test/resources/jetty/jetty.xml</jettyConfig>
>                    <requestLog
> implementation="org.mortbay.jetty.NCSARequestLog">
>                        <filename>target/yyyy_mm_dd.request.log</filename>
>                        <retainDays>90</retainDays>
>                        <append>true</append>
>                        <extended>false</extended>
>                        <logTimeZone>GMT</logTimeZone>
>                    </requestLog>
>                    <connectors>
>                        <connector
> implementation="org.mortbay.jetty.nio.SelectChannelConnector">
>                            <port>8080</port>
>                            <maxIdleTime>60000</maxIdleTime>
>                        </connector>
>                    </connectors>
>                </configuration>
>                <executions>
>                    <execution>
>                        <id>start-jetty</id>
>                        <phase>pre-integration-test</phase>
>                        <goals>
>                            <goal>run</goal>
>                        </goals>
>                        <configuration>
>                            <scanIntervalSeconds>0</scanIntervalSeconds>
>                            <daemon>true</daemon>
>                        </configuration>
>                    </execution>
>                    <execution>
>                        <id>stop-jetty</id>
>                        <phase>post-integration-test</phase>
>                        <goals>
>                            <goal>stop</goal>
>                        </goals>
>                    </execution>
>                </executions>
>                <dependencies>
>                    <dependency>
>                        <groupId>c3p0</groupId>
>                        <artifactId>c3p0</artifactId>
>                        <version>0.9.1.2</version>
>                    </dependency>
>                    <dependency>
>                        <groupId>com.oracle.jdbc</groupId>
>                        <artifactId>ojdbc6</artifactId>
>                        <version>${oracle.driver.version}</version>
>                    </dependency>
>                </dependencies>
>            </plugin>
>
> Incidentally, the jetty.xml file in the jettyConfig element contains
> nothing but c3p0 stuff being bound to a JNDI datasource. Also, the request
> log file is created but blank as well.
>
> As you can imagine, failure with no feedback is frustrating. Any insight is
> appreciated.
>
> Thanks.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>



Re: Blank Page with Jetty Plugin

Posted by Mick Knutson <mi...@gmail.com>.
Not sure about starting Jetty automatically, as I use Tomcat and Cargo for
that, but to just start Jetty and test manually, I created an index.html
file with some text to ensure the page was loaded, then I use this
declaration:

            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>7.0.0.pre5</version>
                <configuration>
                    <contextPath>/${finalName}</contextPath>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <scanTargetPatterns>
                        <scanTargetPattern>
                            <directory>src/main/webapp/WEB-INF</directory>
                            <excludes>
                                <exclude>**/*.jsp</exclude>
                                <exclude>**/*.xhtml</exclude>
                            </excludes>
                            <includes>
                                <include>**/*.properties</include>
                                <include>**/*.xml</include>
                            </includes>
                        </scanTargetPattern>
                    </scanTargetPatterns>
                </configuration>

                <dependencies>
                    <dependency>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                        <version>1.1.1</version>
                        <type>jar</type>
                        <scope>provided</scope>
                    </dependency>

                    <dependency>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                        <version>${log4j.version}</version>
                        <type>jar</type>
                        <scope>provided</scope>
                    </dependency>
                </dependencies>
            </plugin>


---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Wed, Sep 9, 2009 at 10:43 AM, Neil Chaudhuri <
nchaudhuri@potomacfusion.com> wrote:

> I am trying to get the Jetty plugin to work with Hibernate's c3p0
> connection pool. The server seems to start just fine with run-war, but when
> I navigate to any URL at localhost:8080, I see nothing but a blank page. And
> I mean ANY. If it is just literally localhost:8080, I see a blank page. If I
> navigate to a "good" URL, I see a blank page. If I navigate to a "bad" URL,
> I a blank page rather than a 404 or a 500 error.
>
> Here is my configuration:
>
>             <plugin>
>                <groupId>org.mortbay.jetty</groupId>
>                <artifactId>maven-jetty-plugin</artifactId>
>                <version>6.1.11</version>
>                <configuration>
>                    <webApp>target/services.war</webApp>
>                    <webAppConfig>
>                        <contextPath>/services</contextPath>
>                    </webAppConfig>
>
>  <jettyConfig>src/test/resources/jetty/jetty.xml</jettyConfig>
>                    <requestLog
> implementation="org.mortbay.jetty.NCSARequestLog">
>                        <filename>target/yyyy_mm_dd.request.log</filename>
>                        <retainDays>90</retainDays>
>                        <append>true</append>
>                        <extended>false</extended>
>                        <logTimeZone>GMT</logTimeZone>
>                    </requestLog>
>                    <connectors>
>                        <connector
> implementation="org.mortbay.jetty.nio.SelectChannelConnector">
>                            <port>8080</port>
>                            <maxIdleTime>60000</maxIdleTime>
>                        </connector>
>                    </connectors>
>                </configuration>
>                <executions>
>                    <execution>
>                        <id>start-jetty</id>
>                        <phase>pre-integration-test</phase>
>                        <goals>
>                            <goal>run</goal>
>                        </goals>
>                        <configuration>
>                            <scanIntervalSeconds>0</scanIntervalSeconds>
>                            <daemon>true</daemon>
>                        </configuration>
>                    </execution>
>                    <execution>
>                        <id>stop-jetty</id>
>                        <phase>post-integration-test</phase>
>                        <goals>
>                            <goal>stop</goal>
>                        </goals>
>                    </execution>
>                </executions>
>                <dependencies>
>                    <dependency>
>                        <groupId>c3p0</groupId>
>                        <artifactId>c3p0</artifactId>
>                        <version>0.9.1.2</version>
>                    </dependency>
>                    <dependency>
>                        <groupId>com.oracle.jdbc</groupId>
>                        <artifactId>ojdbc6</artifactId>
>                        <version>${oracle.driver.version}</version>
>                    </dependency>
>                </dependencies>
>            </plugin>
>
> Incidentally, the jetty.xml file in the jettyConfig element contains
> nothing but c3p0 stuff being bound to a JNDI datasource. Also, the request
> log file is created but blank as well.
>
> As you can imagine, failure with no feedback is frustrating. Any insight is
> appreciated.
>
> Thanks.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

Blank Page with Jetty Plugin

Posted by Neil Chaudhuri <nc...@potomacfusion.com>.
I am trying to get the Jetty plugin to work with Hibernate's c3p0 connection pool. The server seems to start just fine with run-war, but when I navigate to any URL at localhost:8080, I see nothing but a blank page. And I mean ANY. If it is just literally localhost:8080, I see a blank page. If I navigate to a "good" URL, I see a blank page. If I navigate to a "bad" URL, I a blank page rather than a 404 or a 500 error.

Here is my configuration:

             <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.11</version>
                <configuration>
                    <webApp>target/services.war</webApp>
                    <webAppConfig>
                        <contextPath>/services</contextPath>
                    </webAppConfig>
                    <jettyConfig>src/test/resources/jetty/jetty.xml</jettyConfig>
                    <requestLog implementation="org.mortbay.jetty.NCSARequestLog">
                        <filename>target/yyyy_mm_dd.request.log</filename>
                        <retainDays>90</retainDays>
                        <append>true</append>
                        <extended>false</extended>
                        <logTimeZone>GMT</logTimeZone>
                    </requestLog>
                    <connectors>
                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                            <port>8080</port>
                            <maxIdleTime>60000</maxIdleTime>
                        </connector>
                    </connectors>
                </configuration>
                <executions>
                    <execution>
                        <id>start-jetty</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <scanIntervalSeconds>0</scanIntervalSeconds>
                            <daemon>true</daemon>
                        </configuration>
                    </execution>
                    <execution>
                        <id>stop-jetty</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>c3p0</groupId>
                        <artifactId>c3p0</artifactId>
                        <version>0.9.1.2</version>
                    </dependency>
                    <dependency>
                        <groupId>com.oracle.jdbc</groupId>
                        <artifactId>ojdbc6</artifactId>
                        <version>${oracle.driver.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

Incidentally, the jetty.xml file in the jettyConfig element contains nothing but c3p0 stuff being bound to a JNDI datasource. Also, the request log file is created but blank as well. 

As you can imagine, failure with no feedback is frustrating. Any insight is appreciated.

Thanks.


Re: How to reference parent using some version variable

Posted by Jim Sellers <ji...@gmail.com>.
I don't believe that it possible because the parent is resolved first.

http://jira.codehaus.org/browse/MNG-624

Jim


On Sat, Sep 5, 2009 at 9:33 AM, Normandes Jr <no...@gmail.com> wrote:

> Hi,
>
>   I would like to reference the parent at a child module using variable at
> version.
>
>   I would like to do this, because I have a lot of projects that are child
> of parent. And if I change the version of parent, I will have to change all
> modules.
>
>   I tried this, but not working:
>
>   <artifactId>my-child</artifactId>
>
>   <parent>
>        <artifactId>my-parent</artifactId>
>        <groupId>group.my.parent</groupId>
>        <version>${pom.version}</version>
>    </parent>
>
>   I am using maven 2.2.1.
>
>   Any idea?
>
>   Regards,
>
> Junior.
>