You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Werner Punz (JIRA)" <de...@myfaces.apache.org> on 2010/09/30 12:16:33 UTC

[jira] Created: (MYFACES-2933) Our archetype poms are not entirely correctly understood by Netbeans

Our archetype poms are not entirely correctly understood by Netbeans
--------------------------------------------------------------------

                 Key: MYFACES-2933
                 URL: https://issues.apache.org/jira/browse/MYFACES-2933
             Project: MyFaces Core
          Issue Type: Bug
          Components: Archetype
    Affects Versions: 2.0.2
         Environment: all
            Reporter: Werner Punz


We have a small structural problem in the myfaces archetypes. This is not a bug in our code, but nevertheless easily fixable. The problem is the way we handle the profiles which is not correctly understood by Netbeans 6.9.

We have following code:
<profiles>
        <profile>
            <id>myfaces</id>
            <activation>
                <property>
                    <name>!jsf</name>
                </property>
            </activation>

and

 <profile>
            <!-- Activate by adding -Djsf=mojarra -->
            <id>mojarra</id>
            <activation>
                <property>
                    <name>jsf</name>
                    <value>mojarra</value>
                </property>
            </activation>

No this structure just should ensure that if no jsf=... is set myfaces is chosen automatically. This makes netbeans go haiwire if you chosse mojarra as profile because suddenly we have the mojarra and myfaces dependencies parallely in the project.

Since this structure is mostly a hack we should replace it with the correct way to do things here:

<activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>jsf</name>
                    <value>myfaces</value>
                </property>
            </activation>

instead of !jsf so if no value is given we activate the myfaces profile by default

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2933) Our archetype poms are not entirely correctly understood by Netbeans

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916480#action_12916480 ] 

Leonardo Uribe commented on MYFACES-2933:
-----------------------------------------

Hi Werner

There is no problem. Personally I like to have something like this one:

http://svn.apache.org/repos/asf/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld/src/main/resources/archetype-resources/pom.xml

In this case we have jetty plugin registered on top:

    <build>
        <finalName>${artifactId}</finalName>
        <plugins>
            <plugin>
                <!--This plugin allows to run the example using mvn jetty:run -->
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>${symbol_dollar}{maven.jetty.plugin.version}</version>
                <configuration>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                </configuration>
            </plugin>
        </plugins>
    </build>

And the additional profile jettyConfig:

        <profile>
            <!-- Debug profile for myfaces and jetty.
                It allows to see debug messages using -PjettyConfig -->
            <id>jettyConfig</id>
            <build>
                <resources>
                    <resource>
                        <directory>src/main/resources</directory>
                    </resource>
                    <resource>
                        <directory>src/main/log4j</directory>
                    </resource>
                </resources>
                <plugins>
                    <plugin>
                        <!--This plugin allows to run the example using mvn jetty:run -->
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>maven-jetty-plugin</artifactId>
                        <version>${symbol_dollar}{maven.jetty.plugin.version}</version>
                        <configuration>
                            <scanIntervalSeconds>10</scanIntervalSeconds>
                            <systemProperties>
                                <systemProperty>
                                    <name>org.apache.commons.logging.Log</name>
                                    <value>org.apache.commons.logging.impl.Log4JLogger</value>
                                </systemProperty>
                            </systemProperties>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                    <version>${symbol_dollar}{log4j.version}</version>
                    <type>jar</type>
                </dependency>
            </dependencies>
        </profile>

To have jetty with additional information. The important is have a param to prevent mojarra and myfaces be on the classpath at the same time.

> Our archetype poms are not entirely correctly understood by Netbeans
> --------------------------------------------------------------------
>
>                 Key: MYFACES-2933
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2933
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Archetype
>    Affects Versions: 2.0.2
>         Environment: all
>            Reporter: Werner Punz
>
> We have a small structural problem in the myfaces archetypes. This is not a bug in our code, but nevertheless easily fixable. The problem is the way we handle the profiles which is not correctly understood by Netbeans 6.9.
> We have following code:
> <profiles>
>         <profile>
>             <id>myfaces</id>
>             <activation>
>                 <property>
>                     <name>!jsf</name>
>                 </property>
>             </activation>
> and
>  <profile>
>             <!-- Activate by adding -Djsf=mojarra -->
>             <id>mojarra</id>
>             <activation>
>                 <property>
>                     <name>jsf</name>
>                     <value>mojarra</value>
>                 </property>
>             </activation>
> No this structure just should ensure that if no jsf=... is set myfaces is chosen automatically. This makes netbeans go haiwire if you chosse mojarra as profile because suddenly we have the mojarra and myfaces dependencies parallely in the project.
> Since this structure is mostly a hack we should replace it with the correct way to do things here:
> <activation>
>                 <activeByDefault>true</activeByDefault>
>                 <property>
>                     <name>jsf</name>
>                     <value>myfaces</value>
>                 </property>
>             </activation>
> instead of !jsf so if no value is given we activate the myfaces profile by default

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2933) Our archetype poms are not entirely correctly understood by Netbeans

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916437#action_12916437 ] 

Werner Punz commented on MYFACES-2933:
--------------------------------------

Ok I think the best solution would be just to have two profiles myfaces and mojarra and to push the entire jetty part into the main build area. Is there any reason why the jetty plugin was in a profile in the first place?

With this solution both impls can be started via mvn clean jetty:run -Pmojarra respectively -Pmyfaces and it works also as expected in Netbeans.

I need a comment from someone regarding this. Leonardo?


> Our archetype poms are not entirely correctly understood by Netbeans
> --------------------------------------------------------------------
>
>                 Key: MYFACES-2933
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2933
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Archetype
>    Affects Versions: 2.0.2
>         Environment: all
>            Reporter: Werner Punz
>
> We have a small structural problem in the myfaces archetypes. This is not a bug in our code, but nevertheless easily fixable. The problem is the way we handle the profiles which is not correctly understood by Netbeans 6.9.
> We have following code:
> <profiles>
>         <profile>
>             <id>myfaces</id>
>             <activation>
>                 <property>
>                     <name>!jsf</name>
>                 </property>
>             </activation>
> and
>  <profile>
>             <!-- Activate by adding -Djsf=mojarra -->
>             <id>mojarra</id>
>             <activation>
>                 <property>
>                     <name>jsf</name>
>                     <value>mojarra</value>
>                 </property>
>             </activation>
> No this structure just should ensure that if no jsf=... is set myfaces is chosen automatically. This makes netbeans go haiwire if you chosse mojarra as profile because suddenly we have the mojarra and myfaces dependencies parallely in the project.
> Since this structure is mostly a hack we should replace it with the correct way to do things here:
> <activation>
>                 <activeByDefault>true</activeByDefault>
>                 <property>
>                     <name>jsf</name>
>                     <value>myfaces</value>
>                 </property>
>             </activation>
> instead of !jsf so if no value is given we activate the myfaces profile by default

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2933) Our archetype poms are not entirely correctly understood by Netbeans

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916810#action_12916810 ] 

Werner Punz commented on MYFACES-2933:
--------------------------------------

Sure This is a netbeans bug, I would not even call it a bug, more a deficit, but do we have to make it extra hard for the users, if we can find a clean way which also provides netbeans compatibility?
Just my 2c regarding all this.


> Our archetype poms are not entirely correctly understood by Netbeans
> --------------------------------------------------------------------
>
>                 Key: MYFACES-2933
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2933
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Archetype
>    Affects Versions: 2.0.2
>         Environment: all
>            Reporter: Werner Punz
>
> We have a small structural problem in the myfaces archetypes. This is not a bug in our code, but nevertheless easily fixable. The problem is the way we handle the profiles which is not correctly understood by Netbeans 6.9.
> We have following code:
> <profiles>
>         <profile>
>             <id>myfaces</id>
>             <activation>
>                 <property>
>                     <name>!jsf</name>
>                 </property>
>             </activation>
> and
>  <profile>
>             <!-- Activate by adding -Djsf=mojarra -->
>             <id>mojarra</id>
>             <activation>
>                 <property>
>                     <name>jsf</name>
>                     <value>mojarra</value>
>                 </property>
>             </activation>
> No this structure just should ensure that if no jsf=... is set myfaces is chosen automatically. This makes netbeans go haiwire if you chosse mojarra as profile because suddenly we have the mojarra and myfaces dependencies parallely in the project.
> Since this structure is mostly a hack we should replace it with the correct way to do things here:
> <activation>
>                 <activeByDefault>true</activeByDefault>
>                 <property>
>                     <name>jsf</name>
>                     <value>myfaces</value>
>                 </property>
>             </activation>
> instead of !jsf so if no value is given we activate the myfaces profile by default

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2933) Our archetype poms are not entirely correctly understood by Netbeans

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916483#action_12916483 ] 

Jakob Korherr commented on MYFACES-2933:
----------------------------------------

IMO this is a NetBeans bug and we don't really have to fix it. We've used this configuration for a long time now and there were never any problems..

> Our archetype poms are not entirely correctly understood by Netbeans
> --------------------------------------------------------------------
>
>                 Key: MYFACES-2933
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2933
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Archetype
>    Affects Versions: 2.0.2
>         Environment: all
>            Reporter: Werner Punz
>
> We have a small structural problem in the myfaces archetypes. This is not a bug in our code, but nevertheless easily fixable. The problem is the way we handle the profiles which is not correctly understood by Netbeans 6.9.
> We have following code:
> <profiles>
>         <profile>
>             <id>myfaces</id>
>             <activation>
>                 <property>
>                     <name>!jsf</name>
>                 </property>
>             </activation>
> and
>  <profile>
>             <!-- Activate by adding -Djsf=mojarra -->
>             <id>mojarra</id>
>             <activation>
>                 <property>
>                     <name>jsf</name>
>                     <value>mojarra</value>
>                 </property>
>             </activation>
> No this structure just should ensure that if no jsf=... is set myfaces is chosen automatically. This makes netbeans go haiwire if you chosse mojarra as profile because suddenly we have the mojarra and myfaces dependencies parallely in the project.
> Since this structure is mostly a hack we should replace it with the correct way to do things here:
> <activation>
>                 <activeByDefault>true</activeByDefault>
>                 <property>
>                     <name>jsf</name>
>                     <value>myfaces</value>
>                 </property>
>             </activation>
> instead of !jsf so if no value is given we activate the myfaces profile by default

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2933) Our archetype poms are not entirely correctly understood by Netbeans

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916433#action_12916433 ] 

Werner Punz commented on MYFACES-2933:
--------------------------------------

Ok netbeans does following at context switching mvn clean install -Pmojarra
the result with out structure in this case is that we pack both impls in because there is no -D parameter set

I tried it from the command line and I am getting following result:

werner-punzs-macbook-air-3:helloworld werpu2$ ls target/helloworld/WEB-INF/lib/
commons-beanutils-1.7.0.jar	commons-logging-1.0.4.jar
commons-codec-1.3.jar		jsf-api-2.0.3.jar
commons-collections-3.2.jar	jsf-impl-2.0.3.jar
commons-digester-1.8.jar	myfaces-api-2.0.1.jar
commons-discovery-0.4.jar	myfaces-impl-2.0.1.jar



> Our archetype poms are not entirely correctly understood by Netbeans
> --------------------------------------------------------------------
>
>                 Key: MYFACES-2933
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2933
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Archetype
>    Affects Versions: 2.0.2
>         Environment: all
>            Reporter: Werner Punz
>
> We have a small structural problem in the myfaces archetypes. This is not a bug in our code, but nevertheless easily fixable. The problem is the way we handle the profiles which is not correctly understood by Netbeans 6.9.
> We have following code:
> <profiles>
>         <profile>
>             <id>myfaces</id>
>             <activation>
>                 <property>
>                     <name>!jsf</name>
>                 </property>
>             </activation>
> and
>  <profile>
>             <!-- Activate by adding -Djsf=mojarra -->
>             <id>mojarra</id>
>             <activation>
>                 <property>
>                     <name>jsf</name>
>                     <value>mojarra</value>
>                 </property>
>             </activation>
> No this structure just should ensure that if no jsf=... is set myfaces is chosen automatically. This makes netbeans go haiwire if you chosse mojarra as profile because suddenly we have the mojarra and myfaces dependencies parallely in the project.
> Since this structure is mostly a hack we should replace it with the correct way to do things here:
> <activation>
>                 <activeByDefault>true</activeByDefault>
>                 <property>
>                     <name>jsf</name>
>                     <value>myfaces</value>
>                 </property>
>             </activation>
> instead of !jsf so if no value is given we activate the myfaces profile by default

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-2933) Our archetype poms are not entirely correctly understood by Netbeans

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916429#action_12916429 ] 

Werner Punz commented on MYFACES-2933:
--------------------------------------

Ok addendum if we do it the activeByDefault way, the jetty startup fails.. because we then disable it


> Our archetype poms are not entirely correctly understood by Netbeans
> --------------------------------------------------------------------
>
>                 Key: MYFACES-2933
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2933
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: Archetype
>    Affects Versions: 2.0.2
>         Environment: all
>            Reporter: Werner Punz
>
> We have a small structural problem in the myfaces archetypes. This is not a bug in our code, but nevertheless easily fixable. The problem is the way we handle the profiles which is not correctly understood by Netbeans 6.9.
> We have following code:
> <profiles>
>         <profile>
>             <id>myfaces</id>
>             <activation>
>                 <property>
>                     <name>!jsf</name>
>                 </property>
>             </activation>
> and
>  <profile>
>             <!-- Activate by adding -Djsf=mojarra -->
>             <id>mojarra</id>
>             <activation>
>                 <property>
>                     <name>jsf</name>
>                     <value>mojarra</value>
>                 </property>
>             </activation>
> No this structure just should ensure that if no jsf=... is set myfaces is chosen automatically. This makes netbeans go haiwire if you chosse mojarra as profile because suddenly we have the mojarra and myfaces dependencies parallely in the project.
> Since this structure is mostly a hack we should replace it with the correct way to do things here:
> <activation>
>                 <activeByDefault>true</activeByDefault>
>                 <property>
>                     <name>jsf</name>
>                     <value>myfaces</value>
>                 </property>
>             </activation>
> instead of !jsf so if no value is given we activate the myfaces profile by default

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.